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

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

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

revision 1.35 by rabbit78, Thu Sep 8 12:02:46 2005 UTC revision 1.36 by rabbit78, Thu Sep 8 12:44:29 2005 UTC
# Line 347  public abstract class BasicTextUI extend Line 347  public abstract class BasicTextUI extend
347            // Document changed.            // Document changed.
348                modelChanged();                modelChanged();
349          }          }
350        else if (event.getPropertyName().equals("enabled"))        else if (event.getPropertyName().equals("enabled")
351                   || event.getPropertyName().equals("editable"))
352          {          {
353            updateComponentColors();            updateComponentColors();
354          }          }
# Line 1084  public abstract class BasicTextUI extend Line 1085  public abstract class BasicTextUI extend
1085     */     */
1086    void updateComponentColors()    void updateComponentColors()
1087    {    {
1088        if (textComponent.isEditable())
1089          textComponent.setBackground(background);
1090        else
1091          textComponent.setBackground(inactiveBackground);
1092    
1093      if (textComponent.isEnabled())      if (textComponent.isEnabled())
1094        {        textComponent.setForeground(foreground);
         textComponent.setForeground(foreground);  
         textComponent.setBackground(background);  
       }  
1095      else      else
1096        {        textComponent.setForeground(inactiveForeground);
         textComponent.setForeground(inactiveForeground);  
         textComponent.setBackground(inactiveBackground);  
       }  
1097    }    }
1098  }  }

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

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