|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--OME.AbstractPluginMethod
This class is an adapter class that implements all the methods in the
PluginMethod
interface as no-op's and that also includes a
list of the supported parameter types as static fields.
This class exists as a convenience so that classes wishing to implement the PluginMethod interface can instead extend this class and override the methods of interest. (If one implements the PluginMethod interface, one has to define all of the methods in it. This adapter class defines no-op methods for them all, so that one need only define the methods one cares about).
PluginMethod
Constructor Summary | |
AbstractPluginMethod()
|
Method Summary | |
void |
cancelled()
Cancel this PluginMethod. |
java.awt.Image |
getImage()
Return Image associated with this PluginMethod. |
java.lang.String |
getName()
Return name of this PluginMethod. |
java.util.Collection |
getSubmenu()
Return the collection of PluginMethods that will constitute the submenu of this PluginMethod. |
java.util.Collection |
getSubmenu(ViewContext ovc)
Return the collection of PluginMethods that will constitute the submenu of this PluginMethod, depending on the view context. |
void |
invoke()
Execute this PluginMethod. |
boolean |
isEnabled(ViewContext con)
Returns whether this PluginMethod should be enabled given the specified view context. |
PluginParameter |
nextParameter()
Returns the next parameter to be used when this PluginMethod is invoked. |
void |
passParameter(java.util.Collection c)
Passes a parameter (as a singleton Collection) to this PluginMethod. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AbstractPluginMethod()
Method Detail |
public java.awt.Image getImage()
public java.lang.String getName()
public java.util.Collection getSubmenu(ViewContext ovc)
ViewContext
is
provided so the submenu may be dynamically populated.ovc
- the view context for which we want the submenupublic java.util.Collection getSubmenu()
public PluginParameter nextParameter()
public void passParameter(java.util.Collection c)
c
- a singleton Collection
containing the parameter
to be passed to this PluginMethod.public void invoke()
actionPerformed
method in ActionListener
's.public void cancelled()
public boolean isEnabled(ViewContext con)
con
- the ViewContext
for which this PluginMethod is
called.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |