} else if (ae.getSource().equals(butDelTerrain) && lisTerrain.getSelectedItem() != null) { ITerrain toRemove = Terrains.getTerrainFactory().createTerrain(lisTerrain.getSelectedItem());
} else if (ae.getSource().equals(butDelTerrain) && lisTerrain.getSelectedValue() != null) { ITerrain toRemove = Terrains.getTerrainFactory().createTerrain((String) lisTerrain.getSelectedValue());
    public void actionPerformed(ActionEvent ae) {        if ("fileBoardNew".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            boardNew();        } else if ("fileBoardOpen".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            boardLoad();        } else if ("fileBoardSave".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            boardSave();        } else if ("fileBoardSaveAs".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            boardSaveAs();        } else if ("fileBoardSaveAsImage".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            boardSaveAsImage();        } else if (ae.getSource().equals(butDelTerrain) && lisTerrain.getSelectedItem() != null) {            ITerrain toRemove = Terrains.getTerrainFactory().createTerrain(lisTerrain.getSelectedItem());            curHex.removeTerrain(toRemove.getType());            refreshTerrainList();            repaintWorkingHex();        } else if (ae.getSource().equals(butAddTerrain)) {            addSetTerrain();        } else if (ae.getSource().equals(butElevUp) && curHex.getElevation() < 9) {            curHex.setElevation(curHex.getElevation() + 1);            texElev.setText(Integer.toString(curHex.getElevation()));            repaintWorkingHex();        } else if (ae.getSource().equals(butElevDown) && curHex.getElevation() > -5) {            curHex.setElevation(curHex.getElevation() - 1);            texElev.setText(Integer.toString(curHex.getElevation()));            repaintWorkingHex();        } else if (ae.getSource().equals(butTerrExits)) {            ExitsDialog ed = new ExitsDialog(frame);            cheTerrExitSpecified.setSelected(true);            ed.setExits(Integer.parseInt(texTerrExits.getText()));            ed.setVisible(true);            texTerrExits.setText(Integer.toString(ed.getExits()));            addSetTerrain();        } else if ("viewMiniMap".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            toggleMap();        } else if (ae.getActionCommand().equals(ClientGUI.VIEW_ZOOM_IN)) {            bv.zoomIn();        } else if (ae.getActionCommand().equals(ClientGUI.VIEW_ZOOM_OUT)) {            bv.zoomOut();        } else if ("helpAbout".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            showAbout();        } else if ("helpContents".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            showHelp();        } else if ("viewClientSettings".equalsIgnoreCase(ae.getActionCommand())) { //$NON-NLS-1$            showSettings();        }    }