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

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

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

revision 1.1.2.3 by gnu_andrew, Tue Sep 20 18:46:34 2005 UTC revision 1.1.2.4 by gnu_andrew, Wed Nov 2 00:43:59 2005 UTC
# Line 79  public class BasicTextFieldUI extends Ba Line 79  public class BasicTextFieldUI extends Ba
79      super.installUI(c);      super.installUI(c);
80    }    }
81    
82      /**
83       * Receives notification whenever one of the text component's bound
84       * properties changes. Here we check for the editable and enabled
85       * properties and adjust the background color accordingly.
86       *
87       * @param event the property change event
88       */
89    protected void propertyChange(PropertyChangeEvent event)    protected void propertyChange(PropertyChangeEvent event)
90    {    {
91      // Does nothing by default.      if (event.getPropertyName().equals("editable"))
92          {
93            if (textComponent.isEditable())
94              textComponent.setBackground(background);
95            else
96              textComponent.setBackground(inactiveBackground);
97          }
98    }    }
99  }  }

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

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