classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: javax.swing.plaf.metal.* package API doc updates


From: David Gilbert
Subject: [cp-patches] FYI: javax.swing.plaf.metal.* package API doc updates
Date: Thu, 27 Oct 2005 10:54:23 +0100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051026)

I went through the javax.swing.plaf.metal.* package, tidied up the API docs a bit, and committed this patch:

2005-10-27  David Gilbert  <address@hidden>

        * javax/swing/plaf/metal/MetalBorders.java: API doc updates,
        * javax/swing/plaf/metal/MetalButtonUI.java: likewise,
        * javax/swing/plaf/metal/MetalCheckBoxIcon.java: likewise,
        * javax/swing/plaf/metal/MetalCheckBoxUI.java: likewise,
        * javax/swing/plaf/metal/MetalDesktopIconUI.java: likewise,
        * javax/swing/plaf/metal/MetalIconFactory.java: likewise,
        * javax/swing/plaf/metal/MetalInternalFrameTitlePane.java: likewise,
        * javax/swing/plaf/metal/MetalInternalFrameUI.java: likewise,
        * javax/swing/plaf/metal/MetalLabelUI.java: likewise,
        * javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java: likewise,
        * javax/swing/plaf/metal/MetalProgressBarUI.java: likewise,
        * javax/swing/plaf/metal/MetalRadioButtonUI.java: likewise,
        * javax/swing/plaf/metal/MetalRootPaneUI.java: likewise,
        * javax/swing/plaf/metal/MetalScrollBarUI.java: likewise,
        * javax/swing/plaf/metal/MetalScrollPaneUI.java: likewise,
        * javax/swing/plaf/metal/MetalSeparatorUI.java: likewise,
        * javax/swing/plaf/metal/MetalSliderUI.java: likewise,
        * javax/swing/plaf/metal/MetalSplitPaneUI.java: likewise,
        * javax/swing/plaf/metal/MetalTabbedPaneUI.java: likewise,
        * javax/swing/plaf/metal/MetalTextFieldUI.java: likewise,
        * javax/swing/plaf/metal/MetalToolBarUI.java: likewise,
        * javax/swing/plaf/metal/MetalToolTipUI.java: likewise,
        * javax/swing/plaf/metal/MetalTreeUI.java: likewise,
        * javax/swing/plaf/metal/package.html: likewise.

Regards,

Dave
Index: javax/swing/plaf/metal/MetalBorders.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalBorders.java,v
retrieving revision 1.26
diff -u -r1.26 MetalBorders.java
--- javax/swing/plaf/metal/MetalBorders.java    19 Oct 2005 13:46:02 -0000      
1.26
+++ javax/swing/plaf/metal/MetalBorders.java    27 Oct 2005 09:37:57 -0000
@@ -45,11 +45,13 @@
 
 import javax.swing.AbstractButton;
 import javax.swing.ButtonModel;
+import javax.swing.JButton;
 import javax.swing.JInternalFrame;
 import javax.swing.JMenu;
 import javax.swing.JMenuBar;
 import javax.swing.JMenuItem;
 import javax.swing.JOptionPane;
+import javax.swing.JScrollPane;
 import javax.swing.JTextField;
 import javax.swing.JToggleButton;
 import javax.swing.JToolBar;
@@ -65,8 +67,7 @@
 
 
 /**
- * This factory class creates borders for the different Swing components
- * UI.
+ * A factory class that creates borders for the different Swing components.
  *
  * @author Roman Kennke (address@hidden)
  */
@@ -88,9 +89,7 @@
   /** The shared instance for getTextFieldBorder(). */
   private static Border textFieldBorder;
 
-  /**
-   * The shared instance for getTextBorder().
-   */
+  /** The shared instance for getTextBorder(). */
   private static Border textBorder;
 
   /** The shared instance for getRolloverBorder(). */
@@ -104,7 +103,7 @@
   private static BasicBorders.MarginBorder marginBorder;
 
   /**
-   * The border that is drawn around Swing buttons.
+   * A border used for address@hidden JButton} components.
    */
   public static class ButtonBorder extends AbstractBorder implements UIResource
   {
@@ -112,7 +111,7 @@
     protected static Insets borderInsets = new Insets(3, 3, 3, 3);
 
     /**
-     * Creates a new instance of ButtonBorder.
+     * Creates a new instance of <code>ButtonBorder</code>.
      */
     public ButtonBorder()
     {
@@ -186,11 +185,11 @@
     }
 
     /**
-     * Returns the insets of the ButtonBorder.
+     * Returns the insets of the <code>ButtonBorder</code>.
      *
      * @param c the component for which the border is used
      *
-     * @return the insets of the ButtonBorder
+     * @return The insets of the ButtonBorder
      */
     public Insets getBorderInsets(Component c)
     {
@@ -198,19 +197,20 @@
     }
 
     /**
-     * Returns the insets of the ButtonBorder in the specified Insets object.
+     * Returns the insets of the <code>ButtonBorder</code> in the specified 
+     * <code>newInsets</code> object.
      *
      * @param c the component for which the border is used
-     * @param newInsets the insets object where to put the values
+     * @param newInsets the insets object where to put the values (if 
+     *        <code>null</code>, a new instance is created).
      *
-     * @return the insets of the ButtonBorder
+     * @return The insets.
      */
     public Insets getBorderInsets(Component c, Insets newInsets)
     {
       if (newInsets == null)
         newInsets = new Insets(0, 0, 0, 0);
 
-      AbstractButton b = (AbstractButton) c;
       newInsets.bottom = borderInsets.bottom;
       newInsets.left = borderInsets.left;
       newInsets.right = borderInsets.right;
@@ -488,7 +488,7 @@
   }
 
   /**
-   * A border used when painting address@hidden JInternalFrame} instances.
+   * A border used for the address@hidden JInternalFrame} component.
    */
   public static class InternalFrameBorder extends AbstractBorder
     implements UIResource
@@ -587,7 +587,7 @@
   }
 
   /**
-   * A border used when painting address@hidden JInternalFrame} instances that 
are
+   * A border used for address@hidden JInternalFrame} components that are
    * presented as dialogs (by the address@hidden JOptionPane} class).
    */
   public static class OptionDialogBorder extends AbstractBorder
@@ -863,7 +863,7 @@
   }
 
   /**
-   * A border for JScrollPanes.
+   * A border for address@hidden JScrollPane} components.
    */
   public static class ScrollPaneBorder
     extends AbstractBorder
@@ -1116,7 +1116,7 @@
   }
 
   /**
-   * A border used for address@hidden JToggleButton} components.
+   * A border used for the address@hidden JToggleButton} component.
    * 
    * @since 1.3
    */
@@ -1209,7 +1209,7 @@
   }
 
   /**
-   * A border used when painting address@hidden JToolBar} instances.
+   * A border used for the address@hidden JToolBar} component.
    */
   public static class ToolBarBorder extends AbstractBorder
     implements UIResource, SwingConstants
Index: javax/swing/plaf/metal/MetalButtonUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalButtonUI.java,v
retrieving revision 1.7
diff -u -r1.7 MetalButtonUI.java
--- javax/swing/plaf/metal/MetalButtonUI.java   27 Sep 2005 21:51:50 -0000      
1.7
+++ javax/swing/plaf/metal/MetalButtonUI.java   27 Oct 2005 09:37:58 -0000
@@ -45,6 +45,7 @@
 import java.awt.Rectangle;
 
 import javax.swing.AbstractButton;
+import javax.swing.JButton;
 import javax.swing.JComponent;
 import javax.swing.UIDefaults;
 import javax.swing.UIManager;
@@ -54,8 +55,7 @@
 import javax.swing.plaf.basic.BasicButtonUI;
 
 /**
- * The Metal Look &amp; Feel implementation for
- * address@hidden javax.swing.AbstractButton}s.
+ * A UI delegate for the address@hidden JButton} component.
  *
  * @author Roman Kennke (address@hidden)
  */
Index: javax/swing/plaf/metal/MetalCheckBoxIcon.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java,v
retrieving revision 1.4
diff -u -r1.4 MetalCheckBoxIcon.java
--- javax/swing/plaf/metal/MetalCheckBoxIcon.java       16 Sep 2005 09:08:43 
-0000      1.4
+++ javax/swing/plaf/metal/MetalCheckBoxIcon.java       27 Oct 2005 09:37:58 
-0000
@@ -47,8 +47,7 @@
 import javax.swing.plaf.UIResource;
 
 /**
- * An address@hidden Icon} implementation for address@hidden JCheckBox}es in 
the
- * Metal Look &amp; Feel.
+ * An address@hidden Icon} used by the address@hidden MetalCheckBoxUI} class.
  *
  * @author Roman Kennke (address@hidden)
  */
Index: javax/swing/plaf/metal/MetalCheckBoxUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java,v
retrieving revision 1.4
diff -u -r1.4 MetalCheckBoxUI.java
--- javax/swing/plaf/metal/MetalCheckBoxUI.java 31 Aug 2005 15:23:10 -0000      
1.4
+++ javax/swing/plaf/metal/MetalCheckBoxUI.java 27 Oct 2005 09:37:58 -0000
@@ -44,8 +44,7 @@
 import javax.swing.plaf.ComponentUI;
 
 /**
- * A UI delegate for the address@hidden JCheckBox} component under the 
- * address@hidden MetalLookAndFeel}.
+ * A UI delegate for the address@hidden JCheckBox} component.
  */
 public class MetalCheckBoxUI
   extends MetalRadioButtonUI
@@ -64,11 +63,11 @@
   }
 
   /**
-   * Returns an instance of MetalCheckBoxUI.
+   * Returns a shared instance of <code>MetalCheckBoxUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalCheckBoxUI
+   * @return A shared instance of <code>MetalCheckBoxUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalDesktopIconUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalDesktopIconUI.java,v
retrieving revision 1.2
diff -u -r1.2 MetalDesktopIconUI.java
--- javax/swing/plaf/metal/MetalDesktopIconUI.java      2 Jul 2005 20:32:51 
-0000       1.2
+++ javax/swing/plaf/metal/MetalDesktopIconUI.java      27 Oct 2005 09:37:58 
-0000
@@ -39,9 +39,13 @@
 package javax.swing.plaf.metal;
 
 import javax.swing.JComponent;
+import javax.swing.JInternalFrame;
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicDesktopIconUI;
 
+/**
+ * A UI delegate for the address@hidden JInternalFrame.JDesktopIcon} component.
+ */
 public class MetalDesktopIconUI
   extends BasicDesktopIconUI
 {
@@ -51,7 +55,7 @@
   private static MetalDesktopIconUI instance = null;
 
   /**
-   * Constructs a new instance of MetalDesktopIconUI.
+   * Constructs a new instance of <code>MetalDesktopIconUI</code>.
    */
   public MetalDesktopIconUI()
   {
@@ -59,11 +63,11 @@
   }
 
   /**
-   * Returns an instance of MetalDesktopIconUI.
+   * Returns a shared instance of <code>MetalDesktopIconUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalDesktopIconUI
+   * @return A shared instance of <code>MetalDesktopIconUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalIconFactory.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalIconFactory.java,v
retrieving revision 1.18
diff -u -r1.18 MetalIconFactory.java
--- javax/swing/plaf/metal/MetalIconFactory.java        19 Oct 2005 13:46:02 
-0000      1.18
+++ javax/swing/plaf/metal/MetalIconFactory.java        27 Oct 2005 09:38:01 
-0000
@@ -2426,7 +2426,7 @@
   }
 
   /**
-   * Returns a 16x16 icon representing a computer.
+   * Returns a <code>16x16</code> icon representing a computer.
    * 
    * @return The icon.
    */
@@ -2438,7 +2438,7 @@
   }
     
   /**
-   * Returns a 16x16 icon representing a floppy disk.
+   * Returns a <code>16x16</code> icon representing a floppy disk.
    * 
    * @return The icon.
    */
@@ -2450,7 +2450,7 @@
   }
     
   /**
-   * Returns a 16x16 icon representing a hard disk.
+   * Returns a <code>16x16</code> icon representing a hard disk.
    * 
    * @return The icon.
    */
Index: javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java,v
retrieving revision 1.4
diff -u -r1.4 MetalInternalFrameTitlePane.java
--- javax/swing/plaf/metal/MetalInternalFrameTitlePane.java     19 Oct 2005 
13:46:02 -0000      1.4
+++ javax/swing/plaf/metal/MetalInternalFrameTitlePane.java     27 Oct 2005 
09:38:02 -0000
@@ -61,9 +61,10 @@
 
 
 /**
- * The title pane for a address@hidden JInternalFrame}.  This can be displayed 
in two
- * styles: one for regular internal frames, and the other for "palette" style
- * internal frames.
+ * The title pane for a address@hidden JInternalFrame} (see 
+ * address@hidden MetalInternalFrameUI#createNorthPane(JInternalFrame)}).  
This can 
+ * be displayed in two styles: one for regular internal frames, and the other 
+ * for "palette" style internal frames.
  */
 public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane 
 {
@@ -86,7 +87,7 @@
     
     /**
      * Handles <code>JInternalFrame.isPalette</code> property changes, with all
-     * other propert changes being passed to the superclass.
+     * other property changes being passed to the superclass.
      * 
      * @param e  the event.
      */
@@ -316,6 +317,9 @@
       // do nothing    
   }
   
+  /**
+   * Adds the sub components of the title pane.
+   */
   protected void addSubComponents()
   {
     // FIXME:  this method is probably overridden to only add the required 
@@ -423,6 +427,11 @@
       closeButton.setIcon(closeIcon);
   }
   
+  /**
+   * Creates and returns a property change handler for the title pane.
+   * 
+   * @return The property change handler.
+   */
   protected PropertyChangeListener createPropertyChangeListener()
   {
     return new MetalInternalFrameTitlePanePropertyChangeHandler();   
Index: javax/swing/plaf/metal/MetalInternalFrameUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java,v
retrieving revision 1.6
diff -u -r1.6 MetalInternalFrameUI.java
--- javax/swing/plaf/metal/MetalInternalFrameUI.java    12 Sep 2005 23:04:55 
-0000      1.6
+++ javax/swing/plaf/metal/MetalInternalFrameUI.java    27 Oct 2005 09:38:02 
-0000
@@ -47,15 +47,15 @@
 import javax.swing.plaf.basic.BasicInternalFrameUI;
 
 /**
- * A UI delegate for the address@hidden JInternalFrame} component under the 
- * address@hidden MetalLookAndFeel}.
+ * A UI delegate for the address@hidden JInternalFrame} component.
  */
 public class MetalInternalFrameUI
   extends BasicInternalFrameUI
 {
   /** 
-   * The key for the client property that controls whether the internal frame
-   * is displayed using the palette style. 
+   * The key (<code>JInternalFrame.isPalette</code>) for the client property 
+   * that controls whether the internal frame is displayed using the palette 
+   * style. 
    */
   protected static String IS_PALETTE = "JInternalFrame.isPalette";
 
Index: javax/swing/plaf/metal/MetalLabelUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalLabelUI.java,v
retrieving revision 1.4
diff -u -r1.4 MetalLabelUI.java
--- javax/swing/plaf/metal/MetalLabelUI.java    30 Aug 2005 12:48:39 -0000      
1.4
+++ javax/swing/plaf/metal/MetalLabelUI.java    27 Oct 2005 09:38:02 -0000
@@ -50,17 +50,17 @@
 import javax.swing.plaf.basic.BasicLabelUI;
 
 /**
- * A UI delegate used for address@hidden JLabel}s in the address@hidden 
MetalLookAndFeel}.
+ * A UI delegate for the address@hidden JLabel} component.
  */
 public class MetalLabelUI
   extends BasicLabelUI
 {
 
-  /** The shared UI instance for JLabels. */
+  /** The shared instance of the UI delegate. */
   protected static MetalLabelUI metalLabelUI;
 
   /**
-   * Constructs a new instance of MetalLabelUI.
+   * Constructs a new instance of <code>MetalLabelUI</code>.
    */
   public MetalLabelUI()
   {
@@ -68,11 +68,11 @@
   }
 
   /**
-   * Returns an instance of MetalLabelUI.
+   * Returns a shared instance of <code>MetalLabelUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalLabelUI
+   * @return A shared instance of <code>MetalLabelUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java,v
retrieving revision 1.2
diff -u -r1.2 MetalPopupMenuSeparatorUI.java
--- javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java       2 Jul 2005 
20:32:51 -0000       1.2
+++ javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java       27 Oct 2005 
09:38:02 -0000
@@ -39,8 +39,12 @@
 package javax.swing.plaf.metal;
 
 import javax.swing.JComponent;
+import javax.swing.JPopupMenu;
 import javax.swing.plaf.ComponentUI;
 
+/**
+ * A UI delegate for the address@hidden JPopupMenu.Separator} component.
+ */
 public class MetalPopupMenuSeparatorUI
   extends MetalSeparatorUI
 {
@@ -50,7 +54,7 @@
   private static MetalPopupMenuSeparatorUI instance = null;
 
   /**
-   * Constructs a new instance of MetalPopupMenuSeparatorUI.
+   * Constructs a new instance of <code>MetalPopupMenuSeparatorUI</code>.
    */
   public MetalPopupMenuSeparatorUI()
   {
@@ -58,11 +62,11 @@
   }
 
   /**
-   * Returns an instance of MetalPopupMenuSeparatorUI.
+   * Returns a shared instance of <code>MetalPopupMenuSeparatorUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalPopupMenuSeparatorUI
+   * @return A shared instance of <code>MetalPopupMenuSeparatorUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalProgressBarUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalProgressBarUI.java,v
retrieving revision 1.5
diff -u -r1.5 MetalProgressBarUI.java
--- javax/swing/plaf/metal/MetalProgressBarUI.java      19 Oct 2005 13:46:02 
-0000      1.5
+++ javax/swing/plaf/metal/MetalProgressBarUI.java      27 Oct 2005 09:38:02 
-0000
@@ -39,13 +39,17 @@
 package javax.swing.plaf.metal;
 
 import javax.swing.JComponent;
+import javax.swing.JProgressBar;
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicProgressBarUI;
 
+/**
+ * A UI delegate for the address@hidden JProgressBar} component.
+ */
 public class MetalProgressBarUI extends BasicProgressBarUI
 {  
   /**
-   * Constructs a new instance of MetalProgressBarUI.
+   * Constructs a new instance of <code>MetalProgressBarUI</code>.
    */
   public MetalProgressBarUI()
   {
@@ -53,11 +57,11 @@
   }
 
   /**
-   * Returns an instance of MetalProgressBarUI.
+   * Returns a new instance of <code>MetalProgressBarUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalProgressBarUI
+   * @return A new instance of <code>MetalProgressBarUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalRadioButtonUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java,v
retrieving revision 1.5
diff -u -r1.5 MetalRadioButtonUI.java
--- javax/swing/plaf/metal/MetalRadioButtonUI.java      20 Oct 2005 20:21:29 
-0000      1.5
+++ javax/swing/plaf/metal/MetalRadioButtonUI.java      27 Oct 2005 09:38:02 
-0000
@@ -53,8 +53,7 @@
 
 
 /**
- * A UI delegate for the address@hidden JRadioButton} component under the 
- * address@hidden MetalLookAndFeel}.
+ * A UI delegate for the address@hidden JRadioButton} component.
  */
 public class MetalRadioButtonUI
   extends BasicRadioButtonUI
@@ -70,7 +69,7 @@
   protected Color disabledTextColor;
   
   /**
-   * Constructs a new instance of MetalRadioButtonUI.
+   * Constructs a new instance of <code>MetalRadioButtonUI</code>.
    */
   public MetalRadioButtonUI()
   {
@@ -78,11 +77,11 @@
   }
 
   /**
-   * Returns an instance of MetalRadioButtonUI.
+   * Returns a new instance of <code>MetalRadioButtonUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalRadioButtonUI
+   * @return A new instance of <code>MetalRadioButtonUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalRootPaneUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalRootPaneUI.java,v
retrieving revision 1.2
diff -u -r1.2 MetalRootPaneUI.java
--- javax/swing/plaf/metal/MetalRootPaneUI.java 2 Jul 2005 20:32:51 -0000       
1.2
+++ javax/swing/plaf/metal/MetalRootPaneUI.java 27 Oct 2005 09:38:03 -0000
@@ -39,9 +39,16 @@
 package javax.swing.plaf.metal;
 
 import javax.swing.JComponent;
+import javax.swing.JRootPane;
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicRootPaneUI;
 
+/**
+ * A UI delegate for the address@hidden JRootPane} component.  This class is 
not fully
+ * implemented.
+ * 
+ * @since 1.4
+ */
 public class MetalRootPaneUI
   extends BasicRootPaneUI
 {
@@ -51,7 +58,7 @@
   private static MetalRootPaneUI instance = null;
 
   /**
-   * Constructs a new instance of MetalRootPaneUI.
+   * Constructs a shared instance of <code>MetalRootPaneUI</code>.
    */
   public MetalRootPaneUI()
   {
@@ -59,11 +66,11 @@
   }
 
   /**
-   * Returns an instance of MetalRootPaneUI.
+   * Returns a shared instance of <code>MetalRootPaneUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalRootPaneUI
+   * @return A shared instance of <code>MetalRootPaneUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalScrollBarUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalScrollBarUI.java,v
retrieving revision 1.10
diff -u -r1.10 MetalScrollBarUI.java
--- javax/swing/plaf/metal/MetalScrollBarUI.java        24 Oct 2005 20:30:54 
-0000      1.10
+++ javax/swing/plaf/metal/MetalScrollBarUI.java        27 Oct 2005 09:38:03 
-0000
@@ -116,7 +116,9 @@
   /** The button that decreases the value in the scroll bar. */
   protected MetalScrollButton decreaseButton;
   
-  /** The scroll bar width. */
+  /** 
+   * The scroll bar width. 
+   */
   protected int scrollBarWidth;
   
   /** 
@@ -127,11 +129,15 @@
    * to look right visually. */
   protected boolean isFreeStanding = true;
   
-  /** The color for the scroll bar shadow. */
+  /** 
+   * The color for the scroll bar shadow (this is read from the UIDefaults in 
+   * the installDefaults() method).
+   */
   Color scrollBarShadowColor;
   
   /**
-   * Constructs a new instance of MetalScrollBarUI.
+   * Constructs a new instance of <code>MetalScrollBarUI</code>, with no
+   * specific initialisation.
    */
   public MetalScrollBarUI()
   {
@@ -139,11 +145,11 @@
   }
 
   /**
-   * Returns an instance of MetalScrollBarUI.
+   * Returns a new instance of <code>MetalScrollBarUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalScrollBarUI
+   * @return An instance of MetalScrollBarUI
    */
   public static ComponentUI createUI(JComponent component)
   {
@@ -350,6 +356,13 @@
             thumbHighlightColor, thumbLightShadowColor);
   }
 
+  /**
+   * Paints the thumb for a horizontal scroll bar.
+   * 
+   * @param g  the graphics device.
+   * @param c  the scroll bar component.
+   * @param thumbBounds  the thumb bounds.
+   */
   private void paintThumbHorizontal(Graphics g, JComponent c, 
           Rectangle thumbBounds) 
   {
@@ -396,6 +409,13 @@
 
   }
   
+  /**
+   * Paints the thumb for a vertical scroll bar.
+   * 
+   * @param g  the graphics device.
+   * @param c  the scroll bar component.
+   * @param thumbBounds  the thumb bounds.
+   */
   private void paintThumbVertical(Graphics g, JComponent c, 
           Rectangle thumbBounds)
   {
@@ -442,7 +462,9 @@
   }
   
   /**
-   * This method returns the minimum thumb size.
+   * Returns the minimum thumb size.  For a free standing scroll bar the 
+   * minimum size is <code>17 x 17</code> pixels, whereas for a non free 
+   * standing scroll bar the minimum size is <code>15 x 15</code> pixels.
    *
    * @return The minimum thumb size.
    */
Index: javax/swing/plaf/metal/MetalScrollPaneUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalScrollPaneUI.java,v
retrieving revision 1.3
diff -u -r1.3 MetalScrollPaneUI.java
--- javax/swing/plaf/metal/MetalScrollPaneUI.java       2 Jul 2005 20:32:51 
-0000       1.3
+++ javax/swing/plaf/metal/MetalScrollPaneUI.java       27 Oct 2005 09:38:03 
-0000
@@ -39,9 +39,13 @@
 package javax.swing.plaf.metal;
 
 import javax.swing.JComponent;
+import javax.swing.JScrollPane;
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicScrollPaneUI;
 
+/**
+ * A UI delegate for the address@hidden JScrollPane} component.
+ */
 public class MetalScrollPaneUI
   extends BasicScrollPaneUI
 {
@@ -51,7 +55,7 @@
   private static MetalScrollPaneUI instance = null;
 
   /**
-   * Constructs a new instance of MetalScrollPaneUI.
+   * Constructs a new instance of <code>MetalScrollPaneUI</code>.
    */
   public MetalScrollPaneUI()
   {
@@ -59,11 +63,11 @@
   }
 
   /**
-   * Returns an instance of MetalScrollPaneUI.
+   * Returns a shared instance of <code>MetalScrollPaneUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalScrollPaneUI
+   * @return A shared instance of <code>MetalScrollPaneUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalSeparatorUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalSeparatorUI.java,v
retrieving revision 1.3
diff -u -r1.3 MetalSeparatorUI.java
--- javax/swing/plaf/metal/MetalSeparatorUI.java        28 Sep 2005 13:28:35 
-0000      1.3
+++ javax/swing/plaf/metal/MetalSeparatorUI.java        27 Oct 2005 09:38:03 
-0000
@@ -49,6 +49,9 @@
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicSeparatorUI;
 
+/**
+ * A UI delegate for the address@hidden JSeparator} component.
+ */
 public class MetalSeparatorUI
   extends BasicSeparatorUI
 {
@@ -58,7 +61,7 @@
   private static MetalSeparatorUI instance = null;
 
   /**
-   * Constructs a new instance of MetalSeparatorUI.
+   * Constructs a new instance of <code>MetalSeparatorUI</code>.
    */
   public MetalSeparatorUI()
   {
@@ -66,11 +69,11 @@
   }
 
   /**
-   * Returns an instance of MetalSeparatorUI.
+   * Returns a shared instance of <code>MetalSeparatorUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalSeparatorUI
+   * @return A shared instance of <code>MetalSeparatorUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalSliderUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalSliderUI.java,v
retrieving revision 1.6
diff -u -r1.6 MetalSliderUI.java
--- javax/swing/plaf/metal/MetalSliderUI.java   19 Oct 2005 13:46:02 -0000      
1.6
+++ javax/swing/plaf/metal/MetalSliderUI.java   27 Oct 2005 09:38:04 -0000
@@ -149,11 +149,11 @@
   }
 
   /**
-   * Returns an instance of MetalSliderUI.
+   * Returns a new instance of <code>MetalSliderUI</code>.
    *
    * @param component the component (ignored).
    *
-   * @return an instance of MetalSliderUI
+   * @return A new instance of <code>MetalSliderUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalSplitPaneUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalSplitPaneUI.java,v
retrieving revision 1.6
diff -u -r1.6 MetalSplitPaneUI.java
--- javax/swing/plaf/metal/MetalSplitPaneUI.java        19 Oct 2005 13:46:02 
-0000      1.6
+++ javax/swing/plaf/metal/MetalSplitPaneUI.java        27 Oct 2005 09:38:04 
-0000
@@ -41,16 +41,20 @@
 import java.awt.Color;
 
 import javax.swing.JComponent;
+import javax.swing.JSplitPane;
 import javax.swing.UIDefaults;
 import javax.swing.UIManager;
 import javax.swing.plaf.ComponentUI;
-import javax.swing.plaf.basic.BasicSplitPaneUI;
 import javax.swing.plaf.basic.BasicSplitPaneDivider;
+import javax.swing.plaf.basic.BasicSplitPaneUI;
 
+/**
+ * A UI delegate for the address@hidden JSplitPane} component.
+ */
 public class MetalSplitPaneUI extends BasicSplitPaneUI
 {
   /**
-   * Constructs a new instance of MetalSplitPaneUI.
+   * Constructs a new instance of <code>MetalSplitPaneUI</code>.
    */
   public MetalSplitPaneUI()
   {
@@ -58,11 +62,11 @@
   }
 
   /**
-   * Returns an instance of MetalSplitPaneUI.
+   * Returns a new instance of <code>MetalSplitPaneUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalSplitPaneUI
+   * @return A new instance of <code>MetalSplitPaneUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalTabbedPaneUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java,v
retrieving revision 1.8
diff -u -r1.8 MetalTabbedPaneUI.java
--- javax/swing/plaf/metal/MetalTabbedPaneUI.java       19 Oct 2005 13:46:03 
-0000      1.8
+++ javax/swing/plaf/metal/MetalTabbedPaneUI.java       27 Oct 2005 09:38:05 
-0000
@@ -47,8 +47,7 @@
 import javax.swing.plaf.basic.BasicTabbedPaneUI;
 
 /**
- * A UI delegate used for the address@hidden JTabbedPane} component in the 
- * address@hidden MetalLookAndFeel}.
+ * A UI delegate for the address@hidden JTabbedPane} component.
  */
 public class MetalTabbedPaneUI extends BasicTabbedPaneUI
 {
Index: javax/swing/plaf/metal/MetalTextFieldUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalTextFieldUI.java,v
retrieving revision 1.5
diff -u -r1.5 MetalTextFieldUI.java
--- javax/swing/plaf/metal/MetalTextFieldUI.java        19 Oct 2005 13:46:03 
-0000      1.5
+++ javax/swing/plaf/metal/MetalTextFieldUI.java        27 Oct 2005 09:38:05 
-0000
@@ -39,9 +39,13 @@
 package javax.swing.plaf.metal;
 
 import javax.swing.JComponent;
+import javax.swing.JTextField;
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicTextFieldUI;
 
+/**
+ * A UI delegate for the address@hidden JTextField} component.
+ */
 public class MetalTextFieldUI extends BasicTextFieldUI
 {
   /**
@@ -53,11 +57,11 @@
   }
 
   /**
-   * Returns an instance of MetalTextFieldUI.
+   * Returns a new instance of <code>MetalTextFieldUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalTextFieldUI
+   * @return A new instance of <code>MetalTextFieldUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/MetalToolBarUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalToolBarUI.java,v
retrieving revision 1.4
diff -u -r1.4 MetalToolBarUI.java
--- javax/swing/plaf/metal/MetalToolBarUI.java  19 Oct 2005 13:46:03 -0000      
1.4
+++ javax/swing/plaf/metal/MetalToolBarUI.java  27 Oct 2005 09:38:05 -0000
@@ -54,8 +54,8 @@
 {
   
   /**
-   * A listener that responds when components are added to or removed from the
-   * toolbar.  This class is no longer used - the required behaviour is now
+   * A listener (no longer used) that responds when components are added to or 
+   * removed from the address@hidden JToolBar}.  The required behaviour is now
    * handled in the super class. 
    * 
    * @see MetalToolBarUI#createContainerListener()
@@ -73,8 +73,9 @@
   }
 
   /**
-   * A listener that responds to property change events.  This class is no 
-   * longer used - the required behaviour is now handled in the super class. 
+   * A listener (no longer used) that responds to property change events in a
+   * address@hidden JToolBar} component.  The required behaviour is now 
handled in the 
+   * super class. 
    * 
    * @see MetalToolBarUI#createRolloverListener()
    */
Index: javax/swing/plaf/metal/MetalToolTipUI.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalToolTipUI.java,v
retrieving revision 1.4
diff -u -r1.4 MetalToolTipUI.java
--- javax/swing/plaf/metal/MetalToolTipUI.java  4 Oct 2005 15:22:45 -0000       
1.4
+++ javax/swing/plaf/metal/MetalToolTipUI.java  27 Oct 2005 09:38:06 -0000
@@ -64,7 +64,7 @@
 import javax.swing.plaf.basic.BasicToolTipUI;
 
 /**
- * A UI delegate for the address@hidden JToolTip} class.
+ * A UI delegate for the address@hidden JToolTip} component.
  */
 public class MetalToolTipUI
   extends BasicToolTipUI
Index: javax/swing/plaf/metal/MetalTreeUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalTreeUI.java,v
retrieving revision 1.14
diff -u -r1.14 MetalTreeUI.java
--- javax/swing/plaf/metal/MetalTreeUI.java     19 Oct 2005 13:46:03 -0000      
1.14
+++ javax/swing/plaf/metal/MetalTreeUI.java     27 Oct 2005 09:38:06 -0000
@@ -62,6 +62,9 @@
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicTreeUI;
 
+/**
+ * A UI delegate for the address@hidden JTree} component.
+ */
 public class MetalTreeUI extends BasicTreeUI
 {
 
@@ -78,7 +81,7 @@
   private TreeModelListener treeModelListener;
     
   /**
-   * Constructs a new instance of MetalTreeUI.
+   * Constructs a new instance of <code>MetalTreeUI</code>.
    */
   public MetalTreeUI()
   {
@@ -86,11 +89,11 @@
   }
 
   /**
-   * Returns an instance of MetalTreeUI.
+   * Returns a new instance of <code>MetalTreeUI</code>.
    *
    * @param component the component for which we return an UI instance
    *
-   * @return an instance of MetalTreeUI
+   * @return A new instance of <code>MetalTreeUI</code>.
    */
   public static ComponentUI createUI(JComponent component)
   {
Index: javax/swing/plaf/metal/package.html
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/package.html,v
retrieving revision 1.3
diff -u -r1.3 package.html
--- javax/swing/plaf/metal/package.html 2 Jul 2005 20:32:51 -0000       1.3
+++ javax/swing/plaf/metal/package.html 27 Oct 2005 09:38:06 -0000
@@ -40,7 +40,16 @@
 <head><title>GNU Classpath - javax.swing.plaf.metal</title></head>
 
 <body>
-<p>Provides a cross-platform look and feel known as "Metal".</p>
-
+<p>Provides a cross-platform look and feel known as "Metal".  To install this
+look and feel, add the following code (or something similar) 
+near the start of your application:</p>
+<pre>try
+  {
+&nbsp;&nbsp;UIManager.setLookAndFeel(new MetalLookAndFeel());
+  }
+catch (UnsupportedLookAndFeelException e)
+  {
+&nbsp;&nbsp;e.printStackTrace();
+  }</pre>
 </body>
 </html>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]