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

Java CGrid类代码示例

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

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



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

示例1: createLayout

import bibliothek.gui.dock.common.CGrid; //导入依赖的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.CGrid; //导入依赖的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: createUI

import bibliothek.gui.dock.common.CGrid; //导入依赖的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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ITemplateResource类代码示例发布时间:2022-05-22
下一篇:
Java LineString类代码示例发布时间: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