bibliothek.gui.dock.common.SingleCDockable Java Examples
The following examples show how to use
bibliothek.gui.dock.common.SingleCDockable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DockingManager.java From openAGV with Apache License 2.0 | 5 votes |
/** * Removes a dockable from the CControl. * * @param dockable The dockable that shall be removed. */ public void removeDockable(SingleCDockable dockable) { Objects.requireNonNull(dockable, "dockable is null"); if (control != null) { control.removeDockable(dockable); } }
Example #2
Source File: DockingManager.java From openAGV with Apache License 2.0 | 5 votes |
/** * Removes a dockable with the given id. * * @param id The id of the dockable to remove. */ public void removeDockable(String id) { Objects.requireNonNull(id); SingleCDockable dock = control.getSingleDockable(id); if (dock != null) { removeDockable(dock); } }
Example #3
Source File: DockingManager.java From openAGV with Apache License 2.0 | 5 votes |
/** * Sets the visibility status of a dockable with the given id. * * @param id The id of the dockable. * @param visible If it shall be visible or not. */ public void setDockableVisibility(String id, boolean visible) { if (control != null) { SingleCDockable dockable = control.getSingleDockable(id); if (dockable != null) { dockable.setVisible(visible); } } }
Example #4
Source File: GuiUtil.java From MeteoInfo with GNU Lesser General Public License v3.0 | 5 votes |
/** * Create dockable * @param title * @param color * @return */ public static SingleCDockable createDockable(String title, Color color) { JPanel panel = new JPanel(); panel.setOpaque(true); panel.setBackground(color); DefaultSingleCDockable dockable = new DefaultSingleCDockable(title, title, panel); dockable.setCloseable(true); return dockable; }
Example #5
Source File: GuiUtil.java From MeteoInfo with GNU Lesser General Public License v3.0 | 5 votes |
/** * Create editor dockable * @param title Title * @return Editor dockable */ public static SingleCDockable createEditorDockable(String title) { JTabbedPane tabbedPanel = new JTabbedPane(); addNewTextEditor("New", tabbedPanel); DefaultSingleCDockable dockable = new DefaultSingleCDockable(title, title, tabbedPanel); dockable.setCloseable(true); return dockable; }
Example #6
Source File: SLDEditorDockableLayout.java From sldeditor with GNU General Public License v3.0 | 4 votes |
@Override public void createUI( SLDEditorInterface application, SLDEditorUIPanels uiMgr, List<ExtensionInterface> extensionList) { JFrame frame = Controller.getInstance().getFrame(); control = new CControl(frame); frame.setLayout(new GridLayout(1, 1)); frame.add(control.getContentArea()); CGrid grid = new CGrid(control); SingleCDockable legend = create( Localisation.getString(SLDEditorDockableLayout.class, "panels.legend"), (JPanel) uiMgr.getLegendData()); SingleCDockable symbol = create( Localisation.getString(SLDEditorDockableLayout.class, "panels.symbol"), uiMgr.getSLDSymbolData()); SingleCDockable sld = create( Localisation.getString(SLDEditorDockableLayout.class, "panels.sld"), SLDTextArea.getPanel()); SingleCDockable map = create( Localisation.getString(SLDEditorDockableLayout.class, "panels.map"), RenderPanelFactory.getMapRenderer()); SingleCDockable dataSource = create( Localisation.getString(SLDEditorDockableLayout.class, "panels.dataSource"), uiMgr.getDataSourceConfig()); SingleCDockable vendorOption = create( Localisation.getString( SLDEditorDockableLayout.class, "panels.vendorOption"), uiMgr.getVendorOption()); SingleCDockable console = create( Localisation.getString(SLDEditorDockableLayout.class, "panels.console"), ConsoleManager.getInstance().getPanel()); control.addDockable(sld); control.addDockable(legend); control.addDockable(symbol); control.addDockable(map); control.addDockable(dataSource); control.addDockable(vendorOption); control.addDockable(console); ToolManager toolManagerInstance = ToolManager.getInstance(); toolManagerInstance.setApplication(application); for (ExtensionInterface extension : extensionList) { extension.initialise(application.getLoadSLDInterface(), toolManagerInstance); SingleCDockable dockablePlugin = create(extension.getName(), extension.getPanel()); control.addDockable(dockablePlugin); grid.add(0, 0, 1, 4, dockablePlugin); } grid.add(1, 0, 2, 4, sld); grid.add(1, 0, 2, 4, legend); grid.add(1, 0, 2, 4, map); grid.add(1, 0, 2, 4, dataSource); grid.add(1, 0, 2, 4, vendorOption); grid.add(1, 0, 2, 4, symbol); grid.add(0, 4, 3, 1, console); CContentArea content = control.getContentArea(); content.deploy(grid); }
Example #7
Source File: SLDEditorDockableLayout.java From sldeditor with GNU General Public License v3.0 | 2 votes |
/** * Creates a SingleCDockable object. * * @param title the title * @param panel the panel * @return the SingleCDockable */ private static SingleCDockable create(String title, JPanel panel) { return new DefaultSingleCDockable(title, title, panel); }