summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2005-11-14 12:16:43 +0000
committerRoman Kennke <roman@kennke.org>2005-11-14 12:16:43 +0000
commit788e4fd1f5001c9afccb70509effa9e2e27368c1 (patch)
treecb45be8adcc3aba8fdb8ee3f4ba14132e457a259
parent97d36821cda097539d562b6d8c44a769b6c1c3ae (diff)
downloadclasspath-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--ChangeLog7
-rw-r--r--javax/swing/plaf/basic/BasicTextFieldUI.java3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a479a16c1..ddf5f9e8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);