/hg/icedtea-web: Use SwingUtilities.getWindowAncestor() rather t...
aazores at icedtea.classpath.org
aazores at icedtea.classpath.org
Wed Jun 25 15:27:53 UTC 2014
changeset 41f11931f7d7 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=41f11931f7d7
author: Andrew Azores <aazores at redhat.com>
date: Wed Jun 25 11:27:34 2014 -0400
Use SwingUtilities.getWindowAncestor() rather than manual search
2014-06-25 Andrew Azores <aazores at redhat.com>
* netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
(setupLayout) use SwingUtilities.getWindowAncestor() rather than manually
searching
diffstat:
ChangeLog | 6 ++++
netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java | 14 ++-------
2 files changed, 9 insertions(+), 11 deletions(-)
diffs (45 lines):
diff -r 2446d336d306 -r 41f11931f7d7 ChangeLog
--- a/ChangeLog Tue Jun 24 09:42:50 2014 -0400
+++ b/ChangeLog Wed Jun 25 11:27:34 2014 -0400
@@ -1,3 +1,9 @@
+2014-06-25 Andrew Azores <aazores at redhat.com>
+
+ * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
+ (setupLayout) use SwingUtilities.getWindowAncestor() rather than manually
+ searching
+
2014-06-24 Andrew Azores <aazores at redhat.com>
* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: removed hunk of
diff -r 2446d336d306 -r 41f11931f7d7 netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
--- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java Tue Jun 24 09:42:50 2014 -0400
+++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java Wed Jun 25 11:27:34 2014 -0400
@@ -39,7 +39,6 @@
import static net.sourceforge.jnlp.runtime.Translator.R;
import java.awt.Color;
-import java.awt.Container;
import java.awt.Dialog.ModalityType;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
@@ -1068,17 +1067,10 @@
if (e.getButton() == MouseEvent.BUTTON3) {
groupPanel.setVisible(!groupPanel.isVisible());
PolicyEditor.this.validate();
- Container c = PolicyEditor.this.getParent();
- // find the window and repack it
- while (!(c instanceof Window)) {
- if (c == null) {
- return;
- }
- c = c.getParent();
+ final Window w = SwingUtilities.getWindowAncestor(PolicyEditor.this);
+ if (w != null) {
+ w.pack();
}
- final Window w = (Window) c;
- w.pack();
-
}
}
});
More information about the distro-pkg-dev
mailing list