提交 9eb0e16b 编写于 作者: A azvegint

8057770: api/javax_swing/JScrollPane/indexTGF.html#UpdateUI failed with...

8057770: api/javax_swing/JScrollPane/indexTGF.html#UpdateUI failed with MotifLookAndFeel on all platform
Reviewed-by: alexsch, serb
上级 897a005e
/* /*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -56,19 +56,22 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI ...@@ -56,19 +56,22 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI
private PropertyChangeListener propertyChangeHandler; private PropertyChangeListener propertyChangeHandler;
@Override
protected void installListeners(JScrollPane scrollPane) { protected void installListeners(JScrollPane scrollPane) {
super.installListeners(scrollPane); super.installListeners(scrollPane);
propertyChangeHandler = createPropertyChangeHandler(); propertyChangeHandler = createPropertyChangeHandler();
scrollPane.addPropertyChangeListener(propertyChangeHandler); scrollPane.addPropertyChangeListener(propertyChangeHandler);
} }
protected void uninstallListeners(JScrollPane scrollPane) { @Override
protected void uninstallListeners(JComponent scrollPane) {
super.uninstallListeners(scrollPane); super.uninstallListeners(scrollPane);
scrollPane.removePropertyChangeListener(propertyChangeHandler); scrollPane.removePropertyChangeListener(propertyChangeHandler);
} }
private PropertyChangeListener createPropertyChangeHandler() { private PropertyChangeListener createPropertyChangeHandler() {
return new PropertyChangeListener() { return new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent e) { public void propertyChange(PropertyChangeEvent e) {
String propertyName = e.getPropertyName(); String propertyName = e.getPropertyName();
...@@ -92,6 +95,7 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI ...@@ -92,6 +95,7 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI
}}; }};
} }
@Override
protected void installDefaults(JScrollPane scrollpane) { protected void installDefaults(JScrollPane scrollpane) {
super.installDefaults(scrollpane); super.installDefaults(scrollpane);
...@@ -115,7 +119,7 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI ...@@ -115,7 +119,7 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI
} }
} }
@Override
protected void uninstallDefaults(JScrollPane c) { protected void uninstallDefaults(JScrollPane c) {
super.uninstallDefaults(c); super.uninstallDefaults(c);
......
...@@ -1024,7 +1024,8 @@ final class XTextAreaPeer extends XComponentPeer implements TextAreaPeer { ...@@ -1024,7 +1024,8 @@ final class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
} }
} }
protected void uninstallListeners(JScrollPane scrollPane) { @Override
protected void uninstallListeners(JComponent scrollPane) {
super.uninstallListeners(scrollPane); super.uninstallListeners(scrollPane);
scrollPane.removePropertyChangeListener(propertyChangeHandler); scrollPane.removePropertyChangeListener(propertyChangeHandler);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册