本文整理汇总了Java中javax.swing.JSplitPane.setLeftComponent方法的典型用法代码示例。如果您正苦于以下问题:Java JSplitPane.setLeftComponent方法的具体用法?Java JSplitPane.setLeftComponent怎么用?Java JSplitPane.setLeftComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JSplitPane
的用法示例。
在下文中一共展示了JSplitPane.setLeftComponent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initGui
import javax.swing.JSplitPane; //导入方法依赖的package包/类
protected TreeView initGui () {
TTW retVal = new TTW () ;
split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT);
PropertySheetView propertyView = new PropertySheetView();
split.setLeftComponent(retVal);
split.setRightComponent(propertyView);
// install proper border for split pane
split.setBorder((Border)UIManager.get("Nb.ScrollPane.border")); // NOI18N
setLayout (new java.awt.GridBagLayout ());
GridBagConstraints gridBagConstraints = new GridBagConstraints ();
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.gridwidth = 2;
add (split, gridBagConstraints);
return retVal;
}
示例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);
jsp.setBorder(new TitledBorder(new EtchedBorder(), "Routing Strategies"));
mainPanel.setResizeWeight(1.0);
jsp.setMinimumSize(new Dimension(200, 100));
mainPanel.setLeftComponent(jsp);
routingProbEditor.setMinimumSize(new Dimension(225, 100));
mainPanel.setRightComponent(routingProbEditor);
add(mainPanel, BorderLayout.CENTER);
}
示例5: setup_child_split_pane_left
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void setup_child_split_pane_left(final JSplitPane split_pane) {
JScrollPane quantum_system_scroll_pane = new JScrollPane();
split_pane.setLeftComponent(quantum_system_scroll_pane);
JPanel quantum_system_panel = new JPanel();
quantum_system_scroll_pane.setViewportView(quantum_system_panel);
qubit_table = new QubitTable(gate_table_row_height);
GridBagConstraints gbc_qubit_table = new GridBagConstraints();
gbc_qubit_table.gridx = 0;
gbc_qubit_table.gridy = 0;
quantum_system_panel.add(qubit_table, gbc_qubit_table);
gate_table = new GateTable(gate_table_cell_size, gate_table_row_height, frame);
GridBagConstraints gbc_gate_table = new GridBagConstraints();
gbc_gate_table.gridx = 1;
gbc_gate_table.gridy = 0;
quantum_system_panel.add(gate_table, gbc_gate_table);
GridBagLayout gbl_quantum_system_panel = new GridBagLayout();
gbl_quantum_system_panel.columnWidths = new int[]{qubit_table.getWidth(), gate_table.getWidth(), 0};
gbl_quantum_system_panel.rowHeights = new int[]{qubit_table.getHeight(), 0};
gbl_quantum_system_panel.columnWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
gbl_quantum_system_panel.rowWeights = new double[]{0.0, Double.MIN_VALUE};
quantum_system_panel.setLayout(gbl_quantum_system_panel);
}
示例6: 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);
}
示例7: initAssetsComponent
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private static Component initAssetsComponent() {
JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
AssetTree tree = new AssetTree();
split.setLeftComponent(tree);
assetPanel = new AssetPanel();
JScrollPane scrollPane = new JScrollPane(assetPanel);
split.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, evt -> userPreferences.setAssetsSplitter(split.getDividerLocation()));
split.setDividerLocation(userPreferences.getMainSplitterPosition() != 0 ? userPreferences.getAssetsSplitter() : 200);
split.setRightComponent(scrollPane);
return split;
}
示例8: addComponentsToContainer
import javax.swing.JSplitPane; //导入方法依赖的package包/类
/** Adds real components to given container (according to layout
* constraints stored for the components).
* @param container instance of a real container to be added to
* @param containerDelegate effective container delegate of the container
* @param components components to be added
* @param index position at which to add the components to container
*/
@Override
public void addComponentsToContainer(Container container,
Container containerDelegate,
Component[] components,
int index)
{
if (!(container instanceof JSplitPane))
return;
for (int i=0; i < components.length; i++) {
JSplitPane splitPane = (JSplitPane) container;
int descPos = convertPosition(getConstraints(i + index));
if (descPos == 0) {
if(splitPane.getClientProperty(LEFT_TOP_BUTTON)==null) {
// store the defaul swing button, so we can fall back to it
// if component[i] will be removed later...
splitPane.putClientProperty(LEFT_TOP_BUTTON, splitPane.getLeftComponent());
}
splitPane.setLeftComponent(components[i]);
}
else if (descPos == 1) {
if(splitPane.getClientProperty(RIGHT_BOTTOM_BUTTON)==null) {
// store the defaul swing button, so we can fall back to it
// if component[i] will be removed later...
splitPane.putClientProperty(RIGHT_BOTTOM_BUTTON, splitPane.getRightComponent());
}
splitPane.setRightComponent(components[i]);
}
}
}
示例9: initialize
import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
setLayout(new BorderLayout());
this.setSize(new Dimension(441, 231));
JSplitPane splitPane = new JSplitPane();
this.add(splitPane, java.awt.BorderLayout.CENTER);
splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitPane.setDividerLocation(0.75d);
splitPane.setLeftComponent(getSelectRowPane());
splitPane.setRightComponent(getJPanel4());
}
示例10: initialize
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void initialize() {
this.setSize(615, 430);
final JSplitPane jsp = new JSplitPane();
jsp.setLeftComponent(createPnlParameter());
jsp.setRightComponent(createPnlArea());
jsp.setDividerSize(0);
jsp.setDividerLocation(201);
this.setContentPane(jsp);
this.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
示例11: 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;
}
示例12: 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);
}
示例13: RSFViewer2
import javax.swing.JSplitPane; //导入方法依赖的package包/类
public RSFViewer2(final Engine engine) {
this.engine = engine;
this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
this.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
try {
((FileIEngineImpl) engine.getDeligate()).close();
} catch (IOException e1) {
e1.printStackTrace();
}
System.exit(0);
}
});
this.setTitle("Ramus files viewer sample 2");
JSplitPane pane = new JSplitPane();
pane.setLeftComponent(createQualifiersList());
pane.setRightComponent(createTreeView());
this.setContentPane(pane);
this.pack();
this.setSize(800, 600);
this.setLocationRelativeTo(null);
}
示例14: setupPane
import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
* Adds content to the primary splitpane.
*/
private void setupPane() {
// Setup splitpane, will host main content such as the file tree and the
// tabbed panel which will hold classes and other menus.
JSplitPane splitPane = new JSplitPane();
splitPane.setResizeWeight(0.1);
splitPane.setOneTouchExpandable(true);
frame.getContentPane().add(splitPane, BorderLayout.CENTER);
splitPane.setLeftComponent(classTree);
splitPane.setRightComponent(tabs);
}
示例15: createGroupPanel
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private JComponent createGroupPanel() {
JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
groupTable = new JTable(groupModel) {
/**
*
*/
private static final long serialVersionUID = 5000667220319722662L;
public void changeSelection(int rowIndex, int columnIndex,
boolean toggle, boolean extend) {
super.changeSelection(rowIndex, columnIndex, toggle, extend);
qualifierModel.fireTableDataChanged();
deleteGroup.setEnabled(rowIndex >= 0);
}
};
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(groupTable);
pane.setLeftComponent(scrollPane);
JScrollPane pane2 = new JScrollPane();
qualifiersTable = new JTable(qualifierModel);
pane2.setViewportView(qualifiersTable);
pane.setRightComponent(pane2);
pane.setDividerLocation(400);
return pane;
}