本文整理汇总了Java中javax.swing.JSplitPane.setUI方法的典型用法代码示例。如果您正苦于以下问题:Java JSplitPane.setUI方法的具体用法?Java JSplitPane.setUI怎么用?Java JSplitPane.setUI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JSplitPane
的用法示例。
在下文中一共展示了JSplitPane.setUI方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSplitPane
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private JSplitPane createSplitPane(Component lower) {
JSplitPane pane = new JSplitPane();
if (firstSplit == null) {
firstSplit = Boolean.TRUE;
} else {
firstSplit = Boolean.FALSE;
}
pane.setRightComponent(lower);
pane.setOrientation(JSplitPane.VERTICAL_SPLIT);
pane.setContinuousLayout(true);
pane.setResizeWeight(1);
pane.setDividerLocation(0.80f);
pane.setBorder(BorderFactory.createEmptyBorder());
//Do not install our custom split pane UI on Nimbus L&F
if (!"Nimbus".equals(UIManager.getLookAndFeel().getID())) {
pane.setUI(PropUtils.createSplitPaneUI());
}
// #52188: default F6 behaviour doesn't make to much sense in NB
// property sheet and blocks NetBeans default F6
pane.getActionMap().getParent().remove("toggleFocus");
if( PropUtils.isAqua ) {
pane.setBackground( UIManager.getColor("NbExplorerView.background") ); //NOI18N
}
return pane;
}
示例2: run
import javax.swing.JSplitPane; //导入方法依赖的package包/类
public void run() {
SunToolkit.createNewAppContext();
if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()) {
throw new Error("shared traversal keys");
}
JSplitPane pane = new JSplitPane();
pane.setUI(this);
createFocusListener().focusGained(null); // allows actions
test(pane, "positiveIncrement", 3);
test(pane, "negativeIncrement", 0);
}