use of jmri.jmrit.display.controlPanelEditor.shape.ShapeDrawer in project JMRI by JMRI.
the class ControlPanelEditor method init.
@Override
protected void init(String name) {
setVisible(false);
java.awt.Container contentPane = this.getContentPane();
contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
// make menus
setGlobalSetsLocalFlag(false);
setUseGlobalFlag(false);
_menuBar = new JMenuBar();
_circuitBuilder = new CircuitBuilder(this);
_shapeDrawer = new ShapeDrawer(this);
makeDrawMenu();
makeWarrantMenu(false);
makeIconMenu();
makeZoomMenu();
makeMarkerMenu();
makeOptionMenu();
makeEditMenu();
makeFileMenu();
setJMenuBar(_menuBar);
addHelpMenu("package.jmri.jmrit.display.ControlPanelEditor", true);
super.setTargetPanel(null, null);
super.setTargetPanelSize(300, 300);
makeDataFlavors();
// set scrollbar initial state
setScroll(SCROLL_BOTH);
scrollBoth.setSelected(true);
super.setDefaultToolTip(new ToolTip(null, 0, 0, new Font("Serif", Font.PLAIN, 12), Color.black, new Color(255, 250, 210), Color.black));
// register the resulting panel for later configuration
ConfigureManager cm = InstanceManager.getNullableDefault(jmri.ConfigureManager.class);
if (cm != null) {
cm.registerUser(this);
}
pack();
setVisible(true);
class makeCatalog extends SwingWorker<CatalogPanel, Object> {
@Override
public CatalogPanel doInBackground() {
return CatalogPanel.makeDefaultCatalog();
}
}
(new makeCatalog()).execute();
log.debug("Init SwingWorker launched");
}
Aggregations