Class WidgetAction.Chain
java.lang.Object
org.netbeans.api.visual.action.WidgetAction.Chain
- All Implemented Interfaces:
WidgetAction
- Enclosing interface:
WidgetAction
Represents a chain of widget actions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.netbeans.api.visual.action.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAction
(int index, WidgetAction action) Adds an action at a specific indexvoid
addAction
(WidgetAction action) Adds an action.dragEnter
(Widget widget, WidgetAction.WidgetDropTargetDragEvent event) Called for handling a dragEnter event.dragExit
(Widget widget, WidgetAction.WidgetDropTargetEvent event) Called for handling a dragExit event.dragOver
(Widget widget, WidgetAction.WidgetDropTargetDragEvent event) Called for handling a dragOver event.drop
(Widget widget, WidgetAction.WidgetDropTargetDropEvent event) Called for handling a drop event.dropActionChanged
(Widget widget, WidgetAction.WidgetDropTargetDragEvent event) Called for handling a dropActionChanged event.focusGained
(Widget widget, WidgetAction.WidgetFocusEvent event) Called for handling a focusGained event.focusLost
(Widget widget, WidgetAction.WidgetFocusEvent event) Called for handling a focusLost event.Returns a list of actions in the chain.keyPressed
(Widget widget, WidgetAction.WidgetKeyEvent event) Called for handling a keyPressed event.keyReleased
(Widget widget, WidgetAction.WidgetKeyEvent event) Called for handling a keyReleased event.keyTyped
(Widget widget, WidgetAction.WidgetKeyEvent event) Called for handling a keyTyped event.mouseClicked
(Widget widget, WidgetAction.WidgetMouseEvent event) Called for handling a mouseClicked event.mouseDragged
(Widget widget, WidgetAction.WidgetMouseEvent event) Called for handling a mouseMoved event.mouseEntered
(Widget widget, WidgetAction.WidgetMouseEvent event) Called for handling a mouseEntered event.mouseExited
(Widget widget, WidgetAction.WidgetMouseEvent event) Called for handling a mouseExited event.mouseMoved
(Widget widget, WidgetAction.WidgetMouseEvent event) Called for handling a mouseWheelMoved event.mousePressed
(Widget widget, WidgetAction.WidgetMouseEvent event) Called for handling a mousePressed event.mouseReleased
(Widget widget, WidgetAction.WidgetMouseEvent event) Called for handling a mouseReleased event.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.
-
Constructor Details
-
Chain
public Chain()Creates a chain.
-
-
Method Details
-
getActions
Returns a list of actions in the chain.- Returns:
- the lst of actions
-
addAction
Adds an action.- Parameters:
action
- the action to be added
-
addAction
Adds an action at a specific index- Parameters:
index
- the index; the action will be added before the action at the index positionaction
- the action to be added
-
removeAction
-
removeAction
public void removeAction(int index) Removes an action at specified index.- Parameters:
index
- the index
-
mouseClicked
Called for handling a mouseClicked event.- Specified by:
mouseClicked
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse event- Returns:
- the event state
-
mousePressed
Called for handling a mousePressed event.- Specified by:
mousePressed
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse event- Returns:
- the event state
-
mouseReleased
Called for handling a mouseReleased event.- Specified by:
mouseReleased
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse event- Returns:
- the event state
-
mouseEntered
Called for handling a mouseEntered event.- Specified by:
mouseEntered
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse event- Returns:
- the event state
-
mouseExited
Called for handling a mouseExited event.- Specified by:
mouseExited
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse event- Returns:
- the event state
-
mouseDragged
Called for handling a mouseMoved event.- Specified by:
mouseDragged
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse event- Returns:
- the event state
-
mouseMoved
Called for handling a mouseWheelMoved event.- Specified by:
mouseMoved
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse wheel event- Returns:
- the event state
-
mouseWheelMoved
Called for handling a keyTyped event.- Specified by:
mouseWheelMoved
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the key event- Returns:
- the event state
-
keyTyped
Called for handling a keyTyped event.- Specified by:
keyTyped
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the key event- Returns:
- the event state
-
keyPressed
Called for handling a keyPressed event.- Specified by:
keyPressed
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the key event- Returns:
- the event state
-
keyReleased
Called for handling a keyReleased event.- Specified by:
keyReleased
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the key event- Returns:
- the event state
-
focusGained
Called for handling a focusGained event.- Specified by:
focusGained
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the focus event- Returns:
- the event state
-
focusLost
Called for handling a focusLost event.- Specified by:
focusLost
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the focus event- Returns:
- the event state
-
dragEnter
Called for handling a dragEnter event.- Specified by:
dragEnter
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the drop target drag event- Returns:
- the event state
-
dragOver
Called for handling a dragOver event.- Specified by:
dragOver
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the drop target drag event- Returns:
- the event state
-
dropActionChanged
public WidgetAction.State dropActionChanged(Widget widget, WidgetAction.WidgetDropTargetDragEvent event) Called for handling a dropActionChanged event.- Specified by:
dropActionChanged
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the drop target drag event- Returns:
- the event state
-
dragExit
Called for handling a dragExit event.- Specified by:
dragExit
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the drop target event- Returns:
- the event state
-
drop
Called for handling a drop event.- Specified by:
drop
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the drop target drop event- Returns:
- the event state
-