/[classpath]/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicMenuItemUI.java

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

revision 1.7.2.4 by gnu_andrew, Tue Aug 2 20:12:38 2005 UTC revision 1.7.2.5 by gnu_andrew, Sun Aug 7 18:34:11 2005 UTC
# Line 355  public class BasicMenuItemUI extends Men Line 355  public class BasicMenuItemUI extends Men
355     */     */
356    public Dimension getPreferredSize(JComponent c)    public Dimension getPreferredSize(JComponent c)
357    {    {
358      return getPreferredMenuItemSize(c, checkIcon, arrowIcon, defaultTextIconGap);      return getPreferredMenuItemSize(c, checkIcon, arrowIcon,
359            defaultTextIconGap);
360    }    }
361    
362    protected String getPropertyPrefix()    protected String getPropertyPrefix()
# Line 532  public class BasicMenuItemUI extends Men Line 533  public class BasicMenuItemUI extends Men
533          SwingUtilities.layoutCompoundLabel(m, fm, null, checkIcon, vertAlign,          SwingUtilities.layoutCompoundLabel(m, fm, null, checkIcon, vertAlign,
534                                             horAlign, vertTextPos, horTextPos,                                             horAlign, vertTextPos, horTextPos,
535                                             vr, cr, tr, defaultTextIconGap);                                             vr, cr, tr, defaultTextIconGap);
536          checkIcon.paintIcon(m, g, cr.x, cr.y);    if (m.isSelected())
537        checkIcon.paintIcon(m, g, cr.x, cr.y);
538      UIDefaults defaults = UIManager.getLookAndFeelDefaults();
539      defaults.getBorder("CheckBox.border").paintBorder(m, g, cr.x, cr.y,
540          cr.width, cr.height);
541    
542          // We need to calculate position of the menu text and position of          // We need to calculate position of the menu text and position of
543          // user menu icon if there exists one relative to the check icon.          // user menu icon if there exists one relative to the check icon.

Legend:
Removed from v.1.7.2.4  
changed lines
  Added in v.1.7.2.5

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