本文整理了Java中javax.swing.JSplitPane.setSize()
方法的一些代码示例,展示了JSplitPane.setSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSplitPane.setSize()
方法的具体详情如下:
包路径:javax.swing.JSplitPane
类名称:JSplitPane
方法名:setSize
暂无
代码示例来源:origin: magefree/mage
@Override
public void componentResized(ComponentEvent e) {
int width = ((JComponent) e.getSource()).getWidth();
int height = ((JComponent) e.getSource()).getHeight();
jLayeredBackgroundPane.setSize(width, height);
jSplitPane0.setSize(width, height);
if (height < storedHeight) {
pnlBattlefield.setSize(0, 200);
}
storedHeight = height;
sizeToScreen();
if (!initialized) {
String state = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_BIG_CARD_TOGGLED, null);
if (state != null && state.equals("down")) {
jSplitPane0.setDividerLocation(1.0);
}
initialized = true;
}
}
});
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) {
JLabel barLabel = new JLabel("bar");
JLabel fooLabel = new JLabel("foo");
barLabel.setMinimumSize(new Dimension(150,150));
fooLabel.setPreferredSize(new Dimension(50,50));
JSplitPane treeViewChatSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, fooLabel, barLabel);
treeViewChatSplitPane.setSize(500, 500);
treeViewChatSplitPane.setBorder(null);
treeViewChatSplitPane.setDividerSize(3);
JFrame frame = new JFrame();
frame.add(treeViewChatSplitPane, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(200,200);
frame.setVisible(true);
}
代码示例来源:origin: edu.utah.bmi.nlp/nlp-core
/**
* @see Component#setSize(Dimension)
*/
public void setSize(Dimension d) {
super.setSize(d);
Insets insets = getInsets();
Dimension paneSize = new Dimension(d.width - insets.left - insets.right, d.height - insets.top
- insets.bottom);
this.horizontalSplitPane.setPreferredSize(paneSize);
this.horizontalSplitPane.setSize(paneSize);
}
代码示例来源:origin: stackoverflow.com
splitPane.setSize(width, height);
splitPane.setDividerSize(0);
splitPane.setDividerLocation(150);
代码示例来源:origin: org.apache.uima/uimaj-tools
/**
* Sets the size.
*
* @param d the new size
* @see java.awt.Component#setSize(Dimension)
*/
@Override
public void setSize(Dimension d) {
super.setSize(d);
Insets insets = getInsets();
Dimension paneSize = new Dimension(d.width - insets.left - insets.right, d.height - insets.top
- insets.bottom);
this.horizontalSplitPane.setPreferredSize(paneSize);
this.horizontalSplitPane.setSize(paneSize);
}
代码示例来源:origin: org.apache.uima/uimaj-tools
/**
* Sets the size.
*
* @param d the new size
* @see java.awt.Component#setSize(Dimension)
*/
@Override
public void setSize(Dimension d) {
super.setSize(d);
Insets insets = getInsets();
Dimension paneSize = new Dimension(d.width - insets.left - insets.right, d.height - insets.top
- insets.bottom);
splitPane.setPreferredSize(paneSize);
splitPane.setSize(paneSize);
}
代码示例来源:origin: stackoverflow.com
jsp.setSize(new Dimension(400, 800));
代码示例来源:origin: mikaelhg/openblocks
public void componentResized(ComponentEvent e) {
miniMap.repositionMiniMap();
blockCanvas.reformBlockCanvas();
blockCanvasLayer.setSize(getSize());
blockCanvasLayer.validate();
}
});
内容来源于网络,如有侵权,请联系作者删除!