本文整理汇总了Java中bibliothek.gui.dock.common.CControl.addDockable方法的典型用法代码示例。如果您正苦于以下问题:Java CControl.addDockable方法的具体用法?Java CControl.addDockable怎么用?Java CControl.addDockable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bibliothek.gui.dock.common.CControl
的用法示例。
在下文中一共展示了CControl.addDockable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createUI
import bibliothek.gui.dock.common.CControl; //导入方法依赖的package包/类
@Override
public void createUI(SLDEditorInterface application, SLDEditorUIPanels uiMgr,
List<ExtensionInterface> extensionList) {
JFrame frame = application.getApplicationFrame();
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);
}
示例2: GuiMain
import bibliothek.gui.dock.common.CControl; //导入方法依赖的package包/类
/**
* CONSTRUCTOR
*/
public GuiMain(boolean ismultithread) {
this.ismultithread = ismultithread;
this.rootframe = new JFrame("Cruise Control");
this.rootframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
CControl control = new CControl( this.rootframe );
this.rootframe.setLayout(new BorderLayout());
this.rootframe.add( control.getContentArea(), BorderLayout.CENTER );
control.setTheme(ThemeMap.KEY_ECLIPSE_THEME);
this.scheduledrawer = createScheduledrawer();
this.waterdrawer = createWaterdrawer();
this.powersumsdrawer = createPowerSumsdrawer();
this.devicetable = createDevicetable();
this.stateviewer = createStateViewer();
// IMPORTANT: CruiseControl must be the last one to be in front of the others!
this.cruisecontrol = createCruisecontrol();
SingleCDockable scheduledock = new DefaultSingleCDockable("scheduledrawer", "Schedule", this.scheduledrawer);
SingleCDockable waterdock = new DefaultSingleCDockable("waterdrawer", this.waterdrawer.getName(), this.waterdrawer);
SingleCDockable powersumsdock = new DefaultSingleCDockable("powersumsdrawer", this.powersumsdrawer.getName(), this.powersumsdrawer);
SingleCDockable devicetabledock = new DefaultSingleCDockable("devicetable", "Device Table", this.devicetable);
SingleCDockable stateviewerdock = new DefaultSingleCDockable("stateviewer", "Registry State Viewer", this.stateviewer);
SingleCDockable cruisecontroldock = new DefaultSingleCDockable("cruisecontrol", "Cruise Control", this.cruisecontrol);
control.addDockable( scheduledock );
control.addDockable( waterdock );
control.addDockable( powersumsdock );
control.addDockable( devicetabledock );
control.addDockable( stateviewerdock );
control.addDockable( cruisecontroldock );
CContentAreaCenterLocation normal = CLocation.base().normal();
scheduledock.setLocation(normal);
waterdock.setLocation(normal.stack());
powersumsdock.setLocation(normal.stack());
TreeLocationRoot south = CLocation.base().normalSouth(0.4);
devicetabledock.setLocation(south);
stateviewerdock.setLocation(south.stack());
TreeLocationRoot north = CLocation.base().normalNorth(0.1);
cruisecontroldock.setLocation(north);
scheduledock.setVisible(true);
waterdock.setVisible(true);
powersumsdock.setVisible(true);
devicetabledock.setVisible(true);
stateviewerdock.setVisible(true);
cruisecontroldock.setVisible(true);
this.rootframe.pack();
this.rootframe.setBounds( 50, 50, 1000, 700 );
this.rootframe.setVisible(true);
}