本文整理汇总了Java中org.jdesktop.swingx.JXMultiSplitPane.setBorder方法的典型用法代码示例。如果您正苦于以下问题:Java JXMultiSplitPane.setBorder方法的具体用法?Java JXMultiSplitPane.setBorder怎么用?Java JXMultiSplitPane.setBorder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXMultiSplitPane
的用法示例。
在下文中一共展示了JXMultiSplitPane.setBorder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMultiSplitPaneDemo
import org.jdesktop.swingx.JXMultiSplitPane; //导入方法依赖的package包/类
private void createMultiSplitPaneDemo() {
setLayout( new BorderLayout());
JXMultiSplitPane msp = new JXMultiSplitPane();
String layoutDef = "(COLUMN (ROW weight=0.8 (COLUMN weight=0.25 " +
"(LEAF name=left.top weight=0.5) (LEAF name=left.middle weight=0.5))" +
"(LEAF name=editor weight=0.75)) (LEAF name=bottom weight=0.2))";
MultiSplitLayout.Node modelRoot = MultiSplitLayout.parseModel( layoutDef );
msp.getMultiSplitLayout().setModel( modelRoot );
msp.add( new JButton( "Left Top" ), "left.top" );
msp.add( new JButton( "Left Middle" ), "left.middle" );
msp.add( new JButton( "Editor" ), "editor" );
msp.add( new JButton( "Bottom" ), "bottom" );
// ADDING A BORDER TO THE MULTISPLITPANE CAUSES ALL SORTS OF ISSUES
msp.setBorder( BorderFactory.createEmptyBorder( 4, 4, 4, 4 ) );
add( msp, BorderLayout.CENTER );
}
示例2: createContents
import org.jdesktop.swingx.JXMultiSplitPane; //导入方法依赖的package包/类
private Component createContents() {
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
JXMultiSplitPane msp = new JXMultiSplitPane();
// @formatter:off
TestProperty.propertyStore.setIfNull("ui.layout", "(COLUMN (ROW (LEAF name=componentTree weight=1.0) "
+ "(LEAF name=editor )) " + "(ROW (LEAF name=properties weight=0.8) " + "(LEAF name=preview weight=0.05)))");
String layoutDef = TestProperty.propertyStore.get("ui.layout");
// @formatter:on
MultiSplitLayout.Node modelRoot = MultiSplitLayout.parseModel(layoutDef);
msp.getMultiSplitLayout().setModel(modelRoot);
componentTreePane = new ComponentTreePane(this);
editorPane = new EditorPane(this);
propertyPane = new PropertyPane(this);
previewPane = new PreviewPane(this);
msp.add(componentTreePane, "componentTree");
msp.add(editorPane, "editor");
msp.add(propertyPane, "properties");
msp.add(previewPane, "preview");
// adding a border to the multiplane causes all sorts of issues
msp.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
panel.add(msp, BorderLayout.CENTER);
pack();
return panel;
}