net.refractions.udig.ui.operations
Class OpAction

java.lang.Object
  extended by Action
      extended by net.refractions.udig.ui.operations.OpAction

public class OpAction
extends Action

Creates an Action that runs an operation in a background thread when triggered.

Since:
0.3
Author:
jeichar

Constructor Summary
OpAction(IConfigurationElement element)
          Subclasses must have the same constructor signature as this constructor, OperationMenuFactory creates OpActions using this constructor.
 
Method Summary
 java.lang.String getMenuPath()
           
 boolean isValid(java.lang.Object obj)
          Determines whether the current operation can operate on the object.
 void run()
           
 void runWithEvent(Event event)
           
 void selectionChanged(IWorkbenchPart part, ISelection selection)
           
 void setCategory(OperationCategory category)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpAction

public OpAction(IConfigurationElement element)
Subclasses must have the same constructor signature as this constructor, OperationMenuFactory creates OpActions using this constructor. Construct OpAction.

Method Detail

run

public void run()

runWithEvent

public void runWithEvent(Event event)

isValid

public boolean isValid(java.lang.Object obj)
Determines whether the current operation can operate on the object.

Returns:
true if obj can be used as the operation input.

selectionChanged

public void selectionChanged(IWorkbenchPart part,
                             ISelection selection)
See Also:
org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)

setCategory

public void setCategory(OperationCategory category)

getMenuPath

public java.lang.String getMenuPath()

toString

public java.lang.String toString()