else if (e.getSource() == jumpButton) { net.starmen.pkhack.JHack.main.showModule( MapEditor.class, new Integer[] { new Integer(destPreview.getMapTileX()), new Integer(destPreview.getMapTileY()) }); }
	public void actionPerformed(ActionEvent e)	{	    if (e.getActionCommand().equals("apply"))	    {	    	int x = Integer.parseInt(areaXField.getText()),				y = Integer.parseInt(areaYField.getText()),				num = Integer.parseInt(entryNumField.getText());	    	if (EbMap.getDoorsNum(x,y) > num)			{	    		EbMap.DoorLocation doorLocation = EbMap.getDoorLocation(x,y,num);	    		if (numField.isEnabled())	    							doorLocation.setType(						(byte) typeBox.getSelectedIndex());				if (ropeCheck.isEnabled())	    			doorLocation.setMiscRope(ropeCheck.isSelected());				else if (dirClimbBox.isEnabled())					doorLocation.setMiscDirection(dirClimbBox.getSelectedIndex());				if (numField.isEnabled())				{					doorLocation.setDestIndex(							Integer.parseInt(numField.getText()));		    		EbMap.Destination dest =		    			EbMap.getDestination(		    					doorLocation.getDestIndex());		    		if (typeDestBox.isEnabled())		    			dest.setType((byte) 								typeDestBox.getSelectedIndex());		    		if (ptrField.isEditable())		    			dest.setPointer(		        				Integer.parseInt(		        						ptrField.getText(),16));		    		if (flagField.isEditable())		    			dest.setFlag(		        				(short) Integer.parseInt(		        						flagField.getText(),16));		    		if (reverseCheck.isEnabled())		    			dest.setFlagReversed(reverseCheck.isSelected());		    		if (destPreview.isEnabled())		    		{		    			dest.setX((short) destPreview.getMapX());		    			dest.setY((short) destPreview.getMapY());		    		}		    		if (styleBox.isEnabled())		    			dest.setStyle(		        				(byte) styleBox.getSelectedIndex());		    		if (dirBox.isEnabled())		    			dest.setDirection(		        				(byte) dirBox.getSelectedIndex());				}				updateComponents(true, true, true);				boolean doorWrite = EbMap.writeDoors(this, false);				if (! doorWrite)	        		JOptionPane.showMessageDialog(mainWindow,	            			"This is so embarassing!\n"	            			+ "For some reason, I could not save "	    					+ "the door data?\nThis shouldn't happen...");			}	    }	    else if (e.getActionCommand().equals("close"))	    {	        hide();	    }	    else if (e.getSource() == setXYButton)	    {	    	setXYButton.setEnabled(false);	    	net.starmen.pkhack.JHack.main.showModule(MapEditor.class, this);	    }		else if ((e.getSource() == typeBox)				&& (! muteEvents))		{			if ((! numField.isEnabled())					&& (EbMap.getDoorDestType(typeBox.getSelectedIndex()) >= 0))			{				muteEvents = true;				numField.setEnabled(true);				numField.setText("0");				muteEvents = false;				updateComponents(true, false, true);			}			else				updateComponents(false, false, false);		}		else if ((e.getSource() == typeDestBox)				&& (! muteEvents))			updateComponents(true, false, false);	}