OME
Class CreateLinkMethod
java.lang.Object
|
+--OME.AbstractPluginMethod
|
+--OME.CreateLinkMethod
- public class CreateLinkMethod
- extends AbstractPluginMethod
This class is a PluginMethod
that is used to create an link
whose type is specified at construction time. This PluginMethod can be
placed on a menu, toolbar or popupmenu.
Field Summary |
protected java.awt.Image |
image
|
protected java.lang.Object |
type
|
protected java.lang.String |
typename
|
protected View |
view
|
Constructor Summary |
CreateLinkMethod(java.lang.Object type,
java.lang.String typename,
View view)
Constructs a CreateLinkMethod which can be used to
create links with the specified type and typename in the specified
view. |
CreateLinkMethod(java.lang.Object type,
java.lang.String typename,
View view,
boolean dashed)
|
CreateLinkMethod(View view)
Creates a CreateLinkMethod which can be used to create
links in the specified view. |
Method Summary |
void |
cancelled()
Cancel this method. |
java.awt.Image |
getImage()
Returns the image associated with the object this method will create. |
java.lang.String |
getName()
Returns the type of the object, this method will create |
void |
invoke()
Execute this method. |
PluginParameter |
nextParameter()
Get the next parameter to be used when this method is invoked. |
void |
passParameter(java.util.Collection c)
Passes the next parameter to be used when this method is invoked. |
protected void |
resetMethod()
This cleans-up the method, preparing it to be used a new. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
type
protected java.lang.Object type
typename
protected java.lang.String typename
view
protected View view
image
protected java.awt.Image image
CreateLinkMethod
public CreateLinkMethod(java.lang.Object type,
java.lang.String typename,
View view)
- Constructs a
CreateLinkMethod
which can be used to
create links with the specified type and typename in the specified
view.
- Parameters:
type
- the type of the object to be createdtypename
- the name to be associated with the created objectview
- the view where this object will be created. Unfortunately
in the present architecture, changes are made to the view which are
then reflected in the model, instead of the reverse (where changes are
made made to the model which are reflected in the view).
CreateLinkMethod
public CreateLinkMethod(java.lang.Object type,
java.lang.String typename,
View view,
boolean dashed)
CreateLinkMethod
public CreateLinkMethod(View view)
- Creates a
CreateLinkMethod
which can be used to create
links in the specified view.
ASIDE-NOTE: I am doubtful if this method is been used and whether it is
really useful. It might be worthwhile to check this out.
getImage
public java.awt.Image getImage()
- Returns the image associated with the object this method will create.
- Overrides:
- getImage in class AbstractPluginMethod
- See Also:
getImage()
getName
public java.lang.String getName()
- Returns the type of the object, this method will create
- Overrides:
- getName in class AbstractPluginMethod
- See Also:
getName()
nextParameter
public PluginParameter nextParameter()
- Get the next parameter to be used when this method is invoked.
- Overrides:
- nextParameter in class AbstractPluginMethod
- See Also:
nextParameter()
passParameter
public void passParameter(java.util.Collection c)
- Passes the next parameter to be used when this method is invoked.
- Overrides:
- passParameter in class AbstractPluginMethod
- See Also:
passParameter(Collection
c)
invoke
public void invoke()
- Execute this method. This is analogous to the actionPerformed method in
ActionListener's.
- Overrides:
- invoke in class AbstractPluginMethod
- See Also:
invoke()
cancelled
public void cancelled()
- Cancel this method. Do neccessary clean-up and exit method gracefully.
- Overrides:
- cancelled in class AbstractPluginMethod
- See Also:
cancelled()
resetMethod
protected void resetMethod()
- This cleans-up the method, preparing it to be used a new.