Hi Lillian,

Am Dienstag, den 01.11.2005, 10:10 -0500 schrieb Lillian Angel:
> > > public class BasicCheckBoxMenuItemUI extends BasicMenuItemUI
> > > {
> > >+  
> > >+  /**
> > >+   * Creates a new BasicCheckBoxMenuItemUI object.
> > >+   */
> > >+  public BasicCheckBoxMenuItemUI()
> > >+  {
> > >+    super();
> > >+    UIDefaults defaults = UIManager.getLookAndFeelDefaults();
> > >+    checkIcon = UIManager.getIcon("CheckBoxMenuItem.checkIcon");
> > >+  }
> > >+  
> > 
> > You don't need the defaults variable here. Also I would think that the
> > checkIcon should actually be loaded by the BasicMenuItemUI via the
> > getPropertyPrefix method.
> 
> I disagree. The prefix for BasicMenuItemUI is 'MenuItem'. The prefix for
> BasicCheckBoxMenuItemUI is 'CheckBoxMenuItem'. If I changed it so
> BasicMenuItemUI loads the checkIcon, the correct icon would not be
> loaded.

If you load it in BasicMenuItemUI, using the getPropertyPrefix() method,
you would load MenuItem.checkIcon in BasicMenuItemUI and
CheckBoxMenuItem.checkIcon in BasicCheckBoxMenuItemUI since
getPropertyPrefix is overridden in BasicCheckBoxMenuItemUI.

/Roman

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to