本文整理了Java中javax.swing.JSplitPane.getLastDividerLocation()
方法的一些代码示例,展示了JSplitPane.getLastDividerLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSplitPane.getLastDividerLocation()
方法的具体详情如下:
包路径:javax.swing.JSplitPane
类名称:JSplitPane
方法名:getLastDividerLocation
暂无
代码示例来源:origin: antlr/antlrworks
private void makeBottomTabVisible() {
if(horizontalSplit.getBottomComponent().getHeight() == 0) {
horizontalSplit.setDividerLocation(horizontalSplit.getLastDividerLocation());
}
}
代码示例来源: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: 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: MegaMek/mekhq
public void focusOnUnit(UUID id) {
HangarTab ht = (HangarTab)getTab(GuiTabType.HANGAR);
if (null == id || null == ht) {
return;
}
if (mainPanel.getDividerLocation() < 700) {
if (mainPanel.getLastDividerLocation() > 700) {
mainPanel
.setDividerLocation(mainPanel.getLastDividerLocation());
} else {
mainPanel.resetToPreferredSizes();
}
}
ht.focusOnUnit(id);
tabMain.setSelectedIndex(getTabIndexByName(resourceMap
.getString("panHangar.TabConstraints.tabTitle")));
}
代码示例来源:origin: MegaMek/mekhq
public void focusOnPerson(UUID id) {
if (null == id) {
return;
}
PersonnelTab pt = (PersonnelTab)getTab(GuiTabType.PERSONNEL);
if (pt == null) {
return;
}
if (mainPanel.getDividerLocation() < 700) {
if (mainPanel.getLastDividerLocation() > 700) {
mainPanel
.setDividerLocation(mainPanel.getLastDividerLocation());
} else {
mainPanel.resetToPreferredSizes();
}
}
pt.focusOnPerson(id);
tabMain.setSelectedComponent(pt);
}
代码示例来源:origin: freeplane/freeplane
private void saveSplitPanePosition() {
if (mSplitPane == null) {
return;
}
if ("right".equals(mLocationPreferenceValue)) {
resourceController.setProperty(SPLIT_PANE_RIGHT_POSITION, "" + mSplitPane.getDividerLocation());
resourceController.setProperty(SPLIT_PANE_LAST_RIGHT_POSITION, "" + mSplitPane.getLastDividerLocation());
}
else if ("left".equals(mLocationPreferenceValue)) {
resourceController.setProperty(SPLIT_PANE_LEFT_POSITION, "" + mSplitPane.getDividerLocation());
resourceController.setProperty(SPLIT_PANE_LAST_LEFT_POSITION, "" + mSplitPane.getLastDividerLocation());
}
else if ("top".equals(mLocationPreferenceValue)) {
resourceController.setProperty(SPLIT_PANE_TOP_POSITION, "" + mSplitPane.getDividerLocation());
resourceController.setProperty(SPLIT_PANE_LAST_TOP_POSITION, "" + mSplitPane.getLastDividerLocation());
}
else { // "bottom".equals(mLocationPreferenceValue) also covered
resourceController.setProperty(SPLIT_PANE_POSITION, "" + mSplitPane.getDividerLocation());
resourceController.setProperty(SPLIT_PANE_LAST_POSITION, "" + mSplitPane.getLastDividerLocation());
}
}
代码示例来源:origin: MegaMek/mekhq
public void focusOnUnitInRepairBay(UUID id) {
if (null == id) {
return;
}
if (getTab(GuiTabType.REPAIR) != null) {
if (mainPanel.getDividerLocation() < 700) {
if (mainPanel.getLastDividerLocation() > 700) {
mainPanel
.setDividerLocation(mainPanel.getLastDividerLocation());
} else {
mainPanel.resetToPreferredSizes();
}
}
((RepairTab)getTab(GuiTabType.REPAIR)).focusOnUnit(id);
tabMain.setSelectedComponent(getTab(GuiTabType.REPAIR));
}
}
代码示例来源:origin: stackoverflow.com
System.out.println(sp.getLastDividerLocation());
restoreDefaults();
代码示例来源:origin: org.orbisgis/orbisgis-omanager
if(hidden) {
bundleDetailsAndActions.setVisible(true);
int lastSize = splitPane.getLastDividerLocation();
if(lastSize >= getWidth() - bundleDetailsAndActions.getMinimumSize().width) {
lastSize = -1;
内容来源于网络,如有侵权,请联系作者删除!