diff options
author | Roman Kennke <roman@kennke.org> | 2005-11-14 12:16:43 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2005-11-14 12:16:43 +0000 |
commit | 788e4fd1f5001c9afccb70509effa9e2e27368c1 (patch) | |
tree | cb45be8adcc3aba8fdb8ee3f4ba14132e457a259 | |
parent | 97d36821cda097539d562b6d8c44a769b6c1c3ae (diff) | |
download | classpath-788e4fd1f5001c9afccb70509effa9e2e27368c1.tar.gz |
2005-11-14 Roman Kennke <kennke@aicas.com>
* javax/swing/plaf/basic/BasicTextFieldUI.java
(propertyChange): Get new value from the PropertyChangeEvent and
not from the component itself (since when it receives the event,
the component still has the old state).
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | javax/swing/plaf/basic/BasicTextFieldUI.java | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,12 @@ 2005-11-14 Roman Kennke <kennke@aicas.com> + * javax/swing/plaf/basic/BasicTextFieldUI.java + (propertyChange): Get new value from the PropertyChangeEvent and + not from the component itself (since when it receives the event, + the component still has the old state). + +2005-11-14 Roman Kennke <kennke@aicas.com> + * javax/swing/plaf/basic/BasicTextUI.java (uninstallListeners): Uninstall the document listener here. (getVisibleEditorRect): Fetch the textComponent via getComponent(). diff --git a/javax/swing/plaf/basic/BasicTextFieldUI.java b/javax/swing/plaf/basic/BasicTextFieldUI.java index e1422c438..4e2ca9f93 100644 --- a/javax/swing/plaf/basic/BasicTextFieldUI.java +++ b/javax/swing/plaf/basic/BasicTextFieldUI.java @@ -90,7 +90,8 @@ public class BasicTextFieldUI extends BasicTextUI { if (event.getPropertyName().equals("editable")) { - if (textComponent.isEditable()) + boolean editable = ((Boolean) event.getNewValue()).booleanValue(); + if (editable) textComponent.setBackground(background); else textComponent.setBackground(inactiveBackground); |