Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.nwoods.jgo
Interface JGoActionObject

All Known Implementing Classes:
  AbstractIndicator

public interface JGoActionObject

This interface specifies ways for a JGoView to invoke actions on objects.

Typically this will be some object where a click, or a press-drag-release, should execute some code specific to that object, without invoking the standard selection/dragging/resizing/linking behaviors.

Method Summary
`boolean` | `isActionActivated()` Returns true if this object is being acted upon.
`boolean` | `isActionEnabled()` Returns true if a view should consider activating this object and invoke the object's action.
`void` | `onAction(JGoView view, int modifiers, java.awt.Point dc, java.awt.Point vc)` This method is called by the view to perform the object's primary action, normally by a mouse button being released.
`void` | `onActionAdjusted(JGoView view, int modifiers, java.awt.Point dc, java.awt.Point vc, int event)` This method is called by the view as the user is adjusting the object, normally by a mouse drag.
`void` | `onActionCancelled(JGoView view)` This method is called by the view when the user cancels manipulating this action object.
`void` | `setActionActivated(boolean value)` This method is called by the view as part of its JGoActionObject handling state, to tell this object whether it is activated.
`void` | `setActionEnabled(boolean value)` Change whether this object should grab mouse move events and a mouse up event instead of being treated in the normal manner.

Method Detail

### isActionEnabled

    public boolean isActionEnabled()

  Returns true if a view should consider activating this object and invoke the object's action.

### setActionEnabled

    public void setActionEnabled(boolean value)

  Change whether this object should grab mouse move events and a mouse up event instead of being treated in the normal manner.

### isActionActivated

    public boolean isActionActivated()

  Returns true if this object is being acted upon.

  Normally, this object's Action is about to be invoked.

### setActionActivated

    public void setActionActivated(boolean value)

  This method is called by the view as part of its JGoActionObject handling state, to tell this object whether it is activated.

  Typically this is called with a true value on a mouse down, and with a value false when the action is finished or cancelled.

### onActionAdjusted

    public void onActionAdjusted(JGoView view,
                                 int modifiers,
                                 java.awt.Point dc,
                                 java.awt.Point vc,
                                 int event)

  This method is called by the view as the user is adjusting the object, normally by a mouse drag.

  Parameters:
    `view` - the JGoView that the input event occurred in
    `modifiers` - the key state -- see java.awt.event.InputEvent
    `dc` - the current mouse point in document coordinates
    `vc` - the current mouse point in view coordinates
    `event` - one of JGoView.EventMouseDown, EventMouseMove, or EventMouseUp.

### onAction

    public void onAction(JGoView view,
                         int modifiers,
                         java.awt.Point dc,
                         java.awt.Point vc)

  This method is called by the view to perform the object's primary action, normally by a mouse button being released.

  Parameters:
    `view` - the JGoView that the input event occurred in
    `modifiers` - the key state -- see java.awt.event.InputEvent
    `dc` - the current mouse point in document coordinates
    `vc` - the current mouse point in view coordinates

### onActionCancelled

    public void onActionCancelled(JGoView view)

  This method is called by the view when the user cancels manipulating this action object.

  Parameters:
    `view` - the JGoView that the input event occurred in

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD