org.argouml.application.helpers
Class DiagramHelper

java.lang.Object
  extended byorg.tigris.gef.base.Diagram
      extended byorg.argouml.ui.ArgoDiagram
          extended byorg.argouml.application.helpers.DiagramHelper
All Implemented Interfaces:
ArgoModule, java.util.EventListener, org.tigris.gef.graph.GraphListener, Pluggable, PluggableDiagram, java.io.Serializable

public abstract class DiagramHelper
extends ArgoDiagram
implements PluggableDiagram

Helper object for Diagrams

Since:
0.9.5
See Also:
Serialized Form

Field Summary
protected  java.lang.String _bundle
          String naming the resource bundle to use for localization.
static java.lang.String DIAGRAM_BUNDLE
          Default localization key for diagrams
 
Fields inherited from class org.argouml.ui.ArgoDiagram
TheInstance
 
Fields inherited from class org.tigris.gef.base.Diagram
_comments, _name, _toolBar, NAME_KEY, SCALE_KEY
 
Fields inherited from interface org.argouml.application.api.Pluggable
PLUGIN_PREFIX, PLUGIN_TITLE, PLUGIN_VENDOR
 
Fields inherited from interface org.argouml.application.api.ArgoModule
cat, MODULEFILENAME, MODULEFILENAME_ALTERNATE
 
Constructor Summary
DiagramHelper()
           
 
Method Summary
 javax.swing.JMenuItem getDiagramMenuItem()
          Returns the settings tab panel for the plugin.
 java.lang.String getDiagramResourceBundleKey()
           
 java.util.Vector getModulePopUpActions(java.util.Vector v, java.lang.Object o)
          Calls all modules to let them add to a popup menu.
 boolean inContext(java.lang.Object[] o)
          A function which allows a plug-in to decide if it is available under a specific context.
 boolean initializeModule()
          Method called when Argo is loading a module.
 boolean isModuleEnabled()
          Allows determination if a module is enabled or disabled
 void setModuleEnabled(boolean v)
          Called to enable or disable a module programmatically.
 boolean shutdownModule()
          Method called when Argo is unloading a module.
 
Methods inherited from class org.argouml.ui.ArgoDiagram
addChangeRegistryAsListener, damage, getContainingFig, getEdges, getItemUID, getNodes, getNodes, getVetoMessage, initialize, removeChangeRegistryAsListener, setItemUID, setName, toString
 
Methods inherited from class org.tigris.gef.base.Diagram
add, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, bringForward, bringToFront, countContained, edgeAdded, edgeRemoved, elements, elementsIn, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getClassAndModelID, getComments, getGraphController, getGraphModel, getLayer, getName, getScale, getShowSingleMultiplicity, getToolBar, graphChanged, hit, initToolBar, nodeAdded, nodeRemoved, postLoad, postSave, preSave, presentationFor, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, reorder, sendBackward, sendToBack, setComments, setGraphModel, setLayer, setScale, setShowSingleMultiplicity, setToolBar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.argouml.application.api.ArgoModule
getModuleAuthor, getModuleDescription, getModuleKey, getModuleName, getModuleVersion
 

Field Detail

DIAGRAM_BUNDLE

public static final java.lang.String DIAGRAM_BUNDLE
Default localization key for diagrams

See Also:
Constant Field Values

_bundle

protected java.lang.String _bundle
String naming the resource bundle to use for localization.

Constructor Detail

DiagramHelper

public DiagramHelper()
Method Detail

setModuleEnabled

public void setModuleEnabled(boolean v)
Description copied from interface: ArgoModule
Called to enable or disable a module programmatically.

Specified by:
setModuleEnabled in interface ArgoModule
Parameters:
v - true to enable module, false to disable

initializeModule

public boolean initializeModule()
Description copied from interface: ArgoModule
Method called when Argo is loading a module.

Specified by:
initializeModule in interface ArgoModule
Returns:
true if the module initialized properly.

inContext

public boolean inContext(java.lang.Object[] o)
Description copied from interface: Pluggable
A function which allows a plug-in to decide if it is available under a specific context. One example of a plugin with multiple criteria is the PluggableMenu. PluggableMenu requires the first context to be a JMenuItem which wants the PluggableMenu attached to as the context, so that it can determine that it would attach to a menu. The second context is an internal (non-localized) description of the menu such as "File" or "View" so that the plugin can further decide.

Specified by:
inContext in interface Pluggable
Parameters:
o - An identification of the context. The interpretation of criteria is specific to the plug-in type, but must be consistent across that type. The plug-in must want to be exposed to all contexts.
Returns:
True if the plug-in wants to make itself available for this context, otherwise false.

isModuleEnabled

public boolean isModuleEnabled()
Description copied from interface: ArgoModule
Allows determination if a module is enabled or disabled

Specified by:
isModuleEnabled in interface ArgoModule
Returns:
true if the module is enabled, otherwise false

getModulePopUpActions

public java.util.Vector getModulePopUpActions(java.util.Vector v,
                                              java.lang.Object o)
Description copied from interface: ArgoModule
Calls all modules to let them add to a popup menu.

Specified by:
getModulePopUpActions in interface ArgoModule
Parameters:
v - Vector of actions
o - which the actions are valid for

shutdownModule

public boolean shutdownModule()
Description copied from interface: ArgoModule
Method called when Argo is unloading a module.

Specified by:
shutdownModule in interface ArgoModule
Returns:
true if the module terminated properly.

getDiagramMenuItem

public javax.swing.JMenuItem getDiagramMenuItem()
Description copied from interface: PluggableDiagram
Returns the settings tab panel for the plugin.

Specified by:
getDiagramMenuItem in interface PluggableDiagram
Returns:
the menu item.

getDiagramResourceBundleKey

public java.lang.String getDiagramResourceBundleKey()


ArgoUML © 1996-2004 (20040316)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook