org.argouml.ui
Class ActionExportXMI

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.UMLAction
          extended byorg.argouml.ui.ActionExportXMI
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, ArgoModule, java.lang.Cloneable, java.util.EventListener, Pluggable, PluggableMenu, java.io.Serializable

public final class ActionExportXMI
extends UMLAction
implements PluggableMenu

Exports the xmi of a project to a file choosen by the user.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.argouml.uml.ui.UMLAction
cat, HAS_ICON, NO_ICON
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface org.argouml.application.api.PluggableMenu
KEY_ARRANGE, KEY_CREATE_DIAGRAMS, KEY_FILE_IMPORT, KEY_GENERATE, KEY_HELP, KEY_TOOLS, KEY_VIEW
 
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
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Perform the work the action is supposed to do.
 java.lang.Object[] buildContext(javax.swing.JMenuItem parentMenuItem, java.lang.String menuType)
           
static ActionExportXMI getInstance()
          Singleton instance method
 javax.swing.JMenuItem getMenuItem(java.lang.Object[] context)
          Return the JMenuItem controlled by the plugin under the specific context.
 java.lang.String getModuleAuthor()
           
 java.lang.String getModuleDescription()
          Textual description of the module.
 java.lang.String getModuleKey()
           
 java.lang.String getModuleName()
          Display name of the module.
 java.util.Vector getModulePopUpActions(java.util.Vector popUpActions, java.lang.Object context)
           
 java.lang.String getModuleVersion()
           
 boolean inContext(java.lang.Object[] context)
          A function which allows a plug-in to decide if it is available under a specific context.
 boolean initializeModule()
           
 boolean isModuleEnabled()
           
 void setModuleEnabled(boolean tf)
           
 boolean shouldBeEnabled()
          return true if this action should be available to the user.
 boolean shutdownModule()
           
 
Methods inherited from class org.argouml.uml.ui.UMLAction
getMnemonic, getShortcut, isEnabled, markNeedsSave, stripJunk, updateEnabled, updateEnabled
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ActionExportXMI getInstance()
Singleton instance method

Returns:
the singleton instance

getMenuItem

public javax.swing.JMenuItem getMenuItem(java.lang.Object[] context)
Description copied from interface: PluggableMenu
Return the JMenuItem controlled by the plugin under the specific context. One menu plugin may control multiple menu items.

Specified by:
getMenuItem in interface PluggableMenu
Parameters:
context - array of objects as created by PluggableMenu.buildContext(JMenuItem, String).
Returns:
A JMenuItem object controlled by the plug-in.
See Also:
PluggableMenu.getMenuItem(java.lang.Object[])

buildContext

public java.lang.Object[] buildContext(javax.swing.JMenuItem parentMenuItem,
                                       java.lang.String menuType)
Specified by:
buildContext in interface PluggableMenu
See Also:
PluggableMenu.buildContext(javax.swing.JMenuItem, java.lang.String)

inContext

public boolean inContext(java.lang.Object[] context)
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:
context - 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.
See Also:
Pluggable.inContext(java.lang.Object[])

initializeModule

public boolean initializeModule()
Specified by:
initializeModule in interface ArgoModule
See Also:
ArgoModule.initializeModule()

shutdownModule

public boolean shutdownModule()
Specified by:
shutdownModule in interface ArgoModule
See Also:
ArgoModule.shutdownModule()

setModuleEnabled

public void setModuleEnabled(boolean tf)
Specified by:
setModuleEnabled in interface ArgoModule
See Also:
ArgoModule.setModuleEnabled(boolean)

isModuleEnabled

public boolean isModuleEnabled()
Specified by:
isModuleEnabled in interface ArgoModule
See Also:
ArgoModule.isModuleEnabled()

getModuleName

public java.lang.String getModuleName()
Description copied from interface: ArgoModule
Display name of the module.

Specified by:
getModuleName in interface ArgoModule
See Also:
ArgoModule.getModuleName()

getModuleDescription

public java.lang.String getModuleDescription()
Description copied from interface: ArgoModule
Textual description of the module.

Specified by:
getModuleDescription in interface ArgoModule
See Also:
ArgoModule.getModuleDescription()

getModuleVersion

public java.lang.String getModuleVersion()
Specified by:
getModuleVersion in interface ArgoModule
See Also:
ArgoModule.getModuleVersion()

getModuleAuthor

public java.lang.String getModuleAuthor()
Specified by:
getModuleAuthor in interface ArgoModule
See Also:
ArgoModule.getModuleAuthor()

getModulePopUpActions

public java.util.Vector getModulePopUpActions(java.util.Vector popUpActions,
                                              java.lang.Object context)
Specified by:
getModulePopUpActions in interface ArgoModule
See Also:
ArgoModule.getModulePopUpActions(java.util.Vector, java.lang.Object)

getModuleKey

public java.lang.String getModuleKey()
Specified by:
getModuleKey in interface ArgoModule
See Also:
ArgoModule.getModuleKey()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: UMLAction
Perform the work the action is supposed to do.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class UMLAction
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

shouldBeEnabled

public boolean shouldBeEnabled()
Description copied from class: UMLAction
return true if this action should be available to the user. This method should examine the ProjectBrowser that owns it. Sublass implementations of this method should always call super.shouldBeEnabled first.

Overrides:
shouldBeEnabled in class UMLAction
See Also:
UMLAction.shouldBeEnabled()


ArgoUML © 1996-2003 (20040125)ArgoUML Project HomeArgoUML Cookbook