/[classpath]/classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.3 by gnu_andrew, Sat Sep 10 15:31:52 2005 UTC revision 1.2.2.4 by gnu_andrew, Wed Nov 2 00:44:01 2005 UTC
# Line 53  import javax.swing.plaf.basic.BasicRadio Line 53  import javax.swing.plaf.basic.BasicRadio
53    
54    
55  /**  /**
56   * A UI delegate for the {@link JRadioButton} component under the   * A UI delegate for the {@link JRadioButton} component.
  * {@link MetalLookAndFeel}.  
57   */   */
58  public class MetalRadioButtonUI  public class MetalRadioButtonUI
59    extends BasicRadioButtonUI    extends BasicRadioButtonUI
# Line 70  public class MetalRadioButtonUI Line 69  public class MetalRadioButtonUI
69    protected Color disabledTextColor;    protected Color disabledTextColor;
70        
71    /**    /**
72     * Constructs a new instance of MetalRadioButtonUI.     * Constructs a new instance of <code>MetalRadioButtonUI</code>.
73     */     */
74    public MetalRadioButtonUI()    public MetalRadioButtonUI()
75    {    {
# Line 78  public class MetalRadioButtonUI Line 77  public class MetalRadioButtonUI
77    }    }
78    
79    /**    /**
80     * Returns an instance of MetalRadioButtonUI.     * Returns a new instance of <code>MetalRadioButtonUI</code>.
81     *     *
82     * @param component the component for which we return an UI instance     * @param component the component for which we return an UI instance
83     *     *
84     * @return an instance of MetalRadioButtonUI     * @return A new instance of <code>MetalRadioButtonUI</code>.
85     */     */
86    public static ComponentUI createUI(JComponent component)    public static ComponentUI createUI(JComponent component)
87    {    {
# Line 179  public class MetalRadioButtonUI Line 178  public class MetalRadioButtonUI
178    protected void paintFocus(Graphics g, Rectangle t, Dimension d)    protected void paintFocus(Graphics g, Rectangle t, Dimension d)
179    {    {
180      g.setColor(focusColor);      g.setColor(focusColor);
181      g.drawRect(t.x, t.y, t.width, t.height);      // minus 2 because of line thickness. Prevents border
182      // FIXME: we seem to be drawing too tight a rectangle here, perhaps there      // from being cutoff.
183      // is some padding to do somewhere???      g.drawRect(t.x, t.y, t.width - 2, t.height - 2);
184    }    }
185        
186  }  }

Legend:
Removed from v.1.2.2.3  
changed lines
  Added in v.1.2.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26