org.openide.util 8.6.1

org.openide.util.actions
Class ActionInvoker

java.lang.Object
  extended by org.openide.util.actions.ActionInvoker

public abstract class ActionInvoker
extends Object

A mixture of a utility class allowing to invoke actions and also a code injection mechanism to allow overall system to be aware of invoked actions.

Callers shall use the invokeAction(javax.swing.Action, java.awt.event.ActionEvent, boolean, java.lang.Runnable) method.

Implementors register an implementation of this class via ServiceProvider annotation.

Since:
8.1

Constructor Summary
protected ActionInvoker()
          Subclass constructor.
 
Method Summary
protected abstract  void invokeAction(Action action, ActionEvent ev)
          An infrastructure method that handles invocation of an an action.
static void invokeAction(Action action, ActionEvent ev, boolean asynchronous, Runnable invoker)
          Invokes the action in the currently registered ActionsBridge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionInvoker

protected ActionInvoker()
Subclass constructor.

Method Detail

invokeAction

protected abstract void invokeAction(Action action,
                                     ActionEvent ev)
An infrastructure method that handles invocation of an an action.

Parameters:
action - the action to invoke
ev - the event used during invocation

invokeAction

public static void invokeAction(Action action,
                                ActionEvent ev,
                                boolean asynchronous,
                                Runnable invoker)
Invokes the action in the currently registered ActionsBridge.

Parameters:
action - the action that is to be invoked
ev - the event used to invoke the action
asynchronous - shall the execution be performed in a background thread?
invoker - the actual code that shall be performed to "run" the action. If null, action.actionPerformed(ev) will be called

org.openide.util 8.6.1

Built on September 19 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.