public double[] getDividerFractions() { int[] dividerLocations = centerSplitPane.getDividerLocations(); double h = centerSplitPane.getHeight(); double[] dividerFractions = new double[dividerLocations.length]; for (int i = 0; i < dividerLocations.length; i++) { dividerFractions[i] = dividerLocations[i] / h; } return dividerFractions; }
public void setDividerFractions(double[] fractions) { int[] dividerLocations = new int[fractions.length]; double h = centerSplitPane.getHeight(); for (int i = 0; i < fractions.length; i++) { dividerLocations[i] = (int) Math.round(h * fractions[i]); } centerSplitPane.setDividerLocations(dividerLocations); }
public void run() { // TODO Resize the data panel to make as much space as possible int h = centerSplitPane.getHeight(); int nPanes = centerSplitPane.getPaneCount(); double prefHeight = 0; for (int i = 0; i < nPanes; i++) { prefHeight += centerSplitPane.getPaneAt(i).getPreferredSize().getHeight(); } double ratio = h / prefHeight; int pos = 0; for (int i = 0; i < nPanes - 1; i++) { pos += (int) (ratio * centerSplitPane.getPaneAt(i).getPreferredSize().getHeight()); centerSplitPane.setDividerLocation(i, pos); } } });
public void reorderPanels(java.util.List<String> names) { int h = centerSplitPane.getHeight(); int[] dividerLocations = centerSplitPane.getDividerLocations(); Map<String, Integer> panelHeights = new HashMap();
maxLocation = _jideSplitPane.getHeight() - modelDownHeight - (int) getSize().getHeight(); if (maxLocation < minLocation) minLocation = maxLocation = 0;
int htotal = centerSplitPane.getHeight(); int y = 0; int i = 0;
return getOrientation() == HORIZONTAL_SPLIT ? getWidth() - getDividerSize() : getHeight() - getDividerSize();