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


Java JXMultiSplitPane.setLayout方法代码示例

本文整理汇总了Java中org.jdesktop.swingx.JXMultiSplitPane.setLayout方法的典型用法代码示例。如果您正苦于以下问题:Java JXMultiSplitPane.setLayout方法的具体用法?Java JXMultiSplitPane.setLayout怎么用?Java JXMultiSplitPane.setLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jdesktop.swingx.JXMultiSplitPane的用法示例。


在下文中一共展示了JXMultiSplitPane.setLayout方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSplitPane

import org.jdesktop.swingx.JXMultiSplitPane; //导入方法依赖的package包/类
private JComponent createSplitPane() {
        final JComponent demoContainer = new JXPanel();
        demoContainer.setLayout(new BorderLayout()); //BoxLayout(demoContainer, BoxLayout.LINE_AXIS));
        demoContainer.setBorder(BorderFactory.createLineBorder(Color.RED));
        
//      <snip> MultiSplit layout declaration
        String layout = 
            "(ROW " +
                 "(LEAF name=selector weight=0.3)" +
                 "(COLUMN weight=0.7 " +
                     "(LEAF name= demo weight=0.7)" +
                     "(LEAF name=source weight=0.3)" +
                 ")" +
            ")"; 
        MultiSplitLayout multiSplitLayout = new MultiSplitLayout(MultiSplitLayout.parseModel(layout));
//        </snip>
        JXMultiSplitPane splitPane = new JXMultiSplitPane();
        splitPane.setLayout(multiSplitLayout);
        splitPane.add("selector", createButtonStack(demoContainer));
        splitPane.add("demo", demoContainer);
        return splitPane;
    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:23,代码来源:LoadedPanelExperiments.java

示例2: createMainPanel

import org.jdesktop.swingx.JXMultiSplitPane; //导入方法依赖的package包/类
protected JComponent createMainPanel() {
//        <snip> MultiSplit layout declaration
        String layout = 
            "(ROW " +
                 "(LEAF name=selector weight=0.25)" +
                 "(COLUMN weight=0.75 " +
                     "(LEAF name= demo weight=0.7)" +
                     "(LEAF name=source weight=0.3)" +
                 ")" +
            ")"; 
        multiSplitLayout = new MultiSplitLayout(MultiSplitLayout.parseModel(layout));
//        </snip>
        JXMultiSplitPane splitPane = new JXMultiSplitPane();
        splitPane.setLayout(multiSplitLayout);

        // Create demo selector panel on left
        JComponent demoSelectorPanel = demoSelector.getSelectorComponent();
        demoSelectorPanel.setBorder(PANEL_BORDER);
        splitPane.add(demoSelectorPanel, "selector");
        
        // Create panel to contain currently running demo
        JComponent demoContainer = new JXPanel();
        demoContainer.setLayout(new BorderLayout());
        demoContainer.setBorder(PANEL_BORDER);
        splitPane.add(demoContainer, "demo");

        // Create source code pane
        codeViewer = new CodeViewer();
//        Font font = codeViewer.getFont();
//        codeViewer.setFont(font.deriveFont(Font.BOLD, 20.f));
        JComponent codeContainer = new JPanel(new BorderLayout());
        codeContainer.add(codeViewer);
        codeContainer.setBorder(PANEL_BORDER);
        splitPane.add(codeContainer, "source");
        
        // Create shareable popup menu for demo actions
        popup = new JPopupMenu();
        popup.add(new EditPropertiesAction());
        popup.add(new ViewCodeSnippetAction());

        return splitPane;
    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:43,代码来源:SwingXSet.java


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