diff options
Diffstat (limited to 'libjava/classpath/javax/swing/plaf/multi')
31 files changed, 2769 insertions, 2769 deletions
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiButtonUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiButtonUI.java index ac2a5fa918a..044f6514161 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiButtonUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiButtonUI.java @@ -53,32 +53,32 @@ import javax.swing.plaf.ComponentUI; * A UI delegate that that coordinates multiple {@link ButtonUI} instances, one * from the primary look and feel, and one or more from the auxiliary look and * feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiButtonUI extends ButtonUI +public class MultiButtonUI extends ButtonUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiButtonUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiButtonUI() + public MultiButtonUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiButtonUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiButtonUI extends ButtonUI MultiButtonUI mui = new MultiButtonUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiButtonUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiButtonUI extends ButtonUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiButtonUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiButtonUI extends ButtonUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiButtonUI</code>. The first item in the array is always + * <code>MultiButtonUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiButtonUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiButtonUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiButtonUI extends ButtonUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiButtonUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiButtonUI extends ButtonUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiButtonUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiButtonUI extends ButtonUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiButtonUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiButtonUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiButtonUI extends ButtonUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiButtonUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiButtonUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiButtonUI extends ButtonUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiButtonUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiButtonUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiButtonUI extends ButtonUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiButtonUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiButtonUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiButtonUI extends ButtonUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiButtonUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiButtonUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiButtonUI extends ButtonUI } return result; } - -}
\ No newline at end of file + +} diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiColorChooserUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiColorChooserUI.java index 8adb9500bb0..1a968492896 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiColorChooserUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiColorChooserUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ColorChooserUI; import javax.swing.plaf.ComponentUI; /** - * A UI delegate that that coordinates multiple {@link ColorChooserUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ColorChooserUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiColorChooserUI extends ColorChooserUI +public class MultiColorChooserUI extends ColorChooserUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiColorChooserUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiColorChooserUI() + public MultiColorChooserUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary - * look and feels support this component, a <code>MultiColorChooserUI</code> + * Creates a delegate object for the specified component. If any auxiliary + * look and feels support this component, a <code>MultiColorChooserUI</code> * is returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiColorChooserUI extends ColorChooserUI MultiColorChooserUI mui = new MultiColorChooserUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiColorChooserUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiColorChooserUI extends ColorChooserUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiColorChooserUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiColorChooserUI extends ColorChooserUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiColorChooserUI</code>. The first item in the array is always + * <code>MultiColorChooserUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiColorChooserUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiColorChooserUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiColorChooserUI extends ColorChooserUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiColorChooserUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiColorChooserUI extends ColorChooserUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiColorChooserUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiColorChooserUI extends ColorChooserUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiColorChooserUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiColorChooserUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiColorChooserUI extends ColorChooserUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiColorChooserUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiColorChooserUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiColorChooserUI extends ColorChooserUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiColorChooserUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiColorChooserUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiColorChooserUI extends ColorChooserUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiColorChooserUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiColorChooserUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiColorChooserUI extends ColorChooserUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiColorChooserUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiColorChooserUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiColorChooserUI extends ColorChooserUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiComboBoxUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiComboBoxUI.java index 33b432152bf..f1698739911 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiComboBoxUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiComboBoxUI.java @@ -51,35 +51,35 @@ import javax.swing.plaf.ComboBoxUI; import javax.swing.plaf.ComponentUI; /** - * A UI delegate that that coordinates multiple {@link ComboBoxUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ComboBoxUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiComboBoxUI extends ComboBoxUI +public class MultiComboBoxUI extends ComboBoxUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiComboBoxUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiComboBoxUI() + public MultiComboBoxUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary - * look and feels support this component, a <code>MultiComboBoxUI</code> + * Creates a delegate object for the specified component. If any auxiliary + * look and feels support this component, a <code>MultiComboBoxUI</code> * is returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -87,11 +87,11 @@ public class MultiComboBoxUI extends ComboBoxUI MultiComboBoxUI mui = new MultiComboBoxUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiComboBoxUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -105,9 +105,9 @@ public class MultiComboBoxUI extends ComboBoxUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiComboBoxUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -119,39 +119,39 @@ public class MultiComboBoxUI extends ComboBoxUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiComboBoxUI</code>. The first item in the array is always + * <code>MultiComboBoxUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiComboBoxUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiComboBoxUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -164,11 +164,11 @@ public class MultiComboBoxUI extends ComboBoxUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiComboBoxUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -183,9 +183,9 @@ public class MultiComboBoxUI extends ComboBoxUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiComboBoxUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -198,24 +198,24 @@ public class MultiComboBoxUI extends ComboBoxUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiComboBoxUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiComboBoxUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,25 +227,25 @@ public class MultiComboBoxUI extends ComboBoxUI /* Dimension ignored = */ ui.getPreferredSize(c); } return result; - } - + } + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiComboBoxUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiComboBoxUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -258,24 +258,24 @@ public class MultiComboBoxUI extends ComboBoxUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiComboBoxUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiComboBoxUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -288,24 +288,24 @@ public class MultiComboBoxUI extends ComboBoxUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiComboBoxUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiComboBoxUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -318,25 +318,25 @@ public class MultiComboBoxUI extends ComboBoxUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiComboBoxUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiComboBoxUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -349,15 +349,15 @@ public class MultiComboBoxUI extends ComboBoxUI } return result; } - + /** - * Calls the {@link ComboBoxUI#setPopupVisible(JComboBox, boolean)} method + * Calls the {@link ComboBoxUI#setPopupVisible(JComboBox, boolean)} method * for all the UI delegates managed by this <code>MultiComboBoxUI</code>. - * + * * @param c the component. * @param visible the visible state. */ - public void setPopupVisible(JComboBox c, boolean visible) + public void setPopupVisible(JComboBox c, boolean visible) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -368,21 +368,21 @@ public class MultiComboBoxUI extends ComboBoxUI } /** - * Calls the {@link ComboBoxUI#isPopupVisible(JComboBox)} method for all - * the UI delegates managed by this <code>MultiComboBoxUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComboBoxUI#isPopupVisible(JComboBox)} method for all + * the UI delegates managed by this <code>MultiComboBoxUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The result for the UI delegate from the primary look and feel. + * + * @return The result for the UI delegate from the primary look and feel. */ - public boolean isPopupVisible(JComboBox c) + public boolean isPopupVisible(JComboBox c) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComboBoxUI ui = (ComboBoxUI) iterator.next(); result = ui.isPopupVisible(c); @@ -397,23 +397,23 @@ public class MultiComboBoxUI extends ComboBoxUI } /** - * Calls the {@link ComboBoxUI#isFocusTraversable(JComboBox)} method for all - * the UI delegates managed by this <code>MultiComboBoxUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComboBoxUI#isFocusTraversable(JComboBox)} method for all + * the UI delegates managed by this <code>MultiComboBoxUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. - * + * * @return <code>true</code> if the combo box is traversable according to the - * UI delegate in the primary look and feel, and <code>false</code> - * otherwise. + * UI delegate in the primary look and feel, and <code>false</code> + * otherwise. */ - public boolean isFocusTraversable(JComboBox c) + public boolean isFocusTraversable(JComboBox c) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComboBoxUI ui = (ComboBoxUI) iterator.next(); result = ui.isFocusTraversable(c); diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java index 186ce32fe24..091566ecfa7 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.DesktopIconUI; /** - * A UI delegate that that coordinates multiple {@link DesktopIconUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link DesktopIconUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiDesktopIconUI extends DesktopIconUI +public class MultiDesktopIconUI extends DesktopIconUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiDesktopIconUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiDesktopIconUI() + public MultiDesktopIconUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiDesktopIconUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiDesktopIconUI extends DesktopIconUI MultiDesktopIconUI mui = new MultiDesktopIconUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiDesktopIconUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiDesktopIconUI extends DesktopIconUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiDesktopIconUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiDesktopIconUI extends DesktopIconUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiDesktopIconUI</code>. The first item in the array is always + * <code>MultiDesktopIconUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiDesktopIconUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiDesktopIconUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiDesktopIconUI extends DesktopIconUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiDesktopIconUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiDesktopIconUI extends DesktopIconUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiDesktopIconUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiDesktopIconUI extends DesktopIconUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiDesktopIconUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiDesktopIconUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -226,25 +226,25 @@ public class MultiDesktopIconUI extends DesktopIconUI /* Dimension ignored = */ ui.getPreferredSize(c); } return result; - } - + } + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiDesktopIconUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiDesktopIconUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiDesktopIconUI extends DesktopIconUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiDesktopIconUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiDesktopIconUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiDesktopIconUI extends DesktopIconUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiDesktopIconUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiDesktopIconUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiDesktopIconUI extends DesktopIconUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiDesktopIconUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiDesktopIconUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiDesktopIconUI extends DesktopIconUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java index d48fb2b0185..fb62257b81c 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.DesktopPaneUI; /** - * A UI delegate that that coordinates multiple {@link DesktopPaneUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link DesktopPaneUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiDesktopPaneUI extends DesktopPaneUI +public class MultiDesktopPaneUI extends DesktopPaneUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiDesktopPaneUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiDesktopPaneUI() + public MultiDesktopPaneUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiDesktopPaneUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiDesktopPaneUI extends DesktopPaneUI MultiDesktopPaneUI mui = new MultiDesktopPaneUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiDesktopPaneUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiDesktopPaneUI extends DesktopPaneUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiDesktopPaneUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiDesktopPaneUI extends DesktopPaneUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiDesktopPaneUI</code>. The first item in the array is always + * <code>MultiDesktopPaneUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiDesktopPaneUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiDesktopPaneUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiDesktopPaneUI extends DesktopPaneUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiDesktopPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiDesktopPaneUI extends DesktopPaneUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiDesktopPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiDesktopPaneUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiDesktopPaneUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiDesktopPaneUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiDesktopPaneUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiDesktopPaneUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiDesktopPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiDesktopPaneUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiDesktopPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiDesktopPaneUI extends DesktopPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiDesktopPaneUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiDesktopPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiDesktopPaneUI extends DesktopPaneUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiFileChooserUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiFileChooserUI.java index 719f0437497..2ab8841f9ec 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiFileChooserUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiFileChooserUI.java @@ -54,35 +54,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.FileChooserUI; /** - * A UI delegate that that coordinates multiple {@link FileChooserUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link FileChooserUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiFileChooserUI extends FileChooserUI +public class MultiFileChooserUI extends FileChooserUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiFileChooserUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiFileChooserUI() + public MultiFileChooserUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiFileChooserUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -90,11 +90,11 @@ public class MultiFileChooserUI extends FileChooserUI MultiFileChooserUI mui = new MultiFileChooserUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiFileChooserUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -108,9 +108,9 @@ public class MultiFileChooserUI extends FileChooserUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiFileChooserUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -122,39 +122,39 @@ public class MultiFileChooserUI extends FileChooserUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiFileChooserUI</code>. The first item in the array is always + * <code>MultiFileChooserUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiFileChooserUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -167,11 +167,11 @@ public class MultiFileChooserUI extends FileChooserUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiFileChooserUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -186,9 +186,9 @@ public class MultiFileChooserUI extends FileChooserUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiFileChooserUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -201,24 +201,24 @@ public class MultiFileChooserUI extends FileChooserUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiFileChooserUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -231,24 +231,24 @@ public class MultiFileChooserUI extends FileChooserUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiFileChooserUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -261,24 +261,24 @@ public class MultiFileChooserUI extends FileChooserUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiFileChooserUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -291,24 +291,24 @@ public class MultiFileChooserUI extends FileChooserUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiFileChooserUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -321,25 +321,25 @@ public class MultiFileChooserUI extends FileChooserUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiFileChooserUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -352,24 +352,24 @@ public class MultiFileChooserUI extends FileChooserUI } return result; } - + /** * Calls the {@link FileChooserUI#getAcceptAllFileFilter(JFileChooser)} method - * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the filter for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, + * returning the filter for the UI delegate from the primary look and + * feel. + * * @param chooser the file chooser. - * - * @return The filter returned by the UI delegate from the primary - * look and feel. + * + * @return The filter returned by the UI delegate from the primary + * look and feel. */ - public FileFilter getAcceptAllFileFilter(JFileChooser chooser) + public FileFilter getAcceptAllFileFilter(JFileChooser chooser) { FileFilter result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { FileChooserUI ui = (FileChooserUI) iterator.next(); result = ui.getAcceptAllFileFilter(chooser); @@ -385,21 +385,21 @@ public class MultiFileChooserUI extends FileChooserUI /** * Calls the {@link FileChooserUI#getFileView(JFileChooser)} method - * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the view for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, + * returning the view for the UI delegate from the primary look and + * feel. + * * @param chooser the file chooser. - * - * @return The view returned by the UI delegate from the primary - * look and feel. + * + * @return The view returned by the UI delegate from the primary + * look and feel. */ - public FileView getFileView(JFileChooser chooser) + public FileView getFileView(JFileChooser chooser) { FileView result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { FileChooserUI ui = (FileChooserUI) iterator.next(); result = ui.getFileView(chooser); @@ -415,21 +415,21 @@ public class MultiFileChooserUI extends FileChooserUI /** * Calls the {@link FileChooserUI#getApproveButtonText(JFileChooser)} method - * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the text for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, + * returning the text for the UI delegate from the primary look and + * feel. + * * @param chooser the file chooser. - * - * @return The text returned by the UI delegate from the primary - * look and feel. + * + * @return The text returned by the UI delegate from the primary + * look and feel. */ - public String getApproveButtonText(JFileChooser chooser) + public String getApproveButtonText(JFileChooser chooser) { String result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { FileChooserUI ui = (FileChooserUI) iterator.next(); result = ui.getApproveButtonText(chooser); @@ -445,21 +445,21 @@ public class MultiFileChooserUI extends FileChooserUI /** * Calls the {@link FileChooserUI#getDialogTitle(JFileChooser)} method - * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, - * returning the title for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiFileChooserUI</code>, + * returning the title for the UI delegate from the primary look and + * feel. + * * @param chooser the file chooser. - * - * @return The title returned by the UI delegate from the primary - * look and feel. + * + * @return The title returned by the UI delegate from the primary + * look and feel. */ - public String getDialogTitle(JFileChooser chooser) + public String getDialogTitle(JFileChooser chooser) { String result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { FileChooserUI ui = (FileChooserUI) iterator.next(); result = ui.getDialogTitle(chooser); @@ -474,13 +474,13 @@ public class MultiFileChooserUI extends FileChooserUI } /** - * Calls the {@link FileChooserUI#rescanCurrentDirectory(JFileChooser)} - * method for all the UI delegates managed by this + * Calls the {@link FileChooserUI#rescanCurrentDirectory(JFileChooser)} + * method for all the UI delegates managed by this * <code>MultiFileChooserUI</code>. - * + * * @param chooser the file chooser. */ - public void rescanCurrentDirectory(JFileChooser chooser) + public void rescanCurrentDirectory(JFileChooser chooser) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -491,14 +491,14 @@ public class MultiFileChooserUI extends FileChooserUI } /** - * Calls the {@link FileChooserUI#ensureFileIsVisible(JFileChooser, File)} - * method for all the UI delegates managed by this + * Calls the {@link FileChooserUI#ensureFileIsVisible(JFileChooser, File)} + * method for all the UI delegates managed by this * <code>MultiFileChooserUI</code>. - * + * * @param chooser the file chooser. * @param file the file. */ - public void ensureFileIsVisible(JFileChooser chooser, File file) + public void ensureFileIsVisible(JFileChooser chooser, File file) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java index 01d1df6a124..37b2ee3af26 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.InternalFrameUI; /** - * A UI delegate that that coordinates multiple {@link InternalFrameUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link InternalFrameUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiInternalFrameUI extends InternalFrameUI +public class MultiInternalFrameUI extends InternalFrameUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiInternalFrameUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiInternalFrameUI() + public MultiInternalFrameUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary - * look and feels support this component, a <code>MultiInternalFrameUI</code> + * Creates a delegate object for the specified component. If any auxiliary + * look and feels support this component, a <code>MultiInternalFrameUI</code> * is returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,12 +86,12 @@ public class MultiInternalFrameUI extends InternalFrameUI MultiInternalFrameUI mui = new MultiInternalFrameUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - - + + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiInternalFrameUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -105,9 +105,9 @@ public class MultiInternalFrameUI extends InternalFrameUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiInternalFrameUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -119,39 +119,39 @@ public class MultiInternalFrameUI extends InternalFrameUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiInternalFrameUI</code>. The first item in the array is always + * <code>MultiInternalFrameUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiInternalFrameUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiInternalFrameUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -164,11 +164,11 @@ public class MultiInternalFrameUI extends InternalFrameUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiInternalFrameUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -183,9 +183,9 @@ public class MultiInternalFrameUI extends InternalFrameUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiInternalFrameUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -198,24 +198,24 @@ public class MultiInternalFrameUI extends InternalFrameUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiInternalFrameUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiInternalFrameUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -228,24 +228,24 @@ public class MultiInternalFrameUI extends InternalFrameUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiInternalFrameUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiInternalFrameUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -258,24 +258,24 @@ public class MultiInternalFrameUI extends InternalFrameUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiInternalFrameUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiInternalFrameUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -288,24 +288,24 @@ public class MultiInternalFrameUI extends InternalFrameUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiInternalFrameUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiInternalFrameUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -318,25 +318,25 @@ public class MultiInternalFrameUI extends InternalFrameUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiInternalFrameUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiInternalFrameUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -349,5 +349,5 @@ public class MultiInternalFrameUI extends InternalFrameUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiLabelUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiLabelUI.java index ba5b9d47380..2f0e7d06ec6 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiLabelUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiLabelUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.LabelUI; /** - * A UI delegate that that coordinates multiple {@link LabelUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link LabelUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiLabelUI extends LabelUI +public class MultiLabelUI extends LabelUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiLabelUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiLabelUI() + public MultiLabelUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiLabelUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiLabelUI extends LabelUI MultiLabelUI mui = new MultiLabelUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiLabelUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiLabelUI extends LabelUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiLabelUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiLabelUI extends LabelUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiLabelUI</code>. The first item in the array is always + * <code>MultiLabelUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiLabelUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiLabelUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiLabelUI extends LabelUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiLabelUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiLabelUI extends LabelUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiLabelUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiLabelUI extends LabelUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiLabelUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiLabelUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiLabelUI extends LabelUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiLabelUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiLabelUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiLabelUI extends LabelUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiLabelUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiLabelUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiLabelUI extends LabelUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiLabelUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiLabelUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiLabelUI extends LabelUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiLabelUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiLabelUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiLabelUI extends LabelUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiListUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiListUI.java index 78c22419f34..d6b77f5b42f 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiListUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiListUI.java @@ -53,35 +53,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ListUI; /** - * A UI delegate that that coordinates multiple {@link ListUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ListUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiListUI extends ListUI +public class MultiListUI extends ListUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiListUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiListUI() + public MultiListUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiListUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -89,11 +89,11 @@ public class MultiListUI extends ListUI MultiListUI mui = new MultiListUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiListUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -107,9 +107,9 @@ public class MultiListUI extends ListUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiListUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -121,39 +121,39 @@ public class MultiListUI extends ListUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiListUI</code>. The first item in the array is always + * <code>MultiListUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiListUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiListUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -166,11 +166,11 @@ public class MultiListUI extends ListUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiListUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -185,9 +185,9 @@ public class MultiListUI extends ListUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiListUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -200,24 +200,24 @@ public class MultiListUI extends ListUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiListUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiListUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -230,24 +230,24 @@ public class MultiListUI extends ListUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiListUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiListUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -260,24 +260,24 @@ public class MultiListUI extends ListUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiListUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiListUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -290,24 +290,24 @@ public class MultiListUI extends ListUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiListUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiListUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -320,25 +320,25 @@ public class MultiListUI extends ListUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiListUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiListUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -351,25 +351,25 @@ public class MultiListUI extends ListUI } return result; } - + /** * Calls the {@link ListUI#locationToIndex(JList, Point)} method for all - * the UI delegates managed by this <code>MultiListUI</code>, - * returning the index for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiListUI</code>, + * returning the index for the UI delegate from the primary look and + * feel. + * * @param list the list. * @param location the location. - * - * @return The index returned by the UI delegate from the primary - * look and feel. + * + * @return The index returned by the UI delegate from the primary + * look and feel. */ - public int locationToIndex(JList list, Point location) + public int locationToIndex(JList list, Point location) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ListUI ui = (ListUI) iterator.next(); result = ui.locationToIndex(list, location); @@ -385,22 +385,22 @@ public class MultiListUI extends ListUI /** * Calls the {@link ListUI#indexToLocation(JList, int)} method for all - * the UI delegates managed by this <code>MultiListUI</code>, - * returning the location for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiListUI</code>, + * returning the location for the UI delegate from the primary look and + * feel. + * * @param list the list. * @param index the index. - * - * @return The location returned by the UI delegate from the primary - * look and feel. + * + * @return The location returned by the UI delegate from the primary + * look and feel. */ - public Point indexToLocation(JList list, int index) + public Point indexToLocation(JList list, int index) { Point result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ListUI ui = (ListUI) iterator.next(); result = ui.indexToLocation(list, index); @@ -416,23 +416,23 @@ public class MultiListUI extends ListUI /** * Calls the {@link ListUI#getCellBounds(JList, int, int)} method for all - * the UI delegates managed by this <code>MultiListUI</code>, - * returning the bounds for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiListUI</code>, + * returning the bounds for the UI delegate from the primary look and + * feel. + * * @param list the list. * @param index1 the first index. * @param index2 the second index. - * - * @return The bounds returned by the UI delegate from the primary - * look and feel. + * + * @return The bounds returned by the UI delegate from the primary + * look and feel. */ - public Rectangle getCellBounds(JList list, int index1, int index2) + public Rectangle getCellBounds(JList list, int index1, int index2) { Rectangle result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ListUI ui = (ListUI) iterator.next(); result = ui.getCellBounds(list, index1, index2); diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiLookAndFeel.java b/libjava/classpath/javax/swing/plaf/multi/MultiLookAndFeel.java index 12351655a04..4e81fd0546c 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiLookAndFeel.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiLookAndFeel.java @@ -49,7 +49,7 @@ import javax.swing.plaf.ComponentUI; * A look and feel that provides the ability to use auxiliary look and feels * in addition to the primary look and feel. */ -public class MultiLookAndFeel extends LookAndFeel +public class MultiLookAndFeel extends LookAndFeel { /** @@ -59,62 +59,62 @@ public class MultiLookAndFeel extends LookAndFeel { // Nothing to do here. } - + /** * Returns the name for the look and feel. - * + * * @return "Multiplexing Look and Feel". */ public String getName() { return "Multiplexing Look and Feel"; } - + /** * Returns an identifier for the look and feel. - * + * * @return "Multiplex". */ public String getID() { - return "Multiplex"; + return "Multiplex"; } - + /** * Returns a description of the look and feel. - * + * * @return A description of the look and feel. */ public String getDescription() { - return "Allows multiple UI instances per component instance"; + return "Allows multiple UI instances per component instance"; } - + /** - * Returns <code>false</code> to indicate that this look and feel is not + * Returns <code>false</code> to indicate that this look and feel is not * native to any platform. - * + * * @return <code>false</code>. */ public boolean isNativeLookAndFeel() { - return false; + return false; } /** * Returns <code>true</code> always, since this look and feel is supported on * all platforms. - * + * * @return <code>true</code>. */ public boolean isSupportedLookAndFeel() { return true; } - + /** * Creates and returns the UI defaults for this look and feel. - * + * * @return The UI defaults. */ public UIDefaults getDefaults() @@ -123,7 +123,7 @@ public class MultiLookAndFeel extends LookAndFeel defaults.put("ButtonUI", "javax.swing.plaf.multi.MultiButtonUI"); defaults.put("CheckBoxUI", "javax.swing.plaf.multi.MultiButtonUI"); defaults.put("CheckBoxMenuItemUI", "javax.swing.plaf.multi.MultiMenuItemUI"); - defaults.put("ColorChooserUI", + defaults.put("ColorChooserUI", "javax.swing.plaf.multi.MultiColorChooserUI"); defaults.put("ComboBoxUI", "javax.swing.plaf.multi.MultiComboBoxUI"); defaults.put("DesktopPaneUI", "javax.swing.plaf.multi.MultiDesktopPaneUI"); @@ -131,7 +131,7 @@ public class MultiLookAndFeel extends LookAndFeel defaults.put("EditorPaneUI", "javax.swing.plaf.multi.MultiTextUI"); defaults.put("FileChooserUI", "javax.swing.plaf.multi.MultiFileChooserUI"); defaults.put("FormattedTextFieldUI", "javax.swing.plaf.multi.MultiTextUI"); - defaults.put("InternalFrameUI", + defaults.put("InternalFrameUI", "javax.swing.plaf.multi.MultiInternalFrameUI"); defaults.put("LabelUI", "javax.swing.plaf.multi.MultiLabelUI"); defaults.put("ListUI", "javax.swing.plaf.multi.MultiListUI"); @@ -142,11 +142,11 @@ public class MultiLookAndFeel extends LookAndFeel defaults.put("PanelUI", "javax.swing.plaf.multi.MultiPanelUI"); defaults.put("PasswordFieldUI", "javax.swing.plaf.multi.MultiTextUI"); defaults.put("PopupMenuUI", "javax.swing.plaf.multi.MultiPopupMenuUI"); - defaults.put("PopupMenuSeparatorUI", + defaults.put("PopupMenuSeparatorUI", "javax.swing.plaf.multi.MultiSeparatorUI"); defaults.put("ProgressBarUI", "javax.swing.plaf.multi.MultiProgressBarUI"); defaults.put("RadioButtonUI", "javax.swing.plaf.multi.MultiButtonUI"); - defaults.put("RadioButtonMenuItemUI", + defaults.put("RadioButtonMenuItemUI", "javax.swing.plaf.multi.MultiMenuItemUI"); defaults.put("RootPaneUI", "javax.swing.plaf.multi.MultiRootPaneUI"); defaults.put("ScrollBarUI", "javax.swing.plaf.multi.MultiScrollBarUI"); @@ -162,43 +162,43 @@ public class MultiLookAndFeel extends LookAndFeel defaults.put("TextFieldUI", "javax.swing.plaf.multi.MultiTextUI"); defaults.put("TextPaneUI", "javax.swing.plaf.multi.MultiTextUI"); defaults.put("ToggleButtonUI", "javax.swing.plaf.multi.MultiButtonUI"); - defaults.put("ToolBarSeparatorUI", + defaults.put("ToolBarSeparatorUI", "javax.swing.plaf.multi.MultiSeparatorUI"); defaults.put("ToolBarUI", "javax.swing.plaf.multi.MultiToolBarUI"); defaults.put("ToolTipUI", "javax.swing.plaf.multi.MultiToolTipUI"); defaults.put("ViewportUI", "javax.swing.plaf.multi.MultiViewportUI"); return defaults; } - + /** * Creates the UI delegates for the <code>target</code> component and * returns a multiplexing UI delegate (<code>mui</code>) if there are * multiple delegates. - * + * * @param mui a multiplexing UI delegate appropriate for the component. * @param uis a vector into which the UI delegates will be added. * @param target the target component. - * + * * @return A UI delegate. */ - public static ComponentUI createUIs(ComponentUI mui, Vector uis, + public static ComponentUI createUIs(ComponentUI mui, Vector uis, JComponent target) { // get primary UI delegate for 'target', and add it to uis ComponentUI ui = null; LookAndFeel primary = UIManager.getLookAndFeel(); - if (primary != null) + if (primary != null) { ui = UIManager.getUI(target); uis.add(ui); } - // for any auxiliary look and feels in use, get the UI delegate and add + // for any auxiliary look and feels in use, get the UI delegate and add // it to uis LookAndFeel[] auxlafs = UIManager.getAuxiliaryLookAndFeels(); for (int i = 0; i < auxlafs.length; i++) { LookAndFeel auxlaf = auxlafs[i]; - // FIXME: here I call getDefaults() to get the UI delegate from the + // FIXME: here I call getDefaults() to get the UI delegate from the // auxiliary look and feel. But getDefaults() creates a new set of // defaults every time it is called, which is wasteful. Unfortunately // I cannot find another way to get the UI delegate, so I'm doing it @@ -208,36 +208,36 @@ public class MultiLookAndFeel extends LookAndFeel if (ui != null) uis.add(ui); } - // if uis contains more than 1 delegate, return mui, otherwise return + // if uis contains more than 1 delegate, return mui, otherwise return // the primary delegate if (uis.size() > 1) return mui; else - return ui; + return ui; } - + /** * Returns an array containing the same {@link ComponentUI} instances as * <code>uis</code>. If <code>uis</code> is <code>null</code>, a zero-length * array is returned. - * - * @param uis a list of {@link ComponentUI} references (<code>null</code> + * + * @param uis a list of {@link ComponentUI} references (<code>null</code> * permitted). - * + * * @return An array containing the same {@link ComponentUI} instances as * <code>uis</code>, or <code>null</code> if <code>uis</code> is - * empty. + * empty. */ protected static ComponentUI[] uisToArray(Vector uis) { - if (uis == null) + if (uis == null) return new ComponentUI[0]; int size = uis.size(); - if (size == 0) + if (size == 0) return null; ComponentUI[] result = new ComponentUI[size]; uis.copyInto(result); - return result; + return result; } } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiMenuBarUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiMenuBarUI.java index a8e805af1d4..5b43f6bd87c 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiMenuBarUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiMenuBarUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.MenuBarUI; /** - * A UI delegate that that coordinates multiple {@link MenuBarUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link MenuBarUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiMenuBarUI extends MenuBarUI +public class MultiMenuBarUI extends MenuBarUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiMenuBarUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiMenuBarUI() + public MultiMenuBarUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiMenuBarUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiMenuBarUI extends MenuBarUI MultiMenuBarUI mui = new MultiMenuBarUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiMenuBarUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiMenuBarUI extends MenuBarUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiMenuBarUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiMenuBarUI extends MenuBarUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiMenuBarUI</code>. The first item in the array is always + * <code>MultiMenuBarUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiMenuBarUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiMenuBarUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiMenuBarUI extends MenuBarUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiMenuBarUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiMenuBarUI extends MenuBarUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiMenuBarUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiMenuBarUI extends MenuBarUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiMenuBarUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiMenuBarUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiMenuBarUI extends MenuBarUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiMenuBarUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiMenuBarUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiMenuBarUI extends MenuBarUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiMenuBarUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiMenuBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiMenuBarUI extends MenuBarUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiMenuBarUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiMenuBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiMenuBarUI extends MenuBarUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiMenuBarUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiMenuBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiMenuBarUI extends MenuBarUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiMenuItemUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiMenuItemUI.java index ccab5feec9f..6d361b08601 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiMenuItemUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiMenuItemUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.MenuItemUI; /** - * A UI delegate that that coordinates multiple {@link MenuItemUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link MenuItemUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiMenuItemUI extends MenuItemUI +public class MultiMenuItemUI extends MenuItemUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiMenuItemUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiMenuItemUI() + public MultiMenuItemUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiItemUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiMenuItemUI extends MenuItemUI MultiMenuItemUI mui = new MultiMenuItemUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiMenuItemUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiMenuItemUI extends MenuItemUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiMenuItemUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiMenuItemUI extends MenuItemUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiMenuItemUI</code>. The first item in the array is always + * <code>MultiMenuItemUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiMenuItemUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiMenuItemUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiMenuItemUI extends MenuItemUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiMenuItemUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiMenuItemUI extends MenuItemUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiMenuItemUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiMenuItemUI extends MenuItemUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiMenuItemUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiMenuItemUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiMenuItemUI extends MenuItemUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiMenuItemUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiMenuItemUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiMenuItemUI extends MenuItemUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiMenuItemUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiMenuItemUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiMenuItemUI extends MenuItemUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiMenuItemUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiMenuItemUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiMenuItemUI extends MenuItemUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiMenuItemUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiMenuItemUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiMenuItemUI extends MenuItemUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java index 8d6f3861cff..eaa4a4257f0 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java @@ -51,35 +51,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.OptionPaneUI; /** - * A UI delegate that that coordinates multiple {@link OptionPaneUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link OptionPaneUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiOptionPaneUI extends OptionPaneUI +public class MultiOptionPaneUI extends OptionPaneUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiOptionPaneUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiOptionPaneUI() + public MultiOptionPaneUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiOptionPaneUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -87,11 +87,11 @@ public class MultiOptionPaneUI extends OptionPaneUI MultiOptionPaneUI mui = new MultiOptionPaneUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiOptionPaneUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -105,9 +105,9 @@ public class MultiOptionPaneUI extends OptionPaneUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiOptionPaneUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -119,39 +119,39 @@ public class MultiOptionPaneUI extends OptionPaneUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiOptionPaneUI</code>. The first item in the array is always + * <code>MultiOptionPaneUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiOptionPaneUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiOptionPaneUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -164,11 +164,11 @@ public class MultiOptionPaneUI extends OptionPaneUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiOptionPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -183,9 +183,9 @@ public class MultiOptionPaneUI extends OptionPaneUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiOptionPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -198,24 +198,24 @@ public class MultiOptionPaneUI extends OptionPaneUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiOptionPaneUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiOptionPaneUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -228,24 +228,24 @@ public class MultiOptionPaneUI extends OptionPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiOptionPaneUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiOptionPaneUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -258,24 +258,24 @@ public class MultiOptionPaneUI extends OptionPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiOptionPaneUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiOptionPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -288,24 +288,24 @@ public class MultiOptionPaneUI extends OptionPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiOptionPaneUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiOptionPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -318,25 +318,25 @@ public class MultiOptionPaneUI extends OptionPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiOptionPaneUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiOptionPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -349,14 +349,14 @@ public class MultiOptionPaneUI extends OptionPaneUI } return result; } - + /** * Calls the {@link OptionPaneUI#selectInitialValue(JOptionPane)} method for * all the UI delegates managed by this <code>MultiOptionPaneUI</code>. - * + * * @param pane the option pane. */ - public void selectInitialValue(JOptionPane pane) + public void selectInitialValue(JOptionPane pane) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -367,21 +367,21 @@ public class MultiOptionPaneUI extends OptionPaneUI } /** - * Calls the {@link OptionPaneUI#containsCustomComponents(JOptionPane)} - * method for all the UI delegates managed by this - * <code>MultiOptionPaneUI</code>, returning the result for the UI delegate - * from the primary look and feel. - * + * Calls the {@link OptionPaneUI#containsCustomComponents(JOptionPane)} + * method for all the UI delegates managed by this + * <code>MultiOptionPaneUI</code>, returning the result for the UI delegate + * from the primary look and feel. + * * @param pane the option pane. - * - * @return The result for the UI delegate from the primary look and feel. + * + * @return The result for the UI delegate from the primary look and feel. */ - public boolean containsCustomComponents(JOptionPane pane) + public boolean containsCustomComponents(JOptionPane pane) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { OptionPaneUI ui = (OptionPaneUI) iterator.next(); result = ui.containsCustomComponents(pane); diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java index 67629b2feba..7b84599d010 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.PanelUI; /** - * A UI delegate that that coordinates multiple {@link PanelUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link PanelUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiPanelUI extends PanelUI +public class MultiPanelUI extends PanelUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiPanelUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiPanelUI() + public MultiPanelUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiPanelUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiPanelUI extends PanelUI MultiPanelUI mui = new MultiPanelUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiPanelUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiPanelUI extends PanelUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiPanelUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiPanelUI extends PanelUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiPanelUI</code>. The first item in the array is always + * <code>MultiPanelUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiPanelUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiPanelUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiPanelUI extends PanelUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiPanelUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiPanelUI extends PanelUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiPanelUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiPanelUI extends PanelUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiPanelUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiPanelUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiPanelUI extends PanelUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiPanelUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiPanelUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiPanelUI extends PanelUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiPanelUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiPanelUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiPanelUI extends PanelUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiPanelUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiPanelUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiPanelUI extends PanelUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiPanelUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiPanelUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiPanelUI extends PanelUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java index 161429d296f..0afaaf74ee5 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.PopupMenuUI; /** - * A UI delegate that that coordinates multiple {@link PopupMenuUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link PopupMenuUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiPopupMenuUI extends PopupMenuUI +public class MultiPopupMenuUI extends PopupMenuUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiPopupMenuUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiPopupMenuUI() + public MultiPopupMenuUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiPopupMenuUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiPopupMenuUI extends PopupMenuUI MultiPopupMenuUI mui = new MultiPopupMenuUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiPopupMenuUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiPopupMenuUI extends PopupMenuUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiPopupMenuUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiPopupMenuUI extends PopupMenuUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiPopupMenuUI</code>. The first item in the array is always + * <code>MultiPopupMenuUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiPopupMenuUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiPopupMenuUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiPopupMenuUI extends PopupMenuUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiPopupMenuUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiPopupMenuUI extends PopupMenuUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiPopupMenuUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiPopupMenuUI extends PopupMenuUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiPopupMenuUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiPopupMenuUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiPopupMenuUI extends PopupMenuUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiPopupMenuUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiPopupMenuUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiPopupMenuUI extends PopupMenuUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiPopupMenuUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiPopupMenuUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiPopupMenuUI extends PopupMenuUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiPopupMenuUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiPopupMenuUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiPopupMenuUI extends PopupMenuUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiPopupMenuUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiPopupMenuUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiPopupMenuUI extends PopupMenuUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiProgressBarUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiProgressBarUI.java index c5dbbe815ae..0395bdd2d3f 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiProgressBarUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiProgressBarUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ProgressBarUI; /** - * A UI delegate that that coordinates multiple {@link ProgressBarUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ProgressBarUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiProgressBarUI extends ProgressBarUI +public class MultiProgressBarUI extends ProgressBarUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiProgressBarUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiProgressBarUI() + public MultiProgressBarUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiProgressBarUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiProgressBarUI extends ProgressBarUI MultiProgressBarUI mui = new MultiProgressBarUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiProgressBarUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiProgressBarUI extends ProgressBarUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiProgressBarUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiProgressBarUI extends ProgressBarUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiProgressBarUI</code>. The first item in the array is always + * <code>MultiProgressBarUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiProgressBarUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiProgressBarUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiProgressBarUI extends ProgressBarUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiProgressBarUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiProgressBarUI extends ProgressBarUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiProgressBarUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiProgressBarUI extends ProgressBarUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiProgressBarUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiProgressBarUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiProgressBarUI extends ProgressBarUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiProgressBarUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiProgressBarUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiProgressBarUI extends ProgressBarUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiProgressBarUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiProgressBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiProgressBarUI extends ProgressBarUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiProgressBarUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiProgressBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiProgressBarUI extends ProgressBarUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiProgressBarUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiProgressBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiProgressBarUI extends ProgressBarUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiRootPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiRootPaneUI.java index bd0cb5c1d1a..69c7ffe1bb4 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiRootPaneUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiRootPaneUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.RootPaneUI; /** - * A UI delegate that that coordinates multiple {@link RootPaneUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link RootPaneUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiRootPaneUI extends RootPaneUI +public class MultiRootPaneUI extends RootPaneUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiRootPanelUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiRootPaneUI() + public MultiRootPaneUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiRootPaneUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiRootPaneUI extends RootPaneUI MultiRootPaneUI mui = new MultiRootPaneUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiRootPaneUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiRootPaneUI extends RootPaneUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiRootPaneUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiRootPaneUI extends RootPaneUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiRootPaneUI</code>. The first item in the array is always + * <code>MultiRootPaneUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiRootPaneUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiRootPaneUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiRootPaneUI extends RootPaneUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiRootPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiRootPaneUI extends RootPaneUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiRootPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiRootPaneUI extends RootPaneUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiRootPaneUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiRootPaneUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiRootPaneUI extends RootPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiRootPaneUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiRootPaneUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiRootPaneUI extends RootPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiRootPaneUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiRootPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiRootPaneUI extends RootPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiRootPaneUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiRootPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiRootPaneUI extends RootPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiRootPaneUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiRootPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiRootPaneUI extends RootPaneUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiScrollBarUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiScrollBarUI.java index 1a993b840b6..4ec8b3fca67 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiScrollBarUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiScrollBarUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ScrollBarUI; /** - * A UI delegate that that coordinates multiple {@link ScrollBarUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ScrollBarUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiScrollBarUI extends ScrollBarUI +public class MultiScrollBarUI extends ScrollBarUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiScrollBarUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiScrollBarUI() + public MultiScrollBarUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiScrollBarUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiScrollBarUI extends ScrollBarUI MultiScrollBarUI mui = new MultiScrollBarUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiScrollBarUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiScrollBarUI extends ScrollBarUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiScrollBarUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiScrollBarUI extends ScrollBarUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiScrollBarUI</code>. The first item in the array is always + * <code>MultiScrollBarUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiScrollBarUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiScrollBarUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiScrollBarUI extends ScrollBarUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiScrollBarUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiScrollBarUI extends ScrollBarUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiScrollBarUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiScrollBarUI extends ScrollBarUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiScrollBarUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiScrollBarUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -230,21 +230,21 @@ public class MultiScrollBarUI extends ScrollBarUI /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiScrollBarUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiScrollBarUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiScrollBarUI extends ScrollBarUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiScrollBarUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiScrollBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiScrollBarUI extends ScrollBarUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiScrollBarUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiScrollBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiScrollBarUI extends ScrollBarUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiScrollBarUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiScrollBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiScrollBarUI extends ScrollBarUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java index a50c3ba7f18..5a0bc1ebfe8 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ScrollPaneUI; /** - * A UI delegate that that coordinates multiple {@link ScrollPaneUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ScrollPaneUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiScrollPaneUI extends ScrollPaneUI +public class MultiScrollPaneUI extends ScrollPaneUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiScrollPaneUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiScrollPaneUI() + public MultiScrollPaneUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiScrollPaneUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiScrollPaneUI extends ScrollPaneUI MultiScrollPaneUI mui = new MultiScrollPaneUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiScrollPaneUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiScrollPaneUI extends ScrollPaneUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiScrollPaneUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiScrollPaneUI extends ScrollPaneUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiScrollPaneUI</code>. The first item in the array is always + * <code>MultiScrollPaneUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiScrollPaneUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiScrollPaneUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiScrollPaneUI extends ScrollPaneUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiScrollPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiScrollPaneUI extends ScrollPaneUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiScrollPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiScrollPaneUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiScrollPaneUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiScrollPaneUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiScrollPaneUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiScrollPaneUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiScrollPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiScrollPaneUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiScrollPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiScrollPaneUI extends ScrollPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiScrollPaneUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiScrollPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiScrollPaneUI extends ScrollPaneUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiSeparatorUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiSeparatorUI.java index f8e4feae7f3..fbd9712fe84 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiSeparatorUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiSeparatorUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.SeparatorUI; /** - * A UI delegate that that coordinates multiple {@link MultiSeparatorUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link MultiSeparatorUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiSeparatorUI extends SeparatorUI +public class MultiSeparatorUI extends SeparatorUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiSeparatorUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiSeparatorUI() + public MultiSeparatorUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiSeparatorUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiSeparatorUI extends SeparatorUI MultiSeparatorUI mui = new MultiSeparatorUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiSeparatorUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiSeparatorUI extends SeparatorUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiSeparatorUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiSeparatorUI extends SeparatorUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiSeparatorUI</code>. The first item in the array is always + * <code>MultiSeparatorUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiSeparatorUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiSeparatorUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiSeparatorUI extends SeparatorUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiSeparatorUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiSeparatorUI extends SeparatorUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiSeparatorUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiSeparatorUI extends SeparatorUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSeparatorUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSeparatorUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiSeparatorUI extends SeparatorUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSeparatorUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSeparatorUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiSeparatorUI extends SeparatorUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSeparatorUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSeparatorUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiSeparatorUI extends SeparatorUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiSeparatorUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiSeparatorUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiSeparatorUI extends SeparatorUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiSeparatorUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiSeparatorUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiSeparatorUI extends SeparatorUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiSliderUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiSliderUI.java index 8a4aab6e041..cb896c54797 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiSliderUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiSliderUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.SliderUI; /** - * A UI delegate that that coordinates multiple {@link SliderUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link SliderUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiSliderUI extends SliderUI +public class MultiSliderUI extends SliderUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiSliderUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiSliderUI() + public MultiSliderUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiSliderUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiSliderUI extends SliderUI MultiSliderUI mui = new MultiSliderUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiSliderUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiSliderUI extends SliderUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiSliderUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiSliderUI extends SliderUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiSliderUI</code>. The first item in the array is always + * <code>MultiSliderUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiSliderUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiSliderUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiSliderUI extends SliderUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiSliderUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiSliderUI extends SliderUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiSliderUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiSliderUI extends SliderUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSliderUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSliderUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiSliderUI extends SliderUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSliderUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSliderUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiSliderUI extends SliderUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSliderUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSliderUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiSliderUI extends SliderUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiSliderUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiSliderUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiSliderUI extends SliderUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiSliderUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiSliderUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiSliderUI extends SliderUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiSpinnerUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiSpinnerUI.java index 70068e82a56..fd805f9cb01 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiSpinnerUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiSpinnerUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.SpinnerUI; /** - * A UI delegate that that coordinates multiple {@link SpinnerUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link SpinnerUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiSpinnerUI extends SpinnerUI +public class MultiSpinnerUI extends SpinnerUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiSpinnerUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiSpinnerUI() + public MultiSpinnerUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiSpinnerUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiSpinnerUI extends SpinnerUI MultiSpinnerUI mui = new MultiSpinnerUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiSpinnerUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiSpinnerUI extends SpinnerUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiSpinnerUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiSpinnerUI extends SpinnerUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiSpinnerUI</code>. The first item in the array is always + * <code>MultiSpinnerUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiSpinnerUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiSpinnerUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiSpinnerUI extends SpinnerUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiSpinnerUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiSpinnerUI extends SpinnerUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiSpinnerUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiSpinnerUI extends SpinnerUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSpinnerUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSpinnerUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiSpinnerUI extends SpinnerUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSpinnerUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSpinnerUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiSpinnerUI extends SpinnerUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSpinnerUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSpinnerUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiSpinnerUI extends SpinnerUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiSpinnerUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiSpinnerUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiSpinnerUI extends SpinnerUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiSpinnerUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiSpinnerUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiSpinnerUI extends SpinnerUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java index 70ea4f13be1..1eb2e41f54e 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java @@ -51,35 +51,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.SplitPaneUI; /** - * A UI delegate that that coordinates multiple {@link SplitPaneUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link SplitPaneUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiSplitPaneUI extends SplitPaneUI +public class MultiSplitPaneUI extends SplitPaneUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiSplitPaneUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiSplitPaneUI() + public MultiSplitPaneUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiSplitPaneUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -87,11 +87,11 @@ public class MultiSplitPaneUI extends SplitPaneUI MultiSplitPaneUI mui = new MultiSplitPaneUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiSplitPaneUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -105,9 +105,9 @@ public class MultiSplitPaneUI extends SplitPaneUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiSplitPaneUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -119,39 +119,39 @@ public class MultiSplitPaneUI extends SplitPaneUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiSplitPaneUI</code>. The first item in the array is always + * <code>MultiSplitPaneUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiSplitPaneUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiSplitPaneUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -164,11 +164,11 @@ public class MultiSplitPaneUI extends SplitPaneUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiSplitPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -183,9 +183,9 @@ public class MultiSplitPaneUI extends SplitPaneUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiSplitPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -198,24 +198,24 @@ public class MultiSplitPaneUI extends SplitPaneUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSplitPaneUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSplitPaneUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -231,21 +231,21 @@ public class MultiSplitPaneUI extends SplitPaneUI /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiSplitPaneUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiSplitPaneUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -258,24 +258,24 @@ public class MultiSplitPaneUI extends SplitPaneUI } 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. - * + * 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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -288,24 +288,24 @@ public class MultiSplitPaneUI extends SplitPaneUI } 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. - * + * 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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -318,25 +318,25 @@ public class MultiSplitPaneUI extends SplitPaneUI } 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. - * + * 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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -349,14 +349,14 @@ public class MultiSplitPaneUI extends SplitPaneUI } return result; } - + /** - * Calls the {@link SplitPaneUI#resetToPreferredSizes(JSplitPane)} method + * 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) + public void resetToPreferredSizes(JSplitPane pane) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -367,13 +367,13 @@ public class MultiSplitPaneUI extends SplitPaneUI } /** - * Calls the {@link SplitPaneUI#setDividerLocation(JSplitPane, int)} method + * 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) + public void setDividerLocation(JSplitPane pane, int location) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -385,21 +385,21 @@ public class MultiSplitPaneUI extends SplitPaneUI /** * 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. - * + * 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. + * + * @return The location returned by the UI delegate from the primary + * look and feel. */ - public int getDividerLocation(JSplitPane pane) + public int getDividerLocation(JSplitPane pane) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); result = ui.getDividerLocation(pane); @@ -414,22 +414,22 @@ public class MultiSplitPaneUI extends SplitPaneUI } /** - * 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. - * + * 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. + * + * @return The location returned by the UI delegate from the primary + * look and feel. */ - public int getMinimumDividerLocation(JSplitPane pane) + public int getMinimumDividerLocation(JSplitPane pane) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); result = ui.getMinimumDividerLocation(pane); @@ -444,22 +444,22 @@ public class MultiSplitPaneUI extends SplitPaneUI } /** - * 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. - * + * 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. + * + * @return The location returned by the UI delegate from the primary + * look and feel. */ - public int getMaximumDividerLocation(JSplitPane pane) + public int getMaximumDividerLocation(JSplitPane pane) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { SplitPaneUI ui = (SplitPaneUI) iterator.next(); result = ui.getMaximumDividerLocation(pane); @@ -474,14 +474,14 @@ public class MultiSplitPaneUI extends SplitPaneUI } /** - * Calls the {@link SplitPaneUI#finishedPaintingChildren(JSplitPane, - * Graphics)} method for all the UI delegates managed by this + * 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) + public void finishedPaintingChildren(JSplitPane pane, Graphics g) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java index 2a2599bde1b..3f9d22af4ee 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java @@ -52,35 +52,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.TabbedPaneUI; /** - * A UI delegate that that coordinates multiple {@link TabbedPaneUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link TabbedPaneUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiTabbedPaneUI extends TabbedPaneUI +public class MultiTabbedPaneUI extends TabbedPaneUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiTabbedPaneUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiTabbedPaneUI() + public MultiTabbedPaneUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiTabbedPaneUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -88,11 +88,11 @@ public class MultiTabbedPaneUI extends TabbedPaneUI MultiTabbedPaneUI mui = new MultiTabbedPaneUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTabbedPaneUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -106,9 +106,9 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTabbedPaneUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -120,39 +120,39 @@ public class MultiTabbedPaneUI extends TabbedPaneUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiTabbedPaneUI</code>. The first item in the array is always + * <code>MultiTabbedPaneUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiTabbedPaneUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiTabbedPaneUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -165,11 +165,11 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiTabbedPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -184,9 +184,9 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiTabbedPaneUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -199,24 +199,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTabbedPaneUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTabbedPaneUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -232,21 +232,21 @@ public class MultiTabbedPaneUI extends TabbedPaneUI /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTabbedPaneUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTabbedPaneUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -259,24 +259,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTabbedPaneUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTabbedPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -289,24 +289,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiTabbedPaneUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTabbedPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -319,25 +319,25 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiTabbedPaneUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTabbedPaneUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -350,26 +350,26 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } return result; } - + /** - * Calls the {@link TabbedPaneUI#tabForCoordinate(JTabbedPane, int, int)} - * method for all the UI delegates managed by this - * <code>MultiTabbedPaneUI</code>, returning the tab index for the UI - * delegate from the primary look and feel. - * + * Calls the {@link TabbedPaneUI#tabForCoordinate(JTabbedPane, int, int)} + * method for all the UI delegates managed by this + * <code>MultiTabbedPaneUI</code>, returning the tab index for the UI + * delegate from the primary look and feel. + * * @param pane the tabbed pane. * @param x the x-coordinate. * @param y the y-coordinate. - * - * @return The tab index returned by the UI delegate from the primary - * look and feel. + * + * @return The tab index returned by the UI delegate from the primary + * look and feel. */ - public int tabForCoordinate(JTabbedPane pane, int x, int y) + public int tabForCoordinate(JTabbedPane pane, int x, int y) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TabbedPaneUI ui = (TabbedPaneUI) iterator.next(); result = ui.tabForCoordinate(pane, x, y); @@ -384,23 +384,23 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } /** - * Calls the {@link TabbedPaneUI#getTabBounds(JTabbedPane, int)} - * method for all the UI delegates managed by this - * <code>MultiTabbedPaneUI</code>, returning the bounds for the UI - * delegate from the primary look and feel. - * + * Calls the {@link TabbedPaneUI#getTabBounds(JTabbedPane, int)} + * method for all the UI delegates managed by this + * <code>MultiTabbedPaneUI</code>, returning the bounds for the UI + * delegate from the primary look and feel. + * * @param pane the tabbed pane. * @param index the index. - * - * @return The bounds returned by the UI delegate from the primary - * look and feel. + * + * @return The bounds returned by the UI delegate from the primary + * look and feel. */ - public Rectangle getTabBounds(JTabbedPane pane, int index) + public Rectangle getTabBounds(JTabbedPane pane, int index) { Rectangle result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TabbedPaneUI ui = (TabbedPaneUI) iterator.next(); result = ui.getTabBounds(pane, index); @@ -415,22 +415,22 @@ public class MultiTabbedPaneUI extends TabbedPaneUI } /** - * Calls the {@link TabbedPaneUI#getTabRunCount(JTabbedPane)} - * method for all the UI delegates managed by this - * <code>MultiTabbedPaneUI</code>, returning the nt for the UI - * delegate from the primary look and feel. - * + * Calls the {@link TabbedPaneUI#getTabRunCount(JTabbedPane)} + * method for all the UI delegates managed by this + * <code>MultiTabbedPaneUI</code>, returning the nt for the UI + * delegate from the primary look and feel. + * * @param pane the tabbed pane. - * - * @return The count returned by the UI delegate from the primary - * look and feel. + * + * @return The count returned by the UI delegate from the primary + * look and feel. */ - public int getTabRunCount(JTabbedPane pane) + public int getTabRunCount(JTabbedPane pane) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TabbedPaneUI ui = (TabbedPaneUI) iterator.next(); result = ui.getTabRunCount(pane); diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java index 6c59cef6c96..972303bec43 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.TableHeaderUI; /** - * A UI delegate that that coordinates multiple {@link TableHeaderUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link TableHeaderUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiTableHeaderUI extends TableHeaderUI +public class MultiTableHeaderUI extends TableHeaderUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiTableHeaderUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiTableHeaderUI() + public MultiTableHeaderUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiTableHeaderUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiTableHeaderUI extends TableHeaderUI MultiTableHeaderUI mui = new MultiTableHeaderUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTableHeaderUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiTableHeaderUI extends TableHeaderUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTableHeaderUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiTableHeaderUI extends TableHeaderUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiTableHeaderUI</code>. The first item in the array is always + * <code>MultiTableHeaderUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiTableHeaderUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiTableHeaderUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiTableHeaderUI extends TableHeaderUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiTableHeaderUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiTableHeaderUI extends TableHeaderUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiTableHeaderUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiTableHeaderUI extends TableHeaderUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTableHeaderUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTableHeaderUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiTableHeaderUI extends TableHeaderUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTableHeaderUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTableHeaderUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiTableHeaderUI extends TableHeaderUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTableHeaderUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTableHeaderUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiTableHeaderUI extends TableHeaderUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiTableHeaderUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTableHeaderUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiTableHeaderUI extends TableHeaderUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiTableHeaderUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTableHeaderUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiTableHeaderUI extends TableHeaderUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTableUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTableUI.java index 2e5b5bcf532..1cd1a4c88e8 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiTableUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiTableUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.TableUI; /** - * A UI delegate that that coordinates multiple {@link TableUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link TableUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiTableUI extends TableUI +public class MultiTableUI extends TableUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiTableUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiTableUI() + public MultiTableUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiTableUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiTableUI extends TableUI MultiTableUI mui = new MultiTableUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTableUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiTableUI extends TableUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTableUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiTableUI extends TableUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiTableUI</code>. The first item in the array is always + * <code>MultiTableUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiTableUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiTableUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiTableUI extends TableUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiTableUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiTableUI extends TableUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiTableUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiTableUI extends TableUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTableUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTableUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiTableUI extends TableUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTableUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTableUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiTableUI extends TableUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTableUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTableUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiTableUI extends TableUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiTableUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTableUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiTableUI extends TableUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiTableUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTableUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiTableUI extends TableUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTextUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTextUI.java index c5dee247dd3..392fd981177 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiTextUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiTextUI.java @@ -58,35 +58,35 @@ import javax.swing.text.View; import javax.swing.text.Position.Bias; /** - * A UI delegate that that coordinates multiple {@link TextUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link TextUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiTextUI extends TextUI +public class MultiTextUI extends TextUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiTextUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiTextUI() + public MultiTextUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiTextUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -94,11 +94,11 @@ public class MultiTextUI extends TextUI MultiTextUI mui = new MultiTextUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTextUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -112,9 +112,9 @@ public class MultiTextUI extends TextUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTextUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -126,39 +126,39 @@ public class MultiTextUI extends TextUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiTextUI</code>. The first item in the array is always + * <code>MultiTextUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiTextUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -171,11 +171,11 @@ public class MultiTextUI extends TextUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiTextUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -190,9 +190,9 @@ public class MultiTextUI extends TextUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiTextUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -205,24 +205,24 @@ public class MultiTextUI extends TextUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTextUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -235,24 +235,24 @@ public class MultiTextUI extends TextUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTextUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -265,24 +265,24 @@ public class MultiTextUI extends TextUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTextUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -295,24 +295,24 @@ public class MultiTextUI extends TextUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiTextUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTextUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -325,25 +325,25 @@ public class MultiTextUI extends TextUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiTextUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTextUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -356,25 +356,25 @@ public class MultiTextUI extends TextUI } return result; } - + /** * Calls the {@link TextUI#modelToView(JTextComponent, int)} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the bounds for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTextUI</code>, + * returning the bounds for the UI delegate from the primary look and + * feel. + * * @param tc the text component. - * - * @return The bounds returned by the UI delegate from the primary - * look and feel. + * + * @return The bounds returned by the UI delegate from the primary + * look and feel. */ public Rectangle modelToView(JTextComponent tc, int pos) - throws BadLocationException + throws BadLocationException { Rectangle result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TextUI ui = (TextUI) iterator.next(); result = ui.modelToView(tc, pos); @@ -389,23 +389,23 @@ public class MultiTextUI extends TextUI } /** - * Calls the {@link TextUI#modelToView(JTextComponent, int, Position.Bias)} - * method for all the UI delegates managed by this <code>MultiTextUI</code>, - * returning the bounds for the UI delegate from the primary look and - * feel. - * + * Calls the {@link TextUI#modelToView(JTextComponent, int, Position.Bias)} + * method for all the UI delegates managed by this <code>MultiTextUI</code>, + * returning the bounds for the UI delegate from the primary look and + * feel. + * * @param tc the text component. - * - * @return The bounds returned by the UI delegate from the primary - * look and feel. + * + * @return The bounds returned by the UI delegate from the primary + * look and feel. */ public Rectangle modelToView(JTextComponent tc, int pos, Bias bias) - throws BadLocationException + throws BadLocationException { Rectangle result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TextUI ui = (TextUI) iterator.next(); result = ui.modelToView(tc, pos, bias); @@ -421,22 +421,22 @@ public class MultiTextUI extends TextUI /** * Calls the {@link TextUI#viewToModel(JTextComponent, Point)} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the position for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTextUI</code>, + * returning the position for the UI delegate from the primary look and + * feel. + * * @param t the text component. * @param pt the point. - * - * @return The position returned by the UI delegate from the primary - * look and feel. + * + * @return The position returned by the UI delegate from the primary + * look and feel. */ - public int viewToModel(JTextComponent t, Point pt) + public int viewToModel(JTextComponent t, Point pt) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TextUI ui = (TextUI) iterator.next(); result = ui.viewToModel(t, pt); @@ -451,22 +451,22 @@ public class MultiTextUI extends TextUI } /** - * Calls the {@link TextUI#viewToModel(JTextComponent, Point, Bias[])} method - * for all the UI delegates managed by this <code>MultiTextUI</code>, - * returning the position for the UI delegate from the primary look and - * feel. - * + * Calls the {@link TextUI#viewToModel(JTextComponent, Point, Bias[])} method + * for all the UI delegates managed by this <code>MultiTextUI</code>, + * returning the position for the UI delegate from the primary look and + * feel. + * * @param tc the text component. - * - * @return The position returned by the UI delegate from the primary - * look and feel. + * + * @return The position returned by the UI delegate from the primary + * look and feel. */ - public int viewToModel(JTextComponent tc, Point loc, Bias[] outBias) + public int viewToModel(JTextComponent tc, Point loc, Bias[] outBias) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TextUI ui = (TextUI) iterator.next(); result = ui.viewToModel(tc, loc, outBias); @@ -481,48 +481,48 @@ public class MultiTextUI extends TextUI } /** - * Calls the {@link TextUI#getNextVisualPositionFrom(JTextComponent, int, + * Calls the {@link TextUI#getNextVisualPositionFrom(JTextComponent, int, * Position.Bias, int, Position.Bias[])} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the position for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTextUI</code>, + * returning the position for the UI delegate from the primary look and + * feel. + * * @param tc the text component. - * - * @return The position returned by the UI delegate from the primary - * look and feel. + * + * @return The position returned by the UI delegate from the primary + * look and feel. */ public int getNextVisualPositionFrom(JTextComponent tc, int pos, Bias bias, - int direction, Bias[] outBias) throws BadLocationException + int direction, Bias[] outBias) throws BadLocationException { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TextUI ui = (TextUI) iterator.next(); - result = ui.getNextVisualPositionFrom(tc, pos, bias, direction, + result = ui.getNextVisualPositionFrom(tc, pos, bias, direction, outBias); } // return values from auxiliary UI delegates are ignored while (iterator.hasNext()) { TextUI ui = (TextUI) iterator.next(); - /* int ignored = */ ui.getNextVisualPositionFrom(tc, pos, bias, + /* int ignored = */ ui.getNextVisualPositionFrom(tc, pos, bias, direction, outBias); } return result; } /** - * Calls the {@link TextUI#damageRange(JTextComponent, int, int)} method for + * Calls the {@link TextUI#damageRange(JTextComponent, int, int)} method for * all the UI delegates managed by this <code>MultiTextUI</code>. - * + * * @param tc the component. * @param start the start position. * @param end the end position. */ - public void damageRange(JTextComponent tc, int start, int end) + public void damageRange(JTextComponent tc, int start, int end) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -533,10 +533,10 @@ public class MultiTextUI extends TextUI } /** - * Calls the {@link TextUI#damageRange(JTextComponent, int, int, - * Position.Bias, Position.Bias)} method for all the UI delegates managed by + * Calls the {@link TextUI#damageRange(JTextComponent, int, int, + * Position.Bias, Position.Bias)} method for all the UI delegates managed by * this <code>MultiTextUI</code>. - * + * * @param tc the component. * @param start the start position. * @param end the end position. @@ -544,7 +544,7 @@ public class MultiTextUI extends TextUI * @param endBias the end bias. */ public void damageRange(JTextComponent tc, int start, int end, - Bias startBias, Bias endBias) + Bias startBias, Bias endBias) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -556,21 +556,21 @@ public class MultiTextUI extends TextUI /** * Calls the {@link TextUI#getEditorKit(JTextComponent)} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the editor kit for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTextUI</code>, + * returning the editor kit for the UI delegate from the primary look and + * feel. + * * @param tc the text component. - * - * @return The editor kit returned by the UI delegate from the primary - * look and feel. + * + * @return The editor kit returned by the UI delegate from the primary + * look and feel. */ - public EditorKit getEditorKit(JTextComponent tc) + public EditorKit getEditorKit(JTextComponent tc) { EditorKit result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TextUI ui = (TextUI) iterator.next(); result = ui.getEditorKit(tc); @@ -586,21 +586,21 @@ public class MultiTextUI extends TextUI /** * Calls the {@link TextUI#getRootView(JTextComponent)} method for all - * the UI delegates managed by this <code>MultiTextUI</code>, - * returning the view for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTextUI</code>, + * returning the view for the UI delegate from the primary look and + * feel. + * * @param tc the text component. - * - * @return The view returned by the UI delegate from the primary - * look and feel. + * + * @return The view returned by the UI delegate from the primary + * look and feel. */ - public View getRootView(JTextComponent tc) + public View getRootView(JTextComponent tc) { View result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TextUI ui = (TextUI) iterator.next(); result = ui.getRootView(tc); diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiToolBarUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiToolBarUI.java index afe63bf358f..5f308d99121 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiToolBarUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiToolBarUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ToolBarUI; /** - * A UI delegate that that coordinates multiple {@link ToolBarUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ToolBarUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiToolBarUI extends ToolBarUI +public class MultiToolBarUI extends ToolBarUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiToolBarUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiToolBarUI() + public MultiToolBarUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiToolBarUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiToolBarUI extends ToolBarUI MultiToolBarUI mui = new MultiToolBarUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiToolBarUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiToolBarUI extends ToolBarUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiToolBarUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiToolBarUI extends ToolBarUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiToolBarUI</code>. The first item in the array is always + * <code>MultiToolBarUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiToolBarUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiToolBarUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiToolBarUI extends ToolBarUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiToolBarUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiToolBarUI extends ToolBarUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiToolBarUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiToolBarUI extends ToolBarUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiToolBarUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiToolBarUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiToolBarUI extends ToolBarUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiToolBarUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiToolBarUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiToolBarUI extends ToolBarUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiToolBarUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiToolBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiToolBarUI extends ToolBarUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiToolBarUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiToolBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiToolBarUI extends ToolBarUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiToolBarUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiToolBarUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiToolBarUI extends ToolBarUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java index fcd622dd8d3..9db9efb6981 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ToolTipUI; /** - * A UI delegate that that coordinates multiple {@link ToolTipUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ToolTipUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiToolTipUI extends ToolTipUI +public class MultiToolTipUI extends ToolTipUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiToolTipUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiToolTipUI() + public MultiToolTipUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiToolTipUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiToolTipUI extends ToolTipUI MultiToolTipUI mui = new MultiToolTipUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiToolTipUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiToolTipUI extends ToolTipUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiToolTipUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiToolTipUI extends ToolTipUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiToolTipUI</code>. The first item in the array is always + * <code>MultiToolTipUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiToolTipUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiToolTipUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiToolTipUI extends ToolTipUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiToolTipUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiToolTipUI extends ToolTipUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiToolTipUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiToolTipUI extends ToolTipUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiToolTipUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiToolTipUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -230,21 +230,21 @@ public class MultiToolTipUI extends ToolTipUI /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiToolTipUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiToolTipUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiToolTipUI extends ToolTipUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiToolTipUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiToolTipUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiToolTipUI extends ToolTipUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiToolTipUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiToolTipUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiToolTipUI extends ToolTipUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiToolTipUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiToolTipUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiToolTipUI extends ToolTipUI } return result; } - + } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTreeUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTreeUI.java index de1dc6cc773..f70decc6938 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiTreeUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiTreeUI.java @@ -53,35 +53,35 @@ import javax.swing.plaf.TreeUI; import javax.swing.tree.TreePath; /** - * A UI delegate that that coordinates multiple {@link TreeUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link TreeUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiTreeUI extends TreeUI +public class MultiTreeUI extends TreeUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiTreeUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiTreeUI() + public MultiTreeUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiTreeUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -89,11 +89,11 @@ public class MultiTreeUI extends TreeUI MultiTreeUI mui = new MultiTreeUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTreeUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -107,9 +107,9 @@ public class MultiTreeUI extends TreeUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiTreeUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -121,39 +121,39 @@ public class MultiTreeUI extends TreeUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiTreeUI</code>. The first item in the array is always + * <code>MultiTreeUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -166,11 +166,11 @@ public class MultiTreeUI extends TreeUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiTreeUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -185,9 +185,9 @@ public class MultiTreeUI extends TreeUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiTreeUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -200,24 +200,24 @@ public class MultiTreeUI extends TreeUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -230,24 +230,24 @@ public class MultiTreeUI extends TreeUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -260,24 +260,24 @@ public class MultiTreeUI extends TreeUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTreeUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -290,24 +290,24 @@ public class MultiTreeUI extends TreeUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTreeUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -320,25 +320,25 @@ public class MultiTreeUI extends TreeUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTreeUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -351,24 +351,24 @@ public class MultiTreeUI extends TreeUI } return result; } - + /** * Calls the {@link TreeUI#getPathBounds(JTree, TreePath)} method - * for all the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the bounds for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the bounds for the UI delegate from the primary look and + * feel. + * * @param tree the tree component. - * - * @return The bounds returned by the UI delegate from the primary - * look and feel. + * + * @return The bounds returned by the UI delegate from the primary + * look and feel. */ - public Rectangle getPathBounds(JTree tree, TreePath path) + public Rectangle getPathBounds(JTree tree, TreePath path) { Rectangle result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TreeUI ui = (TreeUI) iterator.next(); result = ui.getPathBounds(tree, path); @@ -384,21 +384,21 @@ public class MultiTreeUI extends TreeUI /** * Calls the {@link TreeUI#getPathForRow(JTree, int)} method - * for all the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the path for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the path for the UI delegate from the primary look and + * feel. + * * @param tree the tree component. - * - * @return The path returned by the UI delegate from the primary - * look and feel. + * + * @return The path returned by the UI delegate from the primary + * look and feel. */ - public TreePath getPathForRow(JTree tree, int row) + public TreePath getPathForRow(JTree tree, int row) { TreePath result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TreeUI ui = (TreeUI) iterator.next(); result = ui.getPathForRow(tree, row); @@ -414,21 +414,21 @@ public class MultiTreeUI extends TreeUI /** * Calls the {@link TreeUI#getRowForPath(JTree, TreePath)} method - * for all the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the row index for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the row index for the UI delegate from the primary look and + * feel. + * * @param tree the tree component. - * - * @return The row index returned by the UI delegate from the primary - * look and feel. + * + * @return The row index returned by the UI delegate from the primary + * look and feel. */ - public int getRowForPath(JTree tree, TreePath path) + public int getRowForPath(JTree tree, TreePath path) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TreeUI ui = (TreeUI) iterator.next(); result = ui.getRowForPath(tree, path); @@ -439,26 +439,26 @@ public class MultiTreeUI extends TreeUI TreeUI ui = (TreeUI) iterator.next(); /* int ignored = */ ui.getRowForPath(tree, path); } - return result; + return result; } /** * Calls the {@link TreeUI#getRowCount(JTree)} method - * for all the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the count for the UI delegate from the primary look and + * feel. + * * @param tree the tree component. - * - * @return The count returned by the UI delegate from the primary - * look and feel. + * + * @return The count returned by the UI delegate from the primary + * look and feel. */ - public int getRowCount(JTree tree) + public int getRowCount(JTree tree) { int result = 0; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TreeUI ui = (TreeUI) iterator.next(); result = ui.getRowCount(tree); @@ -469,26 +469,26 @@ public class MultiTreeUI extends TreeUI TreeUI ui = (TreeUI) iterator.next(); /* int ignored = */ ui.getRowCount(tree); } - return result; + return result; } /** * Calls the {@link TreeUI#getClosestPathForLocation(JTree, int, int)} method - * for all the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the path for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the path for the UI delegate from the primary look and + * feel. + * * @param tree the tree component. - * - * @return The path returned by the UI delegate from the primary - * look and feel. + * + * @return The path returned by the UI delegate from the primary + * look and feel. */ - public TreePath getClosestPathForLocation(JTree tree, int x, int y) + public TreePath getClosestPathForLocation(JTree tree, int x, int y) { TreePath result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TreeUI ui = (TreeUI) iterator.next(); result = ui.getClosestPathForLocation(tree, x, y); @@ -499,26 +499,26 @@ public class MultiTreeUI extends TreeUI TreeUI ui = (TreeUI) iterator.next(); /* TreePath ignored = */ ui.getClosestPathForLocation(tree, x, y); } - return result; + return result; } /** * Calls the {@link TreeUI#isEditing(JTree)} method for all - * the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param tree the tree component. - * - * @return The result returned by the UI delegate from the primary - * look and feel. + * + * @return The result returned by the UI delegate from the primary + * look and feel. */ - public boolean isEditing(JTree tree) + public boolean isEditing(JTree tree) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TreeUI ui = (TreeUI) iterator.next(); result = ui.isEditing(tree); @@ -534,21 +534,21 @@ public class MultiTreeUI extends TreeUI /** * Calls the {@link TreeUI#stopEditing(JTree)} method for all - * the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param tree the tree component. - * - * @return The result returned by the UI delegate from the primary - * look and feel. + * + * @return The result returned by the UI delegate from the primary + * look and feel. */ - public boolean stopEditing(JTree tree) + public boolean stopEditing(JTree tree) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TreeUI ui = (TreeUI) iterator.next(); result = ui.stopEditing(tree); @@ -563,12 +563,12 @@ public class MultiTreeUI extends TreeUI } /** - * Calls the {@link TreeUI#cancelEditing(JTree)} method for + * Calls the {@link TreeUI#cancelEditing(JTree)} method for * all the UI delegates managed by this <code>MultiTreeUI</code>. - * + * * @param tree the tree component. */ - public void cancelEditing(JTree tree) + public void cancelEditing(JTree tree) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -579,13 +579,13 @@ public class MultiTreeUI extends TreeUI } /** - * Calls the {@link TreeUI#startEditingAtPath(JTree, TreePath)} method for + * Calls the {@link TreeUI#startEditingAtPath(JTree, TreePath)} method for * all the UI delegates managed by this <code>MultiTreeUI</code>. - * + * * @param tree the tree component. * @param path the path. */ - public void startEditingAtPath(JTree tree, TreePath path) + public void startEditingAtPath(JTree tree, TreePath path) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) @@ -597,21 +597,21 @@ public class MultiTreeUI extends TreeUI /** * Calls the {@link TreeUI#getEditingPath(JTree)} method for all - * the UI delegates managed by this <code>MultiTreeUI</code>, - * returning the path for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiTreeUI</code>, + * returning the path for the UI delegate from the primary look and + * feel. + * * @param tree the tree component. - * - * @return The path returned by the UI delegate from the primary - * look and feel. + * + * @return The path returned by the UI delegate from the primary + * look and feel. */ - public TreePath getEditingPath(JTree tree) + public TreePath getEditingPath(JTree tree) { TreePath result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { TreeUI ui = (TreeUI) iterator.next(); result = ui.getEditingPath(tree); @@ -622,7 +622,7 @@ public class MultiTreeUI extends TreeUI TreeUI ui = (TreeUI) iterator.next(); /* TreePath ignored = */ ui.getEditingPath(tree); } - return result; + return result; } } diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java index 33bbc3b7f75..55f9cba70ac 100644 --- a/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java +++ b/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java @@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ViewportUI; /** - * A UI delegate that that coordinates multiple {@link ViewportUI} - * instances, one from the primary look and feel, and one or more from the + * A UI delegate that that coordinates multiple {@link ViewportUI} + * instances, one from the primary look and feel, and one or more from the * auxiliary look and feel(s). - * + * * @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel) */ -public class MultiViewportUI extends ViewportUI +public class MultiViewportUI extends ViewportUI { /** A list of references to the actual component UIs. */ protected Vector uis; - + /** * Creates a new <code>MultiViewPortUI</code> instance. - * + * * @see #createUI(JComponent) */ - public MultiViewportUI() + public MultiViewportUI() { uis = new Vector(); } - + /** - * Creates a delegate object for the specified component. If any auxiliary + * Creates a delegate object for the specified component. If any auxiliary * look and feels support this component, a <code>MultiViewportUI</code> is * returned, otherwise the UI from the default look and feel is returned. - * + * * @param target the component. - * + * * @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent) */ public static ComponentUI createUI(JComponent target) @@ -86,11 +86,11 @@ public class MultiViewportUI extends ViewportUI MultiViewportUI mui = new MultiViewportUI(); return MultiLookAndFeel.createUIs(mui, mui.uis, target); } - + /** - * Calls the {@link ComponentUI#installUI(JComponent)} method for all + * Calls the {@link ComponentUI#installUI(JComponent)} method for all * the UI delegates managed by this <code>MultiViewportUI</code>. - * + * * @param c the component. */ public void installUI(JComponent c) @@ -104,9 +104,9 @@ public class MultiViewportUI extends ViewportUI } /** - * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all + * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all * the UI delegates managed by this <code>MultiViewportUI</code>. - * + * * @param c the component. */ public void uninstallUI(JComponent c) @@ -118,39 +118,39 @@ public class MultiViewportUI extends ViewportUI ui.uninstallUI(c); } } - + /** * Returns an array containing the UI delegates managed by this - * <code>MultiViewportUI</code>. The first item in the array is always + * <code>MultiViewportUI</code>. The first item in the array is always * the UI delegate from the installed default look and feel. - * + * * @return An array of UI delegates. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } - + /** - * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all - * the UI delegates managed by this <code>MultiViewportUI</code>, - * returning the result for the UI delegate from the primary look and - * feel. - * + * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all + * the UI delegates managed by this <code>MultiViewportUI</code>, + * returning the result for the UI delegate from the primary look and + * feel. + * * @param c the component. * @param x the x-coordinate. * @param y the y-coordinate. - * + * * @return <code>true</code> if the specified (x, y) coordinate falls within * the bounds of the component as rendered by the UI delegate in the - * primary look and feel, and <code>false</code> otherwise. + * primary look and feel, and <code>false</code> otherwise. */ - public boolean contains(JComponent c, int x, int y) + public boolean contains(JComponent c, int x, int y) { boolean result = false; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.contains(c, x, y); @@ -163,11 +163,11 @@ public class MultiViewportUI extends ViewportUI } return result; } - + /** - * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all + * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiViewportUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -182,9 +182,9 @@ public class MultiViewportUI extends ViewportUI } /** - * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI + * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI * delegates managed by this <code>MultiViewportUI</code>. - * + * * @param g the graphics device. * @param c the component. */ @@ -197,24 +197,24 @@ public class MultiViewportUI extends ViewportUI ui.paint(g, c); } } - + /** * Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiViewportUI</code>, - * returning the preferred size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiViewportUI</code>, + * returning the preferred size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The preferred size returned by the UI delegate from the primary - * look and feel. + * + * @return The preferred size returned by the UI delegate from the primary + * look and feel. */ public Dimension getPreferredSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getPreferredSize(c); @@ -227,24 +227,24 @@ public class MultiViewportUI extends ViewportUI } return result; } - + /** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiViewportUI</code>, - * returning the minimum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiViewportUI</code>, + * returning the minimum size for the UI delegate from the primary look and + * feel. + * * @param c the component. - * - * @return The minimum size returned by the UI delegate from the primary - * look and feel. + * + * @return The minimum size returned by the UI delegate from the primary + * look and feel. */ public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value - if (iterator.hasNext()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); @@ -257,24 +257,24 @@ public class MultiViewportUI extends ViewportUI } return result; } - + /** * Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all - * the UI delegates managed by this <code>MultiViewportUI</code>, - * returning the maximum size for the UI delegate from the primary look and - * feel. - * + * the UI delegates managed by this <code>MultiViewportUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMaximumSize(c); @@ -287,24 +287,24 @@ public class MultiViewportUI extends ViewportUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method - * for all the UI delegates managed by this <code>MultiViewportUI</code>, - * returning the count for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiViewportUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChildrenCount(c); @@ -317,25 +317,25 @@ public class MultiViewportUI extends ViewportUI } return result; } - + /** * Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method - * for all the UI delegates managed by this <code>MultiViewportUI</code>, - * returning the child for the UI delegate from the primary look and - * feel. - * + * for all the UI delegates managed by this <code>MultiViewportUI</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. + * + * @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()) + if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getAccessibleChild(c, i); @@ -348,5 +348,5 @@ public class MultiViewportUI extends ViewportUI } return result; } - + } |