public class TLspTouchCreateController extends TLspCreateController
TLspCreateController
.
This controller will behave almost exactly the same as the TLspCreateController
, but
will have some specific settings for touch based devices. The most important of these is that this
controller will filter out all input events that are not TLcdTouchEvent
s. The reason for this is
that some touch based devices send both mouse and touch events to the application, which could
cause the controller to get flooded with events and possibly do things twice.
The handleFXEvent(Event aEvent) converts the native JavaFX TouchEvent
to a TLcdTouchEvent
and passes it to the ALspController.handleAWTEvent(AWTEvent aEvent).
Constructor and Description |
---|
TLspTouchCreateController(ALspCreateControllerModel aCreateControllerModel)
Creates a new TLspTouchCreateController using the provided create controller model.
|
Modifier and Type | Method and Description |
---|---|
AWTEvent |
handleAWTEventImpl(AWTEvent aEvent)
Called by
handleAWTEvent . |
void |
handleFXEvent(javafx.event.Event aEvent)
Delegates to
handleFXEventImpl . |
addUndoableListener, cancel, commit, finish, fireUndoableHappened, getActionToTriggerAfterCommit, getControllerModel, getHandleStyler, getLayered, getSnapperProvider, getSnapperStyler, getStringTranslator, handleFXEventImpl, isCancelOnTerminateInteraction, nextStep, paint, removeUndoableListener, setActionToTriggerAfterCommit, setCancelOnTerminateInteraction, setHandleStyler, setSnapperProvider, setSnapperStyler, setStringTranslator, startInteractionImpl, terminateInteraction, terminateInteractionImpl
addPropertyChangeListener, addStatusListener, appendController, firePropertyChange, fireStatusEvent, getAWTFilter, getCursor, getFXCursor, getFXFilter, getIcon, getName, getNextController, getShortDescription, getView, handleAWTEvent, paintImpl, registerViewPropertyNameForReset, removePropertyChangeListener, removeStatusListener, setAWTFilter, setCursor, setFXCursor, setFXFilter, setIcon, setName, setShortDescription, startInteraction
public TLspTouchCreateController(ALspCreateControllerModel aCreateControllerModel)
aCreateControllerModel
- the create controller model.public AWTEvent handleAWTEventImpl(AWTEvent aEvent)
ALspController
handleAWTEvent
.
Returns null
when the controller consumed the event or a partially consumed event
when the controller partially consumed the event (which could happen with
TLcdTouchEvent
s). When the controller did not use the given event, it is returned
unaltered.handleAWTEventImpl
in class TLspCreateController
aEvent
- the event to be handled.null
when the input event was consumed, the (possibly modified) input
event when it was (partially) consumed.public void handleFXEvent(javafx.event.Event aEvent)
ALspController
handleFXEventImpl
.
If that method does not return null
, the result is passed on to the next controller in the chain (if one exists).
If the controller has a filter that does not accept the event, the event is not delegated
and is immediately passed on to the next controller.handleFXEvent
in interface ILspController
handleFXEvent
in class ALspController
aEvent
- the event to be handled