public static final class WidgetAction.Chain extends Object implements WidgetAction
WidgetAction.Adapter, WidgetAction.Chain, WidgetAction.LockedAdapter, WidgetAction.State, WidgetAction.WidgetDropTargetDragEvent, WidgetAction.WidgetDropTargetDropEvent, WidgetAction.WidgetDropTargetEvent, WidgetAction.WidgetEvent, WidgetAction.WidgetFocusEvent, WidgetAction.WidgetKeyEvent, WidgetAction.WidgetLocationEvent, WidgetAction.WidgetMouseEvent, WidgetAction.WidgetMouseWheelEvent
Constructor and Description |
---|
Chain()
Creates a chain.
|
Modifier and Type | Method and Description |
---|---|
void |
addAction(int index,
WidgetAction action)
Adds an action at a specific index
|
void |
addAction(WidgetAction action)
Adds an action.
|
WidgetAction.State |
dragEnter(Widget widget,
WidgetAction.WidgetDropTargetDragEvent event)
Called for handling a dragEnter event.
|
WidgetAction.State |
dragExit(Widget widget,
WidgetAction.WidgetDropTargetEvent event)
Called for handling a dragExit event.
|
WidgetAction.State |
dragOver(Widget widget,
WidgetAction.WidgetDropTargetDragEvent event)
Called for handling a dragOver event.
|
WidgetAction.State |
drop(Widget widget,
WidgetAction.WidgetDropTargetDropEvent event)
Called for handling a drop event.
|
WidgetAction.State |
dropActionChanged(Widget widget,
WidgetAction.WidgetDropTargetDragEvent event)
Called for handling a dropActionChanged event.
|
WidgetAction.State |
focusGained(Widget widget,
WidgetAction.WidgetFocusEvent event)
Called for handling a focusGained event.
|
WidgetAction.State |
focusLost(Widget widget,
WidgetAction.WidgetFocusEvent event)
Called for handling a focusLost event.
|
List<WidgetAction> |
getActions()
Returns a list of actions in the chain.
|
WidgetAction.State |
keyPressed(Widget widget,
WidgetAction.WidgetKeyEvent event)
Called for handling a keyPressed event.
|
WidgetAction.State |
keyReleased(Widget widget,
WidgetAction.WidgetKeyEvent event)
Called for handling a keyReleased event.
|
WidgetAction.State |
keyTyped(Widget widget,
WidgetAction.WidgetKeyEvent event)
Called for handling a keyTyped event.
|
WidgetAction.State |
mouseClicked(Widget widget,
WidgetAction.WidgetMouseEvent event)
Called for handling a mouseClicked event.
|
WidgetAction.State |
mouseDragged(Widget widget,
WidgetAction.WidgetMouseEvent event)
Called for handling a mouseMoved event.
|
WidgetAction.State |
mouseEntered(Widget widget,
WidgetAction.WidgetMouseEvent event)
Called for handling a mouseEntered event.
|
WidgetAction.State |
mouseExited(Widget widget,
WidgetAction.WidgetMouseEvent event)
Called for handling a mouseExited event.
|
WidgetAction.State |
mouseMoved(Widget widget,
WidgetAction.WidgetMouseEvent event)
Called for handling a mouseWheelMoved event.
|
WidgetAction.State |
mousePressed(Widget widget,
WidgetAction.WidgetMouseEvent event)
Called for handling a mousePressed event.
|
WidgetAction.State |
mouseReleased(Widget widget,
WidgetAction.WidgetMouseEvent event)
Called for handling a mouseReleased event.
|
WidgetAction.State |
mouseWheelMoved(Widget widget,
WidgetAction.WidgetMouseWheelEvent event)
Called for handling a keyTyped event.
|
void |
removeAction(int index)
Removes an action at specified index.
|
void |
removeAction(WidgetAction action)
Removes an action.
|
public List<WidgetAction> getActions()
public void addAction(WidgetAction action)
action
- the action to be addedpublic void addAction(int index, WidgetAction action)
index
- the index; the action will be added before the action at the index positionaction
- the action to be addedpublic void removeAction(WidgetAction action)
action
- the actionpublic void removeAction(int index)
index
- the indexpublic WidgetAction.State mouseClicked(Widget widget, WidgetAction.WidgetMouseEvent event)
mouseClicked
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the mouse eventpublic WidgetAction.State mousePressed(Widget widget, WidgetAction.WidgetMouseEvent event)
mousePressed
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the mouse eventpublic WidgetAction.State mouseReleased(Widget widget, WidgetAction.WidgetMouseEvent event)
mouseReleased
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the mouse eventpublic WidgetAction.State mouseEntered(Widget widget, WidgetAction.WidgetMouseEvent event)
mouseEntered
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the mouse eventpublic WidgetAction.State mouseExited(Widget widget, WidgetAction.WidgetMouseEvent event)
mouseExited
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the mouse eventpublic WidgetAction.State mouseDragged(Widget widget, WidgetAction.WidgetMouseEvent event)
mouseDragged
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the mouse eventpublic WidgetAction.State mouseMoved(Widget widget, WidgetAction.WidgetMouseEvent event)
mouseMoved
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the mouse wheel eventpublic WidgetAction.State mouseWheelMoved(Widget widget, WidgetAction.WidgetMouseWheelEvent event)
mouseWheelMoved
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the key eventpublic WidgetAction.State keyTyped(Widget widget, WidgetAction.WidgetKeyEvent event)
keyTyped
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the key eventpublic WidgetAction.State keyPressed(Widget widget, WidgetAction.WidgetKeyEvent event)
keyPressed
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the key eventpublic WidgetAction.State keyReleased(Widget widget, WidgetAction.WidgetKeyEvent event)
keyReleased
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the key eventpublic WidgetAction.State focusGained(Widget widget, WidgetAction.WidgetFocusEvent event)
focusGained
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the focus eventpublic WidgetAction.State focusLost(Widget widget, WidgetAction.WidgetFocusEvent event)
focusLost
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the focus eventpublic WidgetAction.State dragEnter(Widget widget, WidgetAction.WidgetDropTargetDragEvent event)
dragEnter
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the drop target drag eventpublic WidgetAction.State dragOver(Widget widget, WidgetAction.WidgetDropTargetDragEvent event)
dragOver
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the drop target drag eventpublic WidgetAction.State dropActionChanged(Widget widget, WidgetAction.WidgetDropTargetDragEvent event)
dropActionChanged
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the drop target drag eventpublic WidgetAction.State dragExit(Widget widget, WidgetAction.WidgetDropTargetEvent event)
dragExit
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the drop target eventpublic WidgetAction.State drop(Widget widget, WidgetAction.WidgetDropTargetDropEvent event)
drop
in interface WidgetAction
widget
- the widget where the action is assignedevent
- the drop target drop event