当前位置: 首页>>代码示例>>Java>>正文


Java CControl.addDockable方法代码示例

本文整理汇总了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);
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:66,代码来源:SLDEditorDockableLayout.java

示例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);
}
 
开发者ID:organicsmarthome,项目名称:OSHv2,代码行数:62,代码来源:GuiMain.java


注:本文中的bibliothek.gui.dock.common.CControl.addDockable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。