public class TLspClickActionController extends ALspActionController
This controller will execute a given action based on
MOUSE_CLICKED events. Only when
the number of clicks reaches the chosen click count, will the action be executed. There will be a slight
delay to make sure no further click is received. As soon as is apparent that the required number of clicks
is not going to be reached or is going to be exceeded, all relevant events (
MOUSE_CLICKED)are passed to the next controller
in the chain. Note that the value of the AWT toolkit property "awt.multiClickInterval" is used
to check the exact number of clicks. Increasing this value might make it easier to pull off multi-clicks.
Note: This controller only handles
MouseEvents. All other events are immediately passed
to the next controller in the chain.
Note: If you append more then one controller of this kind, to avoid consecutive multi click delays, append them in order of click count, for instance first the double click controller, then the triple click controller.
Warning: This controller will only behave correctly if it receives all relevant mouse events.
For instance if it gets a
MOUSE_PRESSED, it needs to receive all
MOUSE_CLICKED events that correspond with it. This means you have
be careful when applying filters, or when appending this controller after other chainable controllers which
might consume some of these events.
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns the action that will be triggered once the configured click count is reached.
Sets the action that wil be triggered once the configured click count is reached.
addPropertyChangeListener, addStatusListener, appendController, firePropertyChange, fireStatusEvent, getAWTFilter, getCursor, getFXCursor, getFXFilter, getIcon, getLayered, getName, getNextController, getShortDescription, getView, handleAWTEvent, handleFXEvent, handleFXEventImpl, paint, paintImpl, registerViewPropertyNameForReset, removePropertyChangeListener, removeStatusListener, setAWTFilter, setCursor, setFXCursor, setFXFilter, setIcon, setName, setShortDescription, startInteraction, startInteractionImpl, terminateInteraction, terminateInteractionImpl
public TLspClickActionController(ILcdAction aAction, int aClickCount)
TLspClickActionController. The passed action will be triggered after a number of mouse clicks corresponding to the passed click count.
aAction- The action to trigger.
aClickCount- How many clicks it takes to trigger the action.
public ILcdAction getAction()
public void setAction(ILcdAction aAction)
aAction- the action to trigger.
public java.awt.AWTEvent handleAWTEventImpl(java.awt.AWTEvent aAWTEvent)
nullwhen 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.