changeset 5286:cee9deb1d5e9

RT-28495: Implement Platform.isSupported(INPUT_METHOD) Reviewed-by: kcr, snorthov
author art
date Mon, 07 Oct 2013 15:40:28 +0400
parents 8f1dc4526871
children 70451c5d10df
files modules/graphics/src/main/java/com/sun/glass/ui/Application.java modules/graphics/src/main/java/com/sun/glass/ui/gtk/GtkApplication.java modules/graphics/src/main/java/com/sun/glass/ui/mac/MacApplication.java modules/graphics/src/main/java/com/sun/glass/ui/win/WinApplication.java modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java
diffstat 5 files changed, 29 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/Application.java	Mon Oct 07 15:20:16 2013 +0400
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/Application.java	Mon Oct 07 15:40:28 2013 +0400
@@ -647,8 +647,17 @@
     protected abstract int staticView_getMultiClickMaxX();
     protected abstract int staticView_getMultiClickMaxY();
 
+    protected boolean _supportsInputMethods() {
+        // Overridden in subclasses
+        return false;
+    }
+    public final boolean supportsInputMethods() {
+        checkEventThread();
+        return _supportsInputMethods();
+    }
+
     protected abstract boolean _supportsTransparentWindows();
-    public boolean supportsTransparentWindows() {
+    public final boolean supportsTransparentWindows() {
         checkEventThread();
         return _supportsTransparentWindows();
     }
@@ -674,16 +683,16 @@
     }
 
     protected abstract boolean _supportsUnifiedWindows();
-    public boolean supportsUnifiedWindows() {
+    public final boolean supportsUnifiedWindows() {
         checkEventThread();
         return _supportsUnifiedWindows();
     }
 
     protected boolean _supportsSystemMenu() {
-        //Only Mac supports system menu
+        // Overridden in subclasses
         return false;
     }
-    public boolean supportsSystemMenu() {
+    public final boolean supportsSystemMenu() {
         checkEventThread();
         return _supportsSystemMenu();
     }
--- a/modules/graphics/src/main/java/com/sun/glass/ui/gtk/GtkApplication.java	Mon Oct 07 15:20:16 2013 +0400
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/gtk/GtkApplication.java	Mon Oct 07 15:40:28 2013 +0400
@@ -304,6 +304,11 @@
     protected native int staticView_getMultiClickMaxY();
 
     @Override
+    protected boolean _supportsInputMethods() {
+        return true;
+    }
+
+    @Override
     protected native boolean _supportsTransparentWindows();
 
     @Override protected boolean _supportsUnifiedWindows() {
--- a/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacApplication.java	Mon Oct 07 15:20:16 2013 +0400
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacApplication.java	Mon Oct 07 15:40:28 2013 +0400
@@ -277,6 +277,11 @@
     }
 
     @Override
+    protected boolean _supportsInputMethods() {
+        return true;
+    }
+
+    @Override
     protected boolean _supportsTransparentWindows() {
         return true;
     }
--- a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinApplication.java	Mon Oct 07 15:20:16 2013 +0400
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinApplication.java	Mon Oct 07 15:40:28 2013 +0400
@@ -242,6 +242,11 @@
     }
 
     @Override
+    protected boolean _supportsInputMethods() {
+        return true;
+    }
+
+    @Override
     protected boolean _supportsTransparentWindows() {
         return true;
     }
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java	Mon Oct 07 15:20:16 2013 +0400
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java	Mon Oct 07 15:40:28 2013 +0400
@@ -1077,7 +1077,7 @@
             case SHAPE_CLIP:
                 return true;
             case INPUT_METHOD:
-                return false;     // TODO: RT-28495, implement input method query
+                return Application.GetApplication().supportsInputMethods();
             case TRANSPARENT_WINDOW:
                 return Application.GetApplication().supportsTransparentWindows();
             case UNIFIED_WINDOW: