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

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

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

revision 1.26 by trebligd, Thu Sep 15 20:24:14 2005 UTC revision 1.27 by rabbit78, Tue Sep 20 09:51:52 2005 UTC
# Line 132  public class BasicButtonUI extends Butto Line 132  public class BasicButtonUI extends Butto
132      b.setIconTextGap(defaults.getInt(prefix + "textIconGap"));      b.setIconTextGap(defaults.getInt(prefix + "textIconGap"));
133      b.setInputMap(JComponent.WHEN_FOCUSED,      b.setInputMap(JComponent.WHEN_FOCUSED,
134                    (InputMap) defaults.get(prefix + "focusInputMap"));                    (InputMap) defaults.get(prefix + "focusInputMap"));
135        b.setRolloverEnabled(defaults.getBoolean(prefix + "rollover"));
136      b.setOpaque(true);      b.setOpaque(true);
137    }    }
138    
# Line 408  public class BasicButtonUI extends Butto Line 409  public class BasicButtonUI extends Butto
409    
410      if (b.isEnabled())      if (b.isEnabled())
411        {        {
412          g.setColor(b.getForeground());          g.setColor(b.getForeground());
413          g.drawString(text, textRect.x, textRect.y + fm.getAscent());          g.drawString(text, textRect.x, textRect.y + fm.getAscent());
414        }        }
415      else      else
416        {        {
417          g.setColor(b.getBackground().brighter());          UIDefaults defaults = UIManager.getLookAndFeelDefaults();
418          g.drawString(text, textRect.x, textRect.y + fm.getAscent());          String prefix = getPropertyPrefix();
419          g.setColor(b.getBackground().darker());          g.setColor(defaults.getColor(prefix + "disabledText"));
420          g.drawString(text, textRect.x + 1, textRect.y + fm.getAscent() + 1);          g.drawString(text, textRect.x, textRect.y + fm.getAscent());
421        }        }
422    }    }
423  }  }

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

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