Class WidgetAction.LockedAdapter
java.lang.Object
org.netbeans.api.visual.action.WidgetAction.LockedAdapter
- All Implemented Interfaces:
WidgetAction
- Enclosing interface:
WidgetAction
An adapter of the widget action. All methods return locked or rejected event state based on a result of isLocked method.
This is often used for long-term actions like MoveAction.
-
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 TypeMethodDescriptiondragEnter
(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.protected abstract boolean
isLocked()
Called by event handlers to resolve whether they should return locked or rejected event state.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 mouseDragged 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 mouseMoved 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 mouseWheelMoved event.
-
Constructor Details
-
LockedAdapter
public LockedAdapter()
-
-
Method Details
-
isLocked
protected abstract boolean isLocked()Called by event handlers to resolve whether they should return locked or rejected event state.- Returns:
- if true, then locked event state is used; if false, then rejected event state is used.
-
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 mouseDragged 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 mouseMoved event.- Specified by:
mouseMoved
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse event- Returns:
- the event state
-
mouseWheelMoved
Called for handling a mouseWheelMoved event.- Specified by:
mouseWheelMoved
in interfaceWidgetAction
- Parameters:
widget
- the widget where the action is assignedevent
- the mouse wheel 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
-