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

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

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

revision 1.10.2.3 by gnu_andrew, Sat Sep 10 15:31:51 2005 UTC revision 1.10.2.4 by gnu_andrew, Wed Nov 2 00:43:54 2005 UTC
# Line 50  import java.beans.PropertyChangeListener Line 50  import java.beans.PropertyChangeListener
50  import javax.swing.Icon;  import javax.swing.Icon;
51  import javax.swing.JComponent;  import javax.swing.JComponent;
52  import javax.swing.JLabel;  import javax.swing.JLabel;
53    import javax.swing.LookAndFeel;
54  import javax.swing.SwingUtilities;  import javax.swing.SwingUtilities;
 import javax.swing.UIDefaults;  
 import javax.swing.UIManager;  
55  import javax.swing.plaf.ComponentUI;  import javax.swing.plaf.ComponentUI;
56  import javax.swing.plaf.LabelUI;  import javax.swing.plaf.LabelUI;
57    
# Line 60  import javax.swing.plaf.LabelUI; Line 59  import javax.swing.plaf.LabelUI;
59   * This is the Basic Look and Feel class for the JLabel.  One BasicLabelUI   * This is the Basic Look and Feel class for the JLabel.  One BasicLabelUI
60   * object is used to paint all JLabels that utilize the Basic Look and Feel.   * object is used to paint all JLabels that utilize the Basic Look and Feel.
61   */   */
62  public class BasicLabelUI  public class BasicLabelUI extends LabelUI implements PropertyChangeListener
     extends LabelUI  
     implements PropertyChangeListener  
63  {  {
64    /** The labelUI that is shared by all labels. */    /** The labelUI that is shared by all labels. */
65    protected static BasicLabelUI labelUI;    protected static BasicLabelUI labelUI;
# Line 345  public class BasicLabelUI Line 342  public class BasicLabelUI
342     */     */
343    protected void installDefaults(JLabel c)    protected void installDefaults(JLabel c)
344    {    {
345      UIDefaults defaults = UIManager.getLookAndFeelDefaults();      LookAndFeel.installColorsAndFont(c, "Label.background", "Label.foreground",
346                                         "Label.font");
     c.setForeground(defaults.getColor("Label.foreground"));  
     c.setBackground(defaults.getColor("Label.background"));  
     c.setFont(defaults.getFont("Label.font"));  
347      //XXX: There are properties we don't use called disabledForeground      //XXX: There are properties we don't use called disabledForeground
348      //and disabledShadow.      //and disabledShadow.
349    }    }
# Line 417  public class BasicLabelUI Line 411  public class BasicLabelUI
411     */     */
412    public void propertyChange(PropertyChangeEvent e)    public void propertyChange(PropertyChangeEvent e)
413    {    {
414      JLabel c = (JLabel) e.getSource();      // What to do here?
     c.revalidate();  
     c.repaint();  
415    }    }
416  }  }

Legend:
Removed from v.1.10.2.3  
changed lines
  Added in v.1.10.2.4

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