/[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.19 by langel, Fri Aug 5 12:28:04 2005 UTC revision 1.20 by trebligd, Fri Aug 26 18:17:57 2005 UTC
# Line 295  public class BasicMenuItemUI extends Men Line 295  public class BasicMenuItemUI extends Men
295     * Returns preferred size for the given menu item.     * Returns preferred size for the given menu item.
296     *     *
297     * @param c menu item for which to get preferred size     * @param c menu item for which to get preferred size
298     * @param checkIcon chech icon displayed in the given menu item     * @param checkIcon check icon displayed in the given menu item
299     * @param arrowIcon arrow icon displayed in the given menu item     * @param arrowIcon arrow icon displayed in the given menu item
300     * @param defaultTextIconGap space between icon and text in the given menuItem     * @param defaultTextIconGap space between icon and text in the given menuItem
301     *     *
# Line 533  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    if (m.isSelected())          checkIcon.paintIcon(m, g, cr.x, cr.y);
     checkIcon.paintIcon(m, g, cr.x, cr.y);  
   UIDefaults defaults = UIManager.getLookAndFeelDefaults();  
   defaults.getBorder("CheckBox.border").paintBorder(m, g, cr.x, cr.y,  
       cr.width, cr.height);  
   
537          // We need to calculate position of the menu text and position of          // We need to calculate position of the menu text and position of
538          // user menu icon if there exists one relative to the check icon.          // user menu icon if there exists one relative to the check icon.
539          // So we need to adjust view rectangle s.t. its starting point is at          // So we need to adjust view rectangle s.t. its starting point is at
# Line 567  public class BasicMenuItemUI extends Men Line 562  public class BasicMenuItemUI extends Men
562                                         defaultTextIconGap);                                         defaultTextIconGap);
563      if (i != null)      if (i != null)
564        i.paintIcon(c, g, ir.x, ir.y);        i.paintIcon(c, g, ir.x, ir.y);
   
565      paintText(g, m, tr, m.getText());      paintText(g, m, tr, m.getText());
566    
567      // paint accelerator          // paint accelerator    

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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