📄 multisplitpaneui.java
字号:
Iterator iterator = uis.iterator(); // first UI delegate provides the return value if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); } // return values from auxiliary UI delegates are ignored while (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); /* Dimension ignored = */ ui.getMinimumSize(c); } return result; } /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all * the UI delegates managed by this <code>MultiSplitPaneUI</code>, * returning the maximum size for the UI delegate from the primary look and * feel. * * @param c the component. * * @return The maximum size returned by the UI delegate from the primary * look and feel. */ public Dimension getMaximumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); } // return values from auxiliary UI delegates are ignored while (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); /* Dimension ignored = */ ui.getMaximumSize(c); } return result; } /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>, * returning the count for the UI delegate from the primary look and * feel. * * @param c the component. * * @return The count returned by the UI delegate from the primary * look and feel. */ public int getAccessibleChildrenCount(JComponent c) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); } // return values from auxiliary UI delegates are ignored while (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); /* int ignored = */ ui.getAccessibleChildrenCount(c); } return result; } /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>, * returning the child for the UI delegate from the primary look and * feel. * * @param c the component * @param i the child index. * * @return The child returned by the UI delegate from the primary * look and feel. */ public Accessible getAccessibleChild(JComponent c, int i) { Accessible result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); } // return values from auxiliary UI delegates are ignored while (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); /* Accessible ignored = */ ui.getAccessibleChild(c, i); } return result; } /** * 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#getDividerLocation(JSplitPane)} method for all * the UI delegates managed by this <code>MultiSplitPaneUI</code>, * returning the location for the UI delegate from the primary look and * feel. * * @param pane the component. * * @return The location returned by the UI delegate from the primary * look and feel. */ public int getDividerLocation(JSplitPane pane) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value if (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); result = ui.getDividerLocation(pane); } // return values from auxiliary UI delegates are ignored while (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); /* int ignored = */ ui.getDividerLocation(pane); } return result; } /** * Calls the {@link SplitPaneUI#getMinimumDividerLocation(JSplitPane)} method * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>, * returning the location for the UI delegate from the primary look and * feel. * * @param pane the component. * * @return The location returned by the UI delegate from the primary * look and feel. */ public int getMinimumDividerLocation(JSplitPane pane) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value if (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); result = ui.getMinimumDividerLocation(pane); } // return values from auxiliary UI delegates are ignored while (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); /* int ignored = */ ui.getMinimumDividerLocation(pane); } return result; } /** * Calls the {@link SplitPaneUI#getMaximumDividerLocation(JSplitPane)} method * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>, * returning the location for the UI delegate from the primary look and * feel. * * @param pane the component. * * @return The location returned by the UI delegate from the primary * look and feel. */ public int getMaximumDividerLocation(JSplitPane pane) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value if (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); result = ui.getMaximumDividerLocation(pane); } // return values from auxiliary UI delegates are ignored while (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); /* int ignored = */ ui.getMaximumDividerLocation(pane); } return result; } /** * 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); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -