本文整理了Java中javax.swing.JSplitPane.doLayout()
方法的一些代码示例,展示了JSplitPane.doLayout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSplitPane.doLayout()
方法的具体详情如下:
包路径:javax.swing.JSplitPane
类名称:JSplitPane
方法名:doLayout
暂无
代码示例来源:origin: ron190/jsql-injection
@Override
public void doLayout() {
super.doLayout();
// increase divider width or height
BasicSplitPaneDivider divider = ((BasicSplitPaneUI) this.getUI()).getDivider();
Rectangle bounds = divider.getBounds();
if (this.orientation == HORIZONTAL_SPLIT) {
bounds.x -= this.dividerDragOffset;
bounds.width = this.dividerDragSize;
} else {
bounds.y -= this.dividerDragOffset;
bounds.height = this.dividerDragSize;
}
divider.setBounds(bounds);
}
代码示例来源:origin: mucommander/mucommander
/**
* Sets a width of a folders tree.
* @param width new width
*/
public void setTreeWidth(int width) {
if (!treeVisible) {
oldTreeWidth = width;
} else {
treeSplitPane.setDividerLocation(width);
treeSplitPane.doLayout();
}
}
代码示例来源:origin: de.richtercloud/flexdock-core
/**
* Overridden to ensure proper divider location on initial rendering.
* Sometimes, a split divider location is set as a proportion before the
* split pane itself has been fully realized in the container hierarchy.
* This results in a layout calculation based on a proportion of zero width
* or height, rather than the desired proportion of width or height after
* the split pane has been fully rendered. This method ensures that default
* {@code JSplitPane} layout behavior is deferred until after the initial
* dimensions of this split pane have been properly determined.
*
* @see java.awt.Container#doLayout()
* @see JSplitPane#setDividerLocation(double)
*/
@Override
public void doLayout() {
// if they setup the docking configuration while the application
// was first starting up, then the dividerLocation was calculated before
// the container tree was visible, sized, validated, etc, so it'll be
// stuck at zero. in that case, redetermine the divider location now
// that we have valid container bounds with which to work.
if (!isDividerSizeProperlyDetermined()) {
// make sure this can only run once so we don't get a StackOverflow
dividerLocDetermined = true;
setDividerLocation(initialDividerRatio);
}
// continue the layout
super.doLayout();
}
代码示例来源:origin: org.activecomponents.jadex/jadex-editor-bpmn
public void run()
{
final JSplitPane viewpane = (JSplitPane) tabpane.getSelectedComponent();
if (viewpane != null)
{
viewpane.repaint();
viewpane.revalidate();
viewpane.setDividerLocation(GuiConstants.GRAPH_PROPERTY_RATIO);
viewpane.doLayout();
panel.doLayout();
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
viewpane.revalidate();
viewpane.repaint();
}
});
}
}
};
代码示例来源:origin: stackoverflow.com
sp.doLayout();
内容来源于网络,如有侵权,请联系作者删除!