• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CControl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中bibliothek.gui.dock.common.CControl的典型用法代码示例。如果您正苦于以下问题:Java CControl类的具体用法?Java CControl怎么用?Java CControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CControl类属于bibliothek.gui.dock.common包,在下文中一共展示了CControl类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createLayout

import bibliothek.gui.dock.common.CControl; //导入依赖的package包/类
/**
 * This method simulates the creation of a layout.
 *
 * @param display the component to display
 * @param input array list
 * @return element
 */
public static XElement createLayout(Component display, ArrayList<ImmutablePair<String, Component>> input) {
    /* This method simulates the creation of a layout */
    CControl control = new CControl();
    control.getContentArea();

    CGrid grid = new CGrid(control);

    DefaultSingleCDockable displayDock = display != null ? new ControllerBase.TorgoSingleDockable("Display", display) : null;
    if (displayDock != null) {
        grid.add(0, 0, 10, 10, displayDock);
        displayDock.setLocation(CLocation.base().minimalWest());
        displayDock.setExtendedMode(ExtendedMode.NORMALIZED);
    }

    int count = 1;
    for (ImmutablePair<String, Component> key : input) {
        DefaultSingleCDockable dock = new ControllerBase.TorgoSingleDockable(key.left, key.right);
        grid.add(10, 0, 6, count, dock);
        dock.setExtendedMode(ExtendedMode.NORMALIZED);
        count += 1;
    }

    control.getContentArea().deploy(grid);

    XElement root = new XElement("root");
    control.writeXML(root);
    control.destroy();
    return root;
}
 
开发者ID:ZenHarbinger,项目名称:torgo,代码行数:37,代码来源:DockingFrameFactory.java


示例2: CodeEditorWindow

import bibliothek.gui.dock.common.CControl; //导入依赖的package包/类
public CodeEditorWindow() {
  setContentPane(contentPane);

  control = new CControl(this);
  base = CLocation.base();
  control.setTheme(ThemeMap.KEY_ECLIPSE_THEME);
  setContentPane(control.getContentArea());

  RSyntaxTextArea textArea = new RSyntaxTextArea(20, 60);
  textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT);
  textArea.setCodeFoldingEnabled(true);
  textArea.setFont(new Font("Ubuntu Mono", textArea.getFont().getStyle(), 14));
  Theme theme = null;
  try {
    theme = Theme.load(getClass().getResourceAsStream("/org/fife/ui/rsyntaxtextarea/themes/dark.xml"));
    theme.apply(textArea);
  } catch (IOException e) {
    e.printStackTrace();
  }


  RTextScrollPane sp = new RTextScrollPane(textArea);
  DefaultSingleCDockable dockable = new DefaultSingleCDockable("code", "sss", sp);
  dockable.setCloseable(true);
  dockable.setExternalizable(false);


  CGrid grid = new CGrid(control);

  grid.add(0, 0, 1, 1, createDockable("scripts", Color.CYAN));
  grid.add(1, 0, 8, 7, createDockable("* main.fjs", Color.CYAN));
  grid.add(1, 0, 8, 7, createDockable("* log.fjs", Color.CYAN));
  grid.add(1, 0, 8, 7, dockable);
  grid.add(0, 8, 9, 2, createDockable("Logs", Color.BLACK));
  control.getContentArea().deploy(grid);

}
 
开发者ID:macbury,项目名称:ForgE,代码行数:38,代码来源:CodeEditorWindow.java


示例3: loadState

import bibliothek.gui.dock.common.CControl; //导入依赖的package包/类
private static boolean loadState(CControl control) {
	File layoutFile = getLayoutFile();
	if (!layoutFile.exists()) {
		return false;
	}
	try {
		control.readXML(layoutFile);
		return true;
	} catch (IOException e) {
		throw Throwables.propagate(e);
	}
}
 
开发者ID:pfichtner,项目名称:jrunalyzer,代码行数:13,代码来源:Dock.java


示例4: saveState

import bibliothek.gui.dock.common.CControl; //导入依赖的package包/类
private static void saveState(CControl control) {
	try {
		control.writeXML(getLayoutFile());
	} catch (IOException e) {
		throw Throwables.propagate(e);
	}
}
 
开发者ID:pfichtner,项目名称:jrunalyzer,代码行数:8,代码来源:Dock.java


示例5: 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


示例6: 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


示例7: GuiMain

import bibliothek.gui.dock.common.CControl; //导入依赖的package包/类
/**
	 * CONSTRUCTOR
	 */
	public GuiMain(boolean ismultithread) {
		this.ismultithread = ismultithread;
		
		this.rootframe = new JFrame("OSH Simulation GUI");
		this.rootframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.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();
		//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", "OSH Simulation GUI", this.cruisecontrol);
		
		control.addDockable( scheduledock );		
//		control.addDockable( waterdock );
		control.addDockable( powersumsdock );
		control.addDockable( devicetabledock );
		control.addDockable( stateviewerdock );
		control.addDockable( cruisecontroldock );
		
		normalLocation = CLocation.base().normal();
		
		scheduledock.setLocation(normalLocation);
//		waterdock.setLocation(normal.stack());
        powersumsdock.setLocation(normalLocation.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,项目名称:OSHv4,代码行数:62,代码来源:GuiMain.java


示例8: getControl

import bibliothek.gui.dock.common.CControl; //导入依赖的package包/类
public CControl getControl() {
	return control;
}
 
开发者ID:clearlyspam23,项目名称:JAnGLE,代码行数:4,代码来源:LayerDockingDialog.java


示例9: setControl

import bibliothek.gui.dock.common.CControl; //导入依赖的package包/类
public void setControl(CControl control) {
	this.control = control;
}
 
开发者ID:clearlyspam23,项目名称:JAnGLE,代码行数:4,代码来源:LayerDockingDialog.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ReplayCache类代码示例发布时间:2022-05-22
下一篇:
Java TaskAttemptEvent类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap