From 9eb0e16bd71dfc2be7560a1c1f7021c231b16be8 Mon Sep 17 00:00:00 2001 From: azvegint Date: Tue, 9 Sep 2014 16:08:34 +0400 Subject: [PATCH] 8057770: api/javax_swing/JScrollPane/indexTGF.html#UpdateUI failed with MotifLookAndFeel on all platform Reviewed-by: alexsch, serb --- .../sun/java/swing/plaf/motif/MotifScrollPaneUI.java | 10 +++++++--- src/solaris/classes/sun/awt/X11/XTextAreaPeer.java | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java b/src/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java index 2a12ed8ed..52bc73855 100644 --- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java +++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java @@ -1,5 +1,5 @@ /* - * 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. * * This code is free software; you can redistribute it and/or modify it @@ -56,19 +56,22 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI private PropertyChangeListener propertyChangeHandler; + @Override protected void installListeners(JScrollPane scrollPane) { super.installListeners(scrollPane); propertyChangeHandler = createPropertyChangeHandler(); scrollPane.addPropertyChangeListener(propertyChangeHandler); } - protected void uninstallListeners(JScrollPane scrollPane) { + @Override + protected void uninstallListeners(JComponent scrollPane) { super.uninstallListeners(scrollPane); scrollPane.removePropertyChangeListener(propertyChangeHandler); } private PropertyChangeListener createPropertyChangeHandler() { return new PropertyChangeListener() { + @Override public void propertyChange(PropertyChangeEvent e) { String propertyName = e.getPropertyName(); @@ -92,6 +95,7 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI }}; } + @Override protected void installDefaults(JScrollPane scrollpane) { super.installDefaults(scrollpane); @@ -115,7 +119,7 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI } } - + @Override protected void uninstallDefaults(JScrollPane c) { super.uninstallDefaults(c); diff --git a/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java b/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java index 7c7b2d193..4092e8546 100644 --- a/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java +++ b/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java @@ -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); scrollPane.removePropertyChangeListener(propertyChangeHandler); } -- GitLab