|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openjump.core.ui.plugin.AbstractUiPlugIn
public abstract class AbstractUiPlugIn
Default implementation of PlugIn, with useful functions for auto-generating a name, converting a PlugIn into an ActionListener (for use with JButtons, for example), and supporting undo.
| Field Summary | |
|---|---|
protected EnableCheck |
enableCheck
|
protected WorkbenchContext |
workbenchContext
The workbench context. |
| Constructor Summary | |
|---|---|
AbstractUiPlugIn()
|
|
AbstractUiPlugIn(javax.swing.Icon icon)
|
|
AbstractUiPlugIn(java.lang.String name)
|
|
AbstractUiPlugIn(java.lang.String name,
javax.swing.Icon icon)
|
|
AbstractUiPlugIn(java.lang.String name,
javax.swing.Icon icon,
java.lang.String toolTip)
|
|
AbstractUiPlugIn(java.lang.String name,
java.lang.String toolTip)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Wrap the plug-in as an ActionListener. |
static java.lang.String |
createName(java.lang.Class plugInClass)
Create a name using the I18N String using the class name or by adding spaces between the words in the class name without the PlugIn suffix. |
boolean |
execute(PlugInContext context)
Method to be overridden by implementations to execute the plug-in. |
EnableCheck |
getEnableCheck()
|
javax.swing.Icon |
getIcon()
Get the icon for the plug-in. |
java.lang.String |
getName()
Get the name of the plug-in. |
java.lang.String |
getToolTip()
Get the tool-tip for the plug-in. |
void |
initialize(PlugInContext context)
Method to be overridden by implementations to initialize the plug-in. |
protected boolean |
isRollingBackInvalidEdits(PlugInContext context)
|
protected void |
reportNothingToUndoYet(PlugInContext context)
Indicates that this plug-in either (1) is undoable but hasn't modified the system yet or (2) does not modify the system. |
protected void |
setWorkbenchContext(WorkbenchContext workbenchContext)
|
java.lang.String |
toString()
Get the String representation of the plug-in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected WorkbenchContext workbenchContext
protected EnableCheck enableCheck
| Constructor Detail |
|---|
public AbstractUiPlugIn()
public AbstractUiPlugIn(java.lang.String name)
public AbstractUiPlugIn(javax.swing.Icon icon)
public AbstractUiPlugIn(java.lang.String name,
java.lang.String toolTip)
public AbstractUiPlugIn(java.lang.String name,
javax.swing.Icon icon)
public AbstractUiPlugIn(java.lang.String name,
javax.swing.Icon icon,
java.lang.String toolTip)
| Method Detail |
|---|
public void initialize(PlugInContext context)
throws java.lang.Exception
initialize in interface PlugIncontext - The plug-in context.
java.lang.Exception
public boolean execute(PlugInContext context)
throws java.lang.Exception
execute in interface PlugIncontext - The plug-in context.
java.lang.Exception - if a problem occurs during plug-in executionThreadedPlugInprotected void reportNothingToUndoYet(PlugInContext context)
protected boolean isRollingBackInvalidEdits(PlugInContext context)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - The action event.public EnableCheck getEnableCheck()
public javax.swing.Icon getIcon()
public java.lang.String getName()
createName(Class).
getName in interface PlugInpublic java.lang.String getToolTip()
public static java.lang.String createName(java.lang.Class plugInClass)
plugInClass - The plug-in's class.
protected void setWorkbenchContext(WorkbenchContext workbenchContext)
workbenchContext - the workbenchContext to setpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||