public void setElement(EditableElement element) { MapContext mapContext = (MapContext) element.getObject(); try { mapControl.setMapContext(mapContext); mapControl.setElement(element); mapControl.setDefaultTool(getIndependentToolInstance(defaultTool, defaultMouseCursor)); mapControl.initMapControl(); mapEditor.setContentPane(mapControl); mapToolBar.setPreferredSize(new Dimension(mapControl.getWidth(), 30)); mapToolBar.setFloatable(false); mapEditor.add(mapToolBar, BorderLayout.PAGE_END); } catch (TransitionException e) { Services.getErrorManager().error(I18N.getString("orbisgis.core.tool.not_valid"), e); } catch (InstantiationException e) { Services.getErrorManager().error(I18N.getString("orbisgis.core.tool.not_valid"), e); } catch (IllegalAccessException e) { Services.getErrorManager().error(I18N.getString("orbisgis.core.tool.not_valid"), e); } this.mapElement = element; }
public String getTitle() { return mapElement.getId(); }