本文整理匯總了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);
}