diff options
author | Emmanuel Bourg <ebourg@apache.org> | 2019-01-01 21:08:53 +0100 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2019-01-01 21:08:53 +0100 |
commit | 633cdd27cb8169afe33963fa4bb1f7eb7437ed58 (patch) | |
tree | 34cb58ad09e83729059541c3f6f514cc5abc8868 | |
parent | 7c875065b8c4c7c44bdd45110c50bbf00fb15008 (diff) |
Fixes the compatibility with Java 9archive/debian/3.0.5-1
Forwarded: no
Gbp-Pq: Name java9-compatibility.diff
-rwxr-xr-x | build.xml | 3 | ||||
-rw-r--r-- | src/main/java/com/vlsolutions/swing/docking/DockingUtilities.java | 9 |
2 files changed, 4 insertions, 8 deletions
@@ -52,6 +52,7 @@ <javac destdir="${build.dir}"
classpath="${classpath};"
+ encoding="ISO-8859-1"
debug="on" deprecation="off" optimize="on" includeantruntime="false">
<src path="${src.dir}"/>
<include name="com/vldocking/**"/>
@@ -127,4 +128,4 @@ </target>
</project>
-<!-- End of build.xml -->
\ No newline at end of file +<!-- End of build.xml -->
diff --git a/src/main/java/com/vlsolutions/swing/docking/DockingUtilities.java b/src/main/java/com/vlsolutions/swing/docking/DockingUtilities.java index bff8d47..7e1573f 100644 --- a/src/main/java/com/vlsolutions/swing/docking/DockingUtilities.java +++ b/src/main/java/com/vlsolutions/swing/docking/DockingUtilities.java @@ -19,7 +19,6 @@ You can read the complete license here : package com.vlsolutions.swing.docking; import java.awt.*; -import java.awt.peer.LightweightPeer; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; @@ -291,9 +290,7 @@ public class DockingUtilities { public static boolean isHeavyWeightComponent(Component comp) { if(comp instanceof Container) { // short cut - @SuppressWarnings("deprecation") - Object peer = comp.getPeer(); - if(! (peer == null || peer instanceof LightweightPeer)) { + if (comp.isDisplayable() && !comp.isLightweight()){ // it's not a lightweight return true; } else { @@ -308,9 +305,7 @@ public class DockingUtilities { return false; } } else { - @SuppressWarnings("deprecation") - Object peer = comp.getPeer(); - return ! (peer == null || peer instanceof LightweightPeer); + return comp.isDisplayable() && !comp.isLightweight(); } } |