本文整理汇总了Java中javax.swing.JSplitPane.setDividerSize方法的典型用法代码示例。如果您正苦于以下问题:Java JSplitPane.setDividerSize方法的具体用法?Java JSplitPane.setDividerSize怎么用?Java JSplitPane.setDividerSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JSplitPane
的用法示例。
在下文中一共展示了JSplitPane.setDividerSize方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例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(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);
}
示例3: 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);
}
示例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: 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;
}
示例6: tweakSplitPaneUI
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void tweakSplitPaneUI(JSplitPane splitPane) {
splitPane.setOpaque(false);
splitPane.setBorder(null);
splitPane.setDividerSize(3);
if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
return;
}
BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();
if (divider != null) {
divider.setBorder(null);
}
}
示例7: tweakSplitPaneUI
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private static void tweakSplitPaneUI(JSplitPane splitPane) {
splitPane.setOpaque(false);
splitPane.setBorder(null);
splitPane.setDividerSize(3);
if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
return;
}
BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();
if (divider != null) {
divider.setBorder(null);
}
}
示例8: 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);
}
示例9: adjustResultsPanel
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void adjustResultsPanel() {
JSplitPane contentPane = (JSplitPane) this.frame.getContentPane();
getResultsPanel().adjustVisibility();
if (getResultsPanel().isVisible()) {
contentPane.setBottomComponent(getResultsPanel());
contentPane.setDividerSize(1);
contentPane.resetToPreferredSizes();
} else {
contentPane.remove(getResultsPanel());
contentPane.setDividerSize(0);
}
}
示例10: createUnderPane
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private JSplitPane createUnderPane(JTree tree) {
JTextArea toStringArea = new JTextArea();
toStringArea.setLineWrap(true);
toStringArea.setEditable(false);
tree.addTreeSelectionListener(new ToStringListener(toStringArea));
JSplitPane result = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
new JScrollPane(tree),
new JScrollPane(toStringArea));
result.setOneTouchExpandable(true);
result.setDividerSize(8);
result.setDividerLocation(0.8);
return result;
}
示例11: initComponents
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void initComponents() {
setLayout(new BorderLayout());
String modeName = stationData.getTransitionModeName(stationKey, 0);
firingBorder = new TitledBorder(new EtchedBorder(), "Firing Outcome for " + modeName);
firingTable = new FiringOutcomeTable();
firingPane = new JScrollPane(firingTable);
firingPane.setBorder(firingBorder);
firingPane.setMinimumSize(new Dimension(300, 240));
leftPanel = new WarningScrollTable(firingPane, WARNING_CLASS_OUTGOING_ROUTING);
leftPanel.addCheckVector(stationOutKeys);
leftPanel.addCheckVector(classKeys);
addModeButton = new JButton("Add Mode");
addModeButton.setMinimumSize(DIM_BUTTON_M);
modeTable = new ModeTable();
JPanel modePanel = new JPanel(new BorderLayout(5, 5));
modePanel.setBorder(new TitledBorder(new EtchedBorder(), "Modes"));
modePanel.setMinimumSize(new Dimension(200, 120));
modePanel.add(addModeButton, BorderLayout.NORTH);
modePanel.add(new JScrollPane(modeTable), BorderLayout.CENTER);
noticeText = new JTextArea("");
noticeText.setOpaque(false);
noticeText.setEditable(false);
noticeText.setLineWrap(true);
noticeText.setWrapStyleWord(true);
JScrollPane noticePane = new JScrollPane(noticeText);
noticePane.setBorder(new TitledBorder(new EtchedBorder(), "Notice"));
noticePane.setMinimumSize(new Dimension(200, 120));
JSplitPane rightPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
rightPanel.setBorder(new EmptyBorder(0, 0, 0, 0));
rightPanel.setDividerSize(4);
rightPanel.setResizeWeight(1.0);
rightPanel.setLeftComponent(modePanel);
rightPanel.setRightComponent(noticePane);
JSplitPane mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
mainPanel.setDividerSize(4);
mainPanel.setResizeWeight(1.0);
mainPanel.setLeftComponent(leftPanel);
mainPanel.setRightComponent(rightPanel);
add(mainPanel);
}
示例12: initComponents
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void initComponents() {
setLayout(new BorderLayout());
String modeName = stationData.getTransitionModeName(stationKey, 0);
enablingBorder = new TitledBorder(new EtchedBorder(), "Enabling Condition for " + modeName);
enablingTable = new ConditionTable(true);
enablingPane = new JScrollPane(enablingTable);
enablingPane.setBorder(enablingBorder);
enablingPane.setMinimumSize(new Dimension(300, 120));
inhibitingBorder = new TitledBorder(new EtchedBorder(), "Inhibiting Condition for " + modeName);
inhibitingTable = new ConditionTable(false);
inhibitingPane = new JScrollPane(inhibitingTable);
inhibitingPane.setBorder(inhibitingBorder);
inhibitingPane.setMinimumSize(new Dimension(300, 120));
JPanel conditionPanel = new JPanel(new GridLayout(2, 1, 3, 3));
conditionPanel.add(enablingPane);
conditionPanel.add(inhibitingPane);
leftPanel = new WarningScrollTable(conditionPanel, WARNING_CLASS_INCOMING_ROUTING);
leftPanel.addCheckVector(stationInKeys);
leftPanel.addCheckVector(classKeys);
addModeButton = new JButton("Add Mode");
addModeButton.setMinimumSize(DIM_BUTTON_M);
modeTable = new ModeTable();
JPanel modePanel = new JPanel(new BorderLayout(5, 5));
modePanel.setBorder(new TitledBorder(new EtchedBorder(), "Modes"));
modePanel.setMinimumSize(new Dimension(200, 120));
modePanel.add(addModeButton, BorderLayout.NORTH);
modePanel.add(new JScrollPane(modeTable), BorderLayout.CENTER);
noticeText = new JTextArea("");
noticeText.setOpaque(false);
noticeText.setEditable(false);
noticeText.setLineWrap(true);
noticeText.setWrapStyleWord(true);
JScrollPane noticePane = new JScrollPane(noticeText);
noticePane.setBorder(new TitledBorder(new EtchedBorder(), "Notice"));
noticePane.setMinimumSize(new Dimension(200, 120));
JSplitPane rightPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
rightPanel.setBorder(new EmptyBorder(0, 0, 0, 0));
rightPanel.setDividerSize(4);
rightPanel.setResizeWeight(1.0);
rightPanel.setLeftComponent(modePanel);
rightPanel.setRightComponent(noticePane);
JSplitPane mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
mainPanel.setDividerSize(4);
mainPanel.setResizeWeight(1.0);
mainPanel.setLeftComponent(leftPanel);
mainPanel.setRightComponent(rightPanel);
add(mainPanel);
}
示例13: initComponents
import javax.swing.JSplitPane; //导入方法依赖的package包/类
protected void initComponents() {
this.setLayout(new BorderLayout());
gPaneAdvanced = new JRootPane();
gPaneStandard = new JRootPane();
forkStrategiesPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
forkStrategiesPane.setDividerSize(4);
forkStrategiesPane.setBorder(new EmptyBorder(0, 0, 0, 0));
forkStrategiesPane.setResizeWeight(1.0);
JSplitPane leftPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
leftPane.setDividerSize(3);
leftPane.setBorder(new EmptyBorder(0, 0, 0, 0));
leftPane.setResizeWeight(0.65);
WarningScrollTable jsp = new WarningScrollTable(forkStrategies, WARNING_CLASS);
jsp.setBorder(new TitledBorder(new EtchedBorder(), "Advanced Fork Strategies"));
jsp.setMinimumSize(new Dimension(200, 100));
descrTextPane = new JTextArea("");
descrTextPane.setOpaque(false);
descrTextPane.setEditable(false);
descrTextPane.setLineWrap(true);
descrTextPane.setWrapStyleWord(true);
descrPane.setBorder(new TitledBorder(new EtchedBorder(), "Description"));
descrPane.setViewportView(descrTextPane);
leftPane.setLeftComponent(jsp);
leftPane.setRightComponent(descrPane);
forkStrategiesPane.setLeftComponent(leftPane);
forkProbEditor.setMinimumSize(new Dimension(225, 100));
forkStrategiesPane.setRightComponent(forkProbEditor);
gPaneAdvanced.getContentPane().add(forkStrategiesPane);
gPaneAdvanced.setGlassPane(new GlassPane());
gPaneAdvanced.getGlassPane().setVisible(sd.getIsSimplifiedFork(stationKey));
//layout of fragNum panel
JPanel fragnum = new JPanel();
fragnum.setLayout(new BorderLayout());
fragnum.setBorder(new TitledBorder(new EtchedBorder(), "Standard Fork Strategy"));
useSim.setText("Enable Advanced Fork Strategies");
JLabel text = new JLabel("Number of tasks to be generated on each output link for each input job (customer) to the Fork:");
text.setLabelFor(numForkSpinner);
JPanel forkDegreePane = new JPanel();
forkDegreePane.add(text);
forkDegreePane.add(numForkSpinner);
fragnum.add(forkDegreePane, BorderLayout.NORTH);
gPaneStandard.getContentPane().add(fragnum);
gPaneStandard.setGlassPane(new GlassPane());
gPaneStandard.getGlassPane().setVisible(!sd.getIsSimplifiedFork(stationKey));
useSim.setSelected(!sd.getIsSimplifiedFork(stationKey));
numForkSpinner.setEnabled(sd.getIsSimplifiedFork(stationKey));
useSim.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
boolean isSim = !useSim.isSelected();
sd.setIsSimplifiedFork(stationKey, isSim);
numForkSpinner.setEnabled(isSim);
gPaneAdvanced.getGlassPane().setVisible(isSim);
gPaneStandard.getGlassPane().setVisible(!isSim);
}
});
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout());
mainPanel.add(gPaneStandard, BorderLayout.NORTH);
mainPanel.add(gPaneAdvanced, BorderLayout.CENTER);
add(useSim, BorderLayout.NORTH);
add(mainPanel, BorderLayout.CENTER);
}
示例14: init
import javax.swing.JSplitPane; //导入方法依赖的package包/类
public void init(){
JFrame.setDefaultLookAndFeelDecorated(true);
f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setPreferredSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT));
f.setTitle("群控");
f.setResizable(true);
f.setLocationRelativeTo(null);
jpControl = new JPanel();
jbSendZone = new JButton("发送朋友圈");
jpControl.add(jbSendZone);
jpDevice = new JPanel();
// jpDevice.setLayout(new FlowLayout(FlowLayout.LEADING, 20, 5));
jpDevice.setLayout(new WrapLayout(WrapLayout.LEFT));
Iterator<Entry<String, Thread>> iter = Devices.devices.entrySet().iterator();
int port = 1313, count=0;
while(iter.hasNext()){
Map.Entry<String, Thread> entry = (Map.Entry<String, Thread>)iter.next();
String serial = entry.getKey();
JPanel jp = new JPanel();
DrawImageThread dit = new DrawImageThread(serial, port++, jp);
dit.start(); //启动绘制线程
entry.setValue(dit); //在device list中保存线程句柄
count++;
jpDevice.add(jp);
}
jspDevice = new JScrollPane(jpDevice);
jspDevice.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jsp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, jpControl, jspDevice);
jsp.setDividerLocation(0.3);
jsp.setDividerSize(10);
jsp.setOneTouchExpandable(true);
f.add(jsp);
f.pack();
f.setVisible(true);
}