Search in sources :

Example 1 with ShapeDrawer

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");
}
Also used : ToolTip(jmri.jmrit.display.ToolTip) BoxLayout(javax.swing.BoxLayout) Color(java.awt.Color) Font(java.awt.Font) ShapeDrawer(jmri.jmrit.display.controlPanelEditor.shape.ShapeDrawer) ConfigureManager(jmri.ConfigureManager) SwingWorker(javax.swing.SwingWorker) Container(java.awt.Container) JMenuBar(javax.swing.JMenuBar)

Aggregations

Color (java.awt.Color)1 Container (java.awt.Container)1 Font (java.awt.Font)1 BoxLayout (javax.swing.BoxLayout)1 JMenuBar (javax.swing.JMenuBar)1 SwingWorker (javax.swing.SwingWorker)1 ConfigureManager (jmri.ConfigureManager)1 ToolTip (jmri.jmrit.display.ToolTip)1 ShapeDrawer (jmri.jmrit.display.controlPanelEditor.shape.ShapeDrawer)1