Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8102645

Provide API to discover embedded device capabilities

    Details

      Description

      Provide a way to query:

       - Does this device have touch support?
       - Does this device have full focus navigation support?
       - Is this device using a virtual keyboard?

      Provide the following ConditionalFeatures:

      INPUT_TOUCH - do we have touch support. The default value is based on the current state of attached input devices, but can be overridden by the boolean system property com.sun.javafx.touch
      INPUT_TOUCH_MULTIPLE - do we have multi-point touch support. The default value is based on the current state of attached input devices, but can be overridden by the boolean system property com.sun.javafx.multiTouch
      INPUT_POINTER - do we have a relative motion pointer device attached (for example, a mouse or trackball)? The default value is based on the current state of attached input devices, but can be overridden by the boolean system property com.sun.javafx.pointer
      TWO_LEVEL_FOCUS - do we need to use a two-level focus policy due to insufficient navigation keys? The default value is set by the keys available on the device, but can be overridden by setting -Dcom.sun.javafx.twoLevelFocus=true.
      VIRTUAL_KEYBOARD - is the virtual keyboard enabled? The default value is based on whether or not touch is available and what input keys are available , but can be overridden by the system property com.sun.javafx.virtualKeyboard.

      The current command-line switch for virtual keyboard is "com.sun.javafx.isEmbedded". We will change this to "com.sun.javafx.virtualKeyboard" with values "none", "native", or "javafx".
       - none: No virtual keyboard is provided. Input is only available from whatever key devices are attached.
       - native: A virtual keyboard provided by the system graphics libraries is used. If no such virtual keyboard is available, this is equivalent to "javafx"
       - javafx: A virtual keyboard provided by JavaFX is used.

      If javafx.virtualKeyboard is not set, a virtual keyboard will be shown on touch devices that do not have a full alphanumeric keyboard.

      Platform.isSupported for a ConditionalFeature related to input devices should reflect the current state of attached input devices, not the state at startup or when the support was first queried. So if Platform.isSupported(ConditionalFeature.TOUCH) is initially false but then a touch screen is connected while the JavaFX application is running, further calls Platform.isSupported(ConditionalFeature.TOUCH) should return true until the touch screen is detached.

      Scope of this feature in JavaFX 8.0:
       - Implement this feature for embedded Linux platforms only, with sensible defaults that work for most desktops:
          - INPUT_TOUCH and INPUT_MULTI_TOUCH will default to false on the desktop
          - INPUT_POINTER will default to true on the desktop

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dblaukop Daniel Blaukopf (Inactive)
                Reporter:
                dblaukop Daniel Blaukopf (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: