JAVAFX on ANDROID

Jonathan Giles jonathan.giles at oracle.com
Mon Oct 21 12:28:28 PDT 2013


On 22/10/2013 7:26 a.m., Richard Bair wrote:
>> 3. The Listview shows a scrollbar. That makes me believe that the control doesn't really know that it is running
>> in embedded mode. Maybe the mouse emulation is not possible if the embedded mode is correcly enabled.
>> Where do I enable the embedded mode? I though it is this property android.com.sun.javafx.isEmbedded=true. That's of course enabled
>> in javafx.platform.properties.
> There's some bit of mess here where some places are explicitly checking iOS etc to hide/show stuff instead of just "embedded". Jonathan do you remember all the places to check?

I believe we've switched out all places that used to use the simple
isEmbedded() check to now use Platform.isSupported(ConditionalFeature.*)
checks instead.

In the case of ListView scrollbars, this code is handled in the
VirtualFlow class and checks (indirectly) the
ConditionalFeature.INPUT_TOUCH property for being true (in which case
the scrollbars are hidden when not in use).

I would suggest checking what you get when you call
Platform.isSupported(ConditionalFeature.INPUT_TOUCH).

Additionally, for your interest, you may want to check out some of the
other ConditionalFeature options. Here's some that may be of interest:

    /**
     * Indicates whether an on-screen virtual keyboard is used for text
input.
     * <p>
     * On embedded platforms JavaFX makes an attempt to initialize this
     * ConditionalFeature based on what input peripherals are attached. On
     * desktop platforms this ConditionalFeature will typically default to
     * false.
     * @since JavaFX 8.0
     */
     VIRTUAL_KEYBOARD,

    /**
     * Indicates whether or not a touch screen is attached to the device on
     * which JavaFX in running.
     * <p>
     * On embedded platforms JavaFX makes an attempt to initialize this
     * ConditionalFeature based on what input peripherals are attached. On
     * desktop platforms this ConditionalFeature will typically default to
     * false.
     * @since JavaFX 8.0
     */
     INPUT_TOUCH,

    /**
     * Indicates whether or not a touch screen providing multi-touch
input is
     * attached to the device on which JavaFX in running.
     * <p>
     * On embedded platforms JavaFX makes an attempt to initialize this
     * ConditionalFeature based on what input peripherals are attached. On
     * desktop platforms this ConditionalFeature will typically default to
     * false.
     * <p>
     * If INPUT_MULTITOUCH is available then INPUT_TOUCH is also available.
     * @since JavaFX 8.0
     */
     INPUT_MULTITOUCH,

    /**
     * Indicates whether or not a relative motion pointer device such as a
     * mouse, trackpad or trackball is attached.
     * <p>
     * On embedded platforms JavaFX makes an attempt to initialize this
     * ConditionalFeature based on what input peripherals are attached. On
     * desktop platforms this ConditionalFeature will typically default to
     * true.
     * @since JavaFX 8.0
     */
    INPUT_POINTER

-- Jonathan


More information about the openjfx-dev mailing list