本文整理了Java中javax.swing.JSplitPane.getMaximumDividerLocation()
方法的一些代码示例,展示了JSplitPane.getMaximumDividerLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSplitPane.getMaximumDividerLocation()
方法的具体详情如下:
包路径:javax.swing.JSplitPane
类名称:JSplitPane
方法名:getMaximumDividerLocation
暂无
代码示例来源:origin: pmd/pmd
frame.setLocation((screenWidth - frame.getWidth()) / 2, (screenHeight - frame.getHeight()) / 2);
frame.setVisible(true);
int horozontalMiddleLocation = controlSplitPane.getMaximumDividerLocation() * 3 / 5;
controlSplitPane.setDividerLocation(horozontalMiddleLocation);
containerSplitPane.setDividerLocation(containerSplitPane.getMaximumDividerLocation() / 2);
astAndSymbolTablePane.setDividerLocation(astAndSymbolTablePane.getMaximumDividerLocation() / 3);
resultsSplitPane.setDividerLocation(horozontalMiddleLocation);
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
private void setUnexpanded()
{
_splitPn.setDividerLocation(_splitPn.getMaximumDividerLocation() + 100);
}
代码示例来源:origin: realXuJiang/bigtable-sql
private void setUnexpanded()
{
_splitPn.setDividerLocation(_splitPn.getMaximumDividerLocation() + 100);
}
代码示例来源:origin: triplea-game/triplea
@Override
public void keyPressed(final KeyEvent e) {
if (e.isControlDown() && e.getKeyCode() == KeyEvent.VK_Z) {
if (gameCenterPanel.getDividerLocation() <= gameCenterPanel.getMaximumDividerLocation()) {
gameCenterPanel.setDividerLocation(1.0);
} else {
gameCenterPanel.setDividerLocation(gameCenterPanel.getLastDividerLocation());
}
}
}
};
代码示例来源:origin: abbot/abbot
/** Set the divider position proportionally. */
public void actionMoveDivider(Component c,
final double proportionalLocation) {
JSplitPane split = (JSplitPane)c;
int max = split.getMaximumDividerLocation();
int min = split.getMinimumDividerLocation();
int position = min + (int)((max - min) * proportionalLocation);
actionMoveDividerAbsolute(split, position);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer
/**
* Show element details.
*/
public void showElementDetails(Map element)
{
// Todo: better layout
this.details.setText(element.toString());
// Hack? to show detail panel.
if(content.getDividerLocation() > content.getMaximumDividerLocation())
content.setDividerLocation(content.getLastDividerLocation());
}
代码示例来源:origin: com.github.tornaia/aott-desktop-client-core
@Override
public void propertyChange(PropertyChangeEvent evt) {
int min = jSplitPane.getMinimumDividerLocation();
int max = jSplitPane.getMaximumDividerLocation();
int previous = lastDividerLocation.get();
int actual = jSplitPane.getDividerLocation();
boolean initial = lastDividerLocation.get() == -1;
boolean attachToTop = actual < (max - min) * 0.15D && previous > actual;
boolean attachToBottom = actual > (max - min) * 0.85D && actual > previous;
boolean detachFromTop = previous == min && actual > previous;
boolean detachFromBottom = previous == max && actual < previous;
if (!initial) {
if (attachToTop) {
jSplitPane.setDividerLocation(min);
jSplitPane.getTopComponent().setVisible(false);
} else if (detachFromTop) {
jSplitPane.setDividerLocation((int) ((max - min) * 0.15D));
jSplitPane.getTopComponent().setVisible(true);
} else if (attachToBottom) {
jSplitPane.setDividerLocation(max);
jSplitPane.getBottomComponent().setVisible(false);
} else if (detachFromBottom) {
jSplitPane.setDividerLocation((int) ((max - min) * 0.85D));
jSplitPane.getBottomComponent().setVisible(true);
}
}
lastDividerLocation.set(actual);
}
}
代码示例来源:origin: net.sourceforge.pmd/pmd-core
frame.setLocation((screenWidth - frame.getWidth()) / 2, (screenHeight - frame.getHeight()) / 2);
frame.setVisible(true);
int horozontalMiddleLocation = controlSplitPane.getMaximumDividerLocation() * 3 / 5;
controlSplitPane.setDividerLocation(horozontalMiddleLocation);
containerSplitPane.setDividerLocation(containerSplitPane.getMaximumDividerLocation() / 2);
astAndSymbolTablePane.setDividerLocation(astAndSymbolTablePane.getMaximumDividerLocation() / 3);
resultsSplitPane.setDividerLocation(horozontalMiddleLocation);
代码示例来源:origin: cpesch/RouteConverter
private void enableActions() {
ActionManager actionManager = getContext().getActionManager();
actionManager.enable("maximize-map", location < mapSplitPane.getMaximumDividerLocation() - 10);
actionManager.enable("maximize-positionlist", location > mapSplitPane.getMinimumDividerLocation() + 10);
actionManager.enable("show-map-and-positionlist", location == 1 || location > mapSplitPane.getMaximumDividerLocation() + tabbedPane.getMinimumSize().width - 1);
}
}
代码示例来源:origin: stackoverflow.com
if (collapse != (sp.getDividerLocation() > sp.getMaximumDividerLocation())) {
return;
内容来源于网络,如有侵权,请联系作者删除!