Class TLspTouchCreateController

All Implemented Interfaces:
ILcdUndoableSource, ILcdAWTEventListener, ILspController

public class TLspTouchCreateController extends TLspCreateController
Touch enabled version of the 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 TLcdTouchEvents. 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).

Since:
2012.0
  • Constructor Details

    • TLspTouchCreateController

      public TLspTouchCreateController(ALspCreateControllerModel aCreateControllerModel)
      Creates a new TLspTouchCreateController using the provided create controller model.
      Parameters:
      aCreateControllerModel - the create controller model.
  • Method Details

    • handleAWTEventImpl

      public AWTEvent handleAWTEventImpl(AWTEvent aEvent)
      Description copied from class: ALspController
      Called by 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 TLcdTouchEvents). When the controller did not use the given event, it is returned unaltered.
      Overrides:
      handleAWTEventImpl in class TLspCreateController
      Parameters:
      aEvent - the event to be handled.
      Returns:
      null when the input event was consumed, the (possibly modified) input event when it was (partially) consumed.
    • handleFXEvent

      public void handleFXEvent(Event aEvent)
      Description copied from class: ALspController
      Delegates to 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.
      Specified by:
      handleFXEvent in interface ILspController
      Overrides:
      handleFXEvent in class ALspController
      Parameters:
      aEvent - the event to be handled