站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

WidgetAction (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.action
Interface WidgetAction

All Known Implementing Classes:
WidgetAction.Adapter, WidgetAction.Chain, WidgetAction.LockedAdapter

public interface WidgetAction

This interface is defining an action that is usually assigned to a widget. The action is notified about all Swing events related to the widget where the action is assigned.

Events: mouse, mouse-motion, mouse-wheel, drag'n'drop, focus, keyboard.

Each event handler has to return a state of the event processing (represented by WidgetAction.State).

Each Swing event is processed by all actions of all widgets in a scene. The processing can be stopped by consuming the event. When processing event for a widget, then all children widget (from the last) of widget are asked for processing first. Then finally the event is processed by all actions (from the first to the last) assigned to the widget.


Nested Class Summary
static class WidgetAction.Adapter
          An adapter of the widget action.
static class WidgetAction.Chain
          Represents a chain of widget actions.
static class WidgetAction.LockedAdapter
          An adapter of the widget action.
static class WidgetAction.State
          Represents a state of event processing.
static class WidgetAction.WidgetDropTargetDragEvent
          Represents a drop target drag event.
static class WidgetAction.WidgetDropTargetDropEvent
          Represents a drop target drop event.
static class WidgetAction.WidgetDropTargetEvent
          Represents a drop target event.
static interface WidgetAction.WidgetEvent
          Represents an widget event.
static class WidgetAction.WidgetFocusEvent
          Represents a focus event of a scene view.
static class WidgetAction.WidgetKeyEvent
          Represents a key event.
static interface WidgetAction.WidgetLocationEvent
          Represents an location event used for controlling mouse location.
static class WidgetAction.WidgetMouseEvent
          Represents a mouse event.
static class WidgetAction.WidgetMouseWheelEvent
           
 
Method Summary
 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.
 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 mouseDragged 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 mouseMoved 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 mouseWheelMoved event.
 

Method Detail

mouseClicked

WidgetAction.State mouseClicked(Widget widget,
                                WidgetAction.WidgetMouseEvent event)
Called for handling a mouseClicked event.

Parameters:
widget - the widget where the action is assigned
event - the mouse event
Returns:
the event state

mousePressed

WidgetAction.State mousePressed(Widget widget,
                                WidgetAction.WidgetMouseEvent event)
Called for handling a mousePressed event.

Parameters:
widget - the widget where the action is assigned
event - the mouse event
Returns:
the event state

mouseReleased

WidgetAction.State mouseReleased(Widget widget,
                                 WidgetAction.WidgetMouseEvent event)
Called for handling a mouseReleased event.

Parameters:
widget - the widget where the action is assigned
event - the mouse event
Returns:
the event state

mouseEntered

WidgetAction.State mouseEntered(Widget widget,
                                WidgetAction.WidgetMouseEvent event)
Called for handling a mouseEntered event.

Parameters:
widget - the widget where the action is assigned
event - the mouse event
Returns:
the event state

mouseExited

WidgetAction.State mouseExited(Widget widget,
                               WidgetAction.WidgetMouseEvent event)
Called for handling a mouseExited event.

Parameters:
widget - the widget where the action is assigned
event - the mouse event
Returns:
the event state

mouseDragged

WidgetAction.State mouseDragged(Widget widget,
                                WidgetAction.WidgetMouseEvent event)
Called for handling a mouseDragged event.

Parameters:
widget - the widget where the action is assigned
event - the mouse event
Returns:
the event state

mouseMoved

WidgetAction.State mouseMoved(Widget widget,
                              WidgetAction.WidgetMouseEvent event)
Called for handling a mouseMoved event.

Parameters:
widget - the widget where the action is assigned
event - the mouse event
Returns:
the event state

mouseWheelMoved

WidgetAction.State mouseWheelMoved(Widget widget,
                                   WidgetAction.WidgetMouseWheelEvent event)
Called for handling a mouseWheelMoved event.

Parameters:
widget - the widget where the action is assigned
event - the mouse wheel event
Returns:
the event state

keyTyped

WidgetAction.State keyTyped(Widget widget,
                            WidgetAction.WidgetKeyEvent event)
Called for handling a keyTyped event.

Parameters:
widget - the widget where the action is assigned
event - the key event
Returns:
the event state

keyPressed

WidgetAction.State keyPressed(Widget widget,
                              WidgetAction.WidgetKeyEvent event)
Called for handling a keyPressed event.

Parameters:
widget - the widget where the action is assigned
event - the key event
Returns:
the event state

keyReleased

WidgetAction.State keyReleased(Widget widget,
                               WidgetAction.WidgetKeyEvent event)
Called for handling a keyReleased event.

Parameters:
widget - the widget where the action is assigned
event - the key event
Returns:
the event state

focusGained

WidgetAction.State focusGained(Widget widget,
                               WidgetAction.WidgetFocusEvent event)
Called for handling a focusGained event.

Parameters:
widget - the widget where the action is assigned
event - the focus event
Returns:
the event state

focusLost

WidgetAction.State focusLost(Widget widget,
                             WidgetAction.WidgetFocusEvent event)
Called for handling a focusLost event.

Parameters:
widget - the widget where the action is assigned
event - the focus event
Returns:
the event state

dragEnter

WidgetAction.State dragEnter(Widget widget,
                             WidgetAction.WidgetDropTargetDragEvent event)
Called for handling a dragEnter event.

Parameters:
widget - the widget where the action is assigned
event - the drop target drag event
Returns:
the event state

dragOver

WidgetAction.State dragOver(Widget widget,
                            WidgetAction.WidgetDropTargetDragEvent event)
Called for handling a dragOver event.

Parameters:
widget - the widget where the action is assigned
event - the drop target drag event
Returns:
the event state

dropActionChanged

WidgetAction.State dropActionChanged(Widget widget,
                                     WidgetAction.WidgetDropTargetDragEvent event)
Called for handling a dropActionChanged event.

Parameters:
widget - the widget where the action is assigned
event - the drop target drag event
Returns:
the event state

dragExit

WidgetAction.State dragExit(Widget widget,
                            WidgetAction.WidgetDropTargetEvent event)
Called for handling a dragExit event.

Parameters:
widget - the widget where the action is assigned
event - the drop target event
Returns:
the event state

drop

WidgetAction.State drop(Widget widget,
                        WidgetAction.WidgetDropTargetDropEvent event)
Called for handling a drop event.

Parameters:
widget - the widget where the action is assigned
event - the drop target drop event
Returns:
the event state

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.