本文整理汇总了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;未经允许,请勿转载。 |
请发表评论