forked from pool/swingx
1.6.5.1 OBS-URL: https://build.opensuse.org/request/show/969167 OBS-URL: https://build.opensuse.org/package/show/Java:packages/swingx?expand=0&rev=25
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
--- swingx-common/src/main/java/org/jdesktop/swingx/util/JVM.java 2012-08-13 13:32:35.000000000 -0400
|
|
+++ swingx-common/src/main/java/org/jdesktop/swingx/util/JVM.java 2014-06-10 11:15:49.128819697 -0400
|
|
@@ -38,6 +38,8 @@
|
|
public final static int JDK1_6 = 1600;
|
|
public final static int JDK1_6N = 1610;
|
|
public final static int JDK1_7 = 1700;
|
|
+ public final static int JDK1_8 = 1800;
|
|
+ public final static int JDK1_9 = 1900;
|
|
|
|
private static JVM current;
|
|
static {
|
|
@@ -66,7 +68,11 @@
|
|
* Constructor for the OS object
|
|
*/
|
|
public JVM(String p_JavaVersion) {
|
|
- if (p_JavaVersion.startsWith("1.7.")) {
|
|
+ if (p_JavaVersion.startsWith("1.9.")) {
|
|
+ jdkVersion = JDK1_9;
|
|
+ } else if (p_JavaVersion.startsWith("1.8.")) {
|
|
+ jdkVersion = JDK1_8;
|
|
+ } else if (p_JavaVersion.startsWith("1.7.")) {
|
|
jdkVersion = JDK1_7;
|
|
} else if (p_JavaVersion.startsWith("1.6.")) {
|
|
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
|
|
@@ -137,4 +143,12 @@
|
|
return jdkVersion == JDK1_7;
|
|
}
|
|
|
|
-}
|
|
\ No newline at end of file
|
|
+ public boolean isOneDotEight() {
|
|
+ return jdkVersion == JDK1_8;
|
|
+ }
|
|
+
|
|
+ public boolean isOneDotNine() {
|
|
+ return jdkVersion == JDK1_9;
|
|
+ }
|
|
+
|
|
+}
|