本文整理汇总了Java中javax.swing.JSplitPane.setResizeWeight方法的典型用法代码示例。如果您正苦于以下问题:Java JSplitPane.setResizeWeight方法的具体用法?Java JSplitPane.setResizeWeight怎么用?Java JSplitPane.setResizeWeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JSplitPane
的用法示例。
在下文中一共展示了JSplitPane.setResizeWeight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDisplayPanel
import javax.swing.JSplitPane; //导入方法依赖的package包/类
/** Lazily creates and returns the top-level display panel. */
private JSplitPane getDisplayPanel() {
JSplitPane result = this.displayPanel;
if (result == null) {
this.displayPanel = result = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
result.setTopComponent(getGraphPanel());
result.setBottomComponent(getErrorPanel());
result.setDividerSize(0);
result.setContinuousLayout(true);
result.setResizeWeight(0.9);
result.resetToPreferredSizes();
result.setBorder(null);
}
return result;
}
示例2: initComponents
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void initComponents() {
this.setLayout(new BorderLayout());
//building mainPanel
mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
mainPanel.setDividerSize(4);
mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
//layout of main panel
WarningScrollTable jsp = new WarningScrollTable(joinStrategies, WARNING_CLASS);
jsp.setBorder(new TitledBorder(new EtchedBorder(), "Join Strategies"));
mainPanel.setResizeWeight(1.0);
jsp.setMinimumSize(new Dimension(200, 100));
mainPanel.setLeftComponent(jsp);
joinEditor.setMinimumSize(new Dimension(225, 100));
mainPanel.setRightComponent(joinEditor);
add(mainPanel, BorderLayout.CENTER);
}
示例3: initComponents
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void initComponents() {
this.setLayout(new BorderLayout());
//building mainPanel
mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
mainPanel.setDividerSize(4);
mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
//layout of main panel
WarningScrollTable jsp = new WarningScrollTable(semaphoreStrategies, WARNING_CLASS);
jsp.setBorder(new TitledBorder(new EtchedBorder(), "Semaphore Strategies"));
mainPanel.setResizeWeight(1.0);
jsp.setMinimumSize(new Dimension(200, 100));
mainPanel.setLeftComponent(jsp);
semaphoreEditor.setMinimumSize(new Dimension(225, 100));
mainPanel.setRightComponent(semaphoreEditor);
add(mainPanel, BorderLayout.CENTER);
}
示例4: initComponents
import javax.swing.JSplitPane; //导入方法依赖的package包/类
protected void initComponents() {
this.setLayout(new BorderLayout());
//building mainPanel
mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
mainPanel.setDividerSize(4);
mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
//layout of main panel
WarningScrollTable jsp = new WarningScrollTable(routingStrategies, WARNING_CLASS);
//routing strategy selector on the left, routing probabilities editor on the right
jsp.setBorder(new TitledBorder(new EtchedBorder(), "Routing Strategies"));
mainPanel.setResizeWeight(.80); // Gives more space to left component
jsp.setMinimumSize(new Dimension(180, 100));
mainPanel.setLeftComponent(jsp);
routingProbEditor.setMinimumSize(new Dimension(160, 100));
mainPanel.setRightComponent(routingProbEditor);
add(mainPanel, BorderLayout.CENTER);
}
示例5: DatabaseViewer
import javax.swing.JSplitPane; //导入方法依赖的package包/类
public DatabaseViewer() {
selectedDatabaseViewer = new SelectedDatabaseViewer();
tablesViewer = new TablesViewer();
selectedTableViewer = new SelectedTableViewer();
setLayout(new BorderLayout());
JScrollPane tablesSP = new JScrollPane(tablesViewer);
tablesSP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
tablesSP.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true,
tablesSP, selectedTableViewer);
splitPane.setResizeWeight(SPLIT_WEIGHT);
selectedDatabaseViewer.setBorder(BorderFactory.createEmptyBorder(DBVIEWER_TOP_PADDING, 0, 0, 0));
add(selectedDatabaseViewer, BorderLayout.NORTH);
add(splitPane, BorderLayout.CENTER);
LineBorder lineBorderPanel = (LineBorder) BorderFactory.createLineBorder(PANEL_BORDER_COLOR);
setBorder(BorderFactory.createTitledBorder(lineBorderPanel, PANEL_TITLE));
setListeners();
}
示例6: buildDisplay
import javax.swing.JSplitPane; //导入方法依赖的package包/类
@Override
protected void buildDisplay() {
this.setLayout(new BorderLayout());
this.setFocusable(false);
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, getTabPane(),
new JScrollPane(getEditorPane()));
getEditorPane().setEditable(false);
splitPane.setOneTouchExpandable(true);
splitPane.setDividerLocation(0.8);
splitPane.setResizeWeight(0.8);
add(splitPane, BorderLayout.CENTER);
}
示例7: getDisplaysInfoPanel
import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
* Lazily creates and returns the split pane
* containing the displays and info panels.
*/
JSplitPane getDisplaysInfoPanel() {
JSplitPane result = this.displaysInfoPanel;
if (result == null) {
this.displaysInfoPanel = result = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
result.setLeftComponent(getDisplaysPanel());
result.setRightComponent(getDisplaysPanel().getInfoPanel());
result.setOneTouchExpandable(true);
result.setResizeWeight(1);
result.setDividerLocation(0.8);
result.setContinuousLayout(true);
result.setBorder(null);
ToolTipManager.sharedInstance()
.registerComponent(result);
}
return result;
}
示例8: init
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void init() {
setLayout(new BorderLayout());
projectNReusableTreeSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
projectNReusableTreeSplitPane.setOneTouchExpandable(true);
projectNReusableTreeSplitPane.setResizeWeight(0.5);
projectNReusableTreeSplitPane.setTopComponent(getTreeInPanel("Test Plan", testDesign.getProjectTree().getTree()));
appReusablePanel = getRTreeInPanel("Reusable Component", testDesign.getReusableTree().getTree());
projectNReusableTreeSplitPane.setBottomComponent(appReusablePanel);
testCaseNTestDataSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
testCaseNTestDataSplitPane.setOneTouchExpandable(true);
testCaseNTestDataSplitPane.setResizeWeight(0.5);
testCaseNTestDataSplitPane.setTopComponent(testDesign.getTestCaseComponent());
testCaseNTestDataSplitPane.setBottomComponent(testDesign.getTestDatacomp());
oneTwo = new JSplitPane();
oneTwo.setOneTouchExpandable(true);
oneTwo.setResizeWeight(0.25);
oneTwo.setLeftComponent(projectNReusableTreeSplitPane);
oneTwo.setRightComponent(testCaseNTestDataSplitPane);
oneThree = new JSplitPane();
oneThree.setOneTouchExpandable(true);
oneThree.setResizeWeight(0.8);
oneThree.setLeftComponent(oneTwo);
oneThree.setRightComponent(testDesign.getObjectRepo());
add(oneThree);
}
示例9: erzeugeAuflisterPanel
import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
* Erzeugt das Panel für die Anzeige der Kunden- und Medien-Tabelle, die
* durch eine Splittpane voneinander getrennt sind.
*
*/
private void erzeugeAuflisterPanel()
{
JPanel auflisterPanel = new JPanel();
_hauptPanel.add(auflisterPanel, BorderLayout.CENTER);
auflisterPanel.setLayout(new BorderLayout());
setNoSize(auflisterPanel);
auflisterPanel.setBackground(UIConstants.BACKGROUND_COLOR);
_auflisterSplitpane = new JSplitPane();
auflisterPanel.add(_auflisterSplitpane, BorderLayout.CENTER);
_auflisterSplitpane.setOrientation(JSplitPane.VERTICAL_SPLIT);
_auflisterSplitpane.setOneTouchExpandable(true);
_auflisterSplitpane.setDividerLocation(300);
setNoSize(_auflisterSplitpane);
_auflisterSplitpane.setContinuousLayout(true);
_auflisterSplitpane.setDoubleBuffered(true);
_auflisterSplitpane.setResizeWeight(0.5);
_auflisterSplitpane.setBackground(UIConstants.BACKGROUND_COLOR);
_auflisterSplitpane
.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
// Kundendarstellung
_auflisterSplitpane.add(_kundenauflisterPanel, JSplitPane.TOP);
// Mediendarstellung
_auflisterSplitpane.add(_medienauflisterPanel, JSplitPane.BOTTOM);
}
示例10: splitpane
import javax.swing.JSplitPane; //导入方法依赖的package包/类
/** Constructs a new SplitPane containing the two components given as arguments
* @param orientation - the orientation (HORIZONTAL_SPLIT or VERTICAL_SPLIT)
* @param first - the left component (if horizontal) or top component (if vertical)
* @param second - the right component (if horizontal) or bottom component (if vertical)
* @param initialDividerLocation - the initial divider location (in pixels)
*/
public static JSplitPane splitpane (int orientation, Component first, Component second, int initialDividerLocation) {
JSplitPane x = make(new JSplitPane(orientation, first, second), new EmptyBorder(0,0,0,0));
x.setContinuousLayout(true);
x.setDividerLocation(initialDividerLocation);
x.setOneTouchExpandable(false);
x.setResizeWeight(0.5);
if (Util.onMac() && (x.getUI() instanceof BasicSplitPaneUI)) {
boolean h = (orientation != JSplitPane.HORIZONTAL_SPLIT);
((BasicSplitPaneUI)(x.getUI())).getDivider().setBorder(new OurBorder(h,h,h,h)); // Makes the border look nicer on Mac OS X
}
return x;
}
示例11: buildMainPanel
import javax.swing.JSplitPane; //导入方法依赖的package包/类
protected Component buildMainPanel() {
JPanel keyPanel = buildKeyTablePanel();
/*
* Tree of all components from target component down
*/
JPanel treePanel = new JPanel(new BorderLayout());
MyTreeNode top = new MyTreeNode(target);
createNodes(top);
tree = new JTree(top);
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
tree.addTreeSelectionListener(this);
tree.setSelectionRow(0);
tree.setCellRenderer(new MyTreeCellRenderer());
JScrollPane treeScroll = new JScrollPane(tree, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
treePanel.add(treeScroll, BorderLayout.CENTER);
treePanel.setMinimumSize(new Dimension(400, 100));
treePanel.setPreferredSize(new Dimension(800, 300));
/*
* First split between Tree display and Keys
*/
JSplitPane split1 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, treePanel, keyPanel);
split1.setResizeWeight(0.5);
return split1;
}
示例12: create_main_split_pane
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private JSplitPane create_main_split_pane() {
JSplitPane main_split_pane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
main_split_pane.setResizeWeight(main_split_pane_resize_weight);
frame.getContentPane().add(main_split_pane);
return main_split_pane;
}
示例13: setup_main_split_pane_top
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private JSplitPane setup_main_split_pane_top(final JSplitPane split_pane) {
JSplitPane child_split_pane = new JSplitPane();
child_split_pane.setResizeWeight(child_split_pane_resize_weight);
split_pane.setLeftComponent(child_split_pane);
return child_split_pane;
}
示例14: createSplitPane
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private JSplitPane createSplitPane(int orientation, int location, boolean continuous, double resizeWeight, java.awt.Component component_a, java.awt.Component component_b) {
JSplitPane split = new JSplitPane(orientation, continuous, component_a, component_b);
split.setResizeWeight(resizeWeight);
split.setDividerLocation(location);
split.setOneTouchExpandable(true);
return split;
}
示例15: init
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void init() {
setLayout(new BorderLayout());
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
splitPane.setOneTouchExpandable(true);
splitPane.setBottomComponent(objectTable);
TreeSearch tSearch = TreeSearch.installForOR(objectTree.getTree());
splitPane.setTopComponent(tSearch);
splitPane.setResizeWeight(.5);
splitPane.setDividerLocation(.5);
add(splitPane);
}