/** * Invokes the <code>getDividerLocation</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public int getDividerLocation(JSplitPane a) { int returnValue = ((SplitPaneUI) (uis.elementAt(0))).getDividerLocation(a); for (int i = 1; i < uis.size(); i++) { ((SplitPaneUI) (uis.elementAt(i))).getDividerLocation(a); } return returnValue; }
/** * Invokes the <code>getMinimumDividerLocation</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public int getMinimumDividerLocation(JSplitPane a) { int returnValue = ((SplitPaneUI) (uis.elementAt(0))).getMinimumDividerLocation(a); for (int i = 1; i < uis.size(); i++) { ((SplitPaneUI) (uis.elementAt(i))).getMinimumDividerLocation(a); } return returnValue; }
/** * Invokes the <code>getMaximumDividerLocation</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public int getMaximumDividerLocation(JSplitPane a) { int returnValue = ((SplitPaneUI) (uis.elementAt(0))).getMaximumDividerLocation(a); for (int i = 1; i < uis.size(); i++) { ((SplitPaneUI) (uis.elementAt(i))).getMaximumDividerLocation(a); } return returnValue; }
/** * Maps {@code JSplitPane.getUI()} through queue */ public SplitPaneUI getUI() { return (runMapping(new MapAction<SplitPaneUI>("getUI") { @Override public SplitPaneUI map() { return ((JSplitPane) getSource()).getUI(); } })); }
/** * Maps {@code JSplitPane.setUI(SplitPaneUI)} through queue */ public void setUI(final SplitPaneUI splitPaneUI) { runMapping(new MapVoidAction("setUI") { @Override public void map() { ((JSplitPane) getSource()).setUI(splitPaneUI); } }); }
public void resetToPreferredSizes() { SplitPaneUI ui = getUI(); if (ui != null) { ui.resetToPreferredSizes(this); } }
public int getMinimumDividerLocation() { SplitPaneUI ui = getUI(); if (ui != null) { return ui.getMinimumDividerLocation(this); } return -1; }
public int getMaximumDividerLocation() { SplitPaneUI ui = getUI(); if (ui != null) { return ui.getMaximumDividerLocation(this); } return -1; }
/** * This method returns the maximum divider location. This method is passed * to the UI. * * @return DOCUMENT ME! */ public int getMaximumDividerLocation() { if (ui != null) return ((SplitPaneUI) ui).getMaximumDividerLocation(this); else return -1; }
/** * This method returns the minimum divider location. This method is passed * to the UI. * * @return The minimum divider location. */ public int getMinimumDividerLocation() { if (ui != null) return ((SplitPaneUI) ui).getMinimumDividerLocation(this); else return -1; }
/** * This method overrides JComponent's paintChildren so the UI can be * messaged when the children have finished painting. * * @param g The Graphics object to paint with. */ protected void paintChildren(Graphics g) { super.paintChildren(g); if (ui != null) ((SplitPaneUI) ui).finishedPaintingChildren(this, g); }
/** * This method sets the location of the divider. * * @param location The location of the divider. The negative value forces to * compute the new location from the preferred sizes of the split * pane components. */ public void setDividerLocation(int location) { int oldLocation = dividerLocation; dividerLocation = location; SplitPaneUI ui = getUI(); if (ui != null) ui.setDividerLocation(this, location); firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation, location); }
/** * Calls the {@link SplitPaneUI#resetToPreferredSizes(JSplitPane)} method * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>. * * @param pane the component. */ public void resetToPreferredSizes(JSplitPane pane) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); ui.resetToPreferredSizes(pane); } }
/** * Calls the {@link SplitPaneUI#setDividerLocation(JSplitPane, int)} method * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>. * * @param pane the component. * @param location the location. */ public void setDividerLocation(JSplitPane pane, int location) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); ui.setDividerLocation(pane, location); } }
/** * Calls the {@link SplitPaneUI#finishedPaintingChildren(JSplitPane, * Graphics)} method for all the UI delegates managed by this * <code>MultiSplitPaneUI</code>. * * @param pane the component. * @param g the graphics device. */ public void finishedPaintingChildren(JSplitPane pane, Graphics g) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); ui.finishedPaintingChildren(pane, g); } }