public class SwtToFXGestureConverter extends java.lang.Object implements GestureListener
GestureEvent
s to
an FXCanvas
.Modifier and Type | Class and Description |
---|---|
protected class |
SwtToFXGestureConverter.State
Represents the current
SwtToFXGestureConverter.State of touch gesture interaction. |
Constructor and Description |
---|
SwtToFXGestureConverter(javafx.embed.swt.FXCanvas canvas)
Registers event forwarding for the given
FXCanvas . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
changeState(org.eclipse.gef4.fx.ui.gestures.SwtToFXGestureConverter.StateType newStateType,
GestureEvent event,
com.sun.javafx.tk.TKSceneListener sceneListener)
Changes the internal
SwtToFXGestureConverter.State of the currently performed touch
gesture and sends the appropriate events to JavaFX. |
void |
dispose()
Unregisters event forwarding from the
FXCanvas for which this
SwtToFXGestureConverter was created. |
void |
gesture(GestureEvent event) |
protected void |
sendGestureEventToFX(GestureEvent event)
Converts the given
GestureEvent to a corresponding JavaFX event
and sends it to the JavaFX scene graph of the FXCanvas which is
associated with this SwtToFXGestureConverter . |
public SwtToFXGestureConverter(javafx.embed.swt.FXCanvas canvas)
FXCanvas
.canvas
- The FXCanvas
for which event forwarding is registered.protected boolean changeState(org.eclipse.gef4.fx.ui.gestures.SwtToFXGestureConverter.StateType newStateType, GestureEvent event, com.sun.javafx.tk.TKSceneListener sceneListener)
SwtToFXGestureConverter.State
of the currently performed touch
gesture and sends the appropriate events to JavaFX.newStateType
- The new StateType
.event
- The GestureEvent
which was performed.sceneListener
- The TKSceneListener
to which the corresponding JavaFX
event is send.true
when the StateType
is changed,
otherwise false
.public void dispose()
FXCanvas
for which this
SwtToFXGestureConverter
was created.public void gesture(GestureEvent event)
gesture
in interface GestureListener
protected void sendGestureEventToFX(GestureEvent event)
GestureEvent
to a corresponding JavaFX event
and sends it to the JavaFX scene graph of the FXCanvas
which is
associated with this SwtToFXGestureConverter
.event
- The GestureEvent
to send to JavaFX.Copyright (c) 2014 itemis AG and others. All rights reserved.