org.argouml.application.notation
Class NotationNameImpl

java.lang.Object
  |
  +--org.argouml.application.notation.NotationNameImpl
All Implemented Interfaces:
ArgoEventListener, ArgoModuleEventListener, java.util.EventListener, NotationName

public class NotationNameImpl
extends java.lang.Object
implements NotationName, ArgoModuleEventListener

This class provides definition and manipulation of notation names. All notation names will be accessed using the NotationName wrapper. Not mutable!

Since:
0.9.4

Constructor Summary
protected NotationNameImpl(java.lang.String name)
          A notation without a version or icon.
protected NotationNameImpl(java.lang.String name, javax.swing.Icon icon)
          A notation without a version and with an icon.
protected NotationNameImpl(java.lang.String name, java.lang.String version)
          A notation with a version and no icon.
protected NotationNameImpl(java.lang.String name, java.lang.String version, javax.swing.Icon icon)
          A notation with a version and an icon.
 
Method Summary
 boolean equals(NotationName nn)
          Ease-of-use helper to determine if this notation is the same as another.
static NotationName findNotation(java.lang.String s)
          Finds a NotationName matching the configuration string.
static java.util.ArrayList getAvailableNotations()
          Get all of the registered notations.
 java.lang.String getConfigurationValue()
          Returns the text string stored in the configuration for this notation.
 javax.swing.Icon getIcon()
          Returns an icon for the notation, or null if no icon is available.
 java.lang.String getName()
          Accessor for the language name
static NotationName getNotation(java.lang.String k1)
          Finds a NotationName matching the language with no version.
static NotationName getNotation(java.lang.String k1, java.lang.String k2)
          Finds a NotationName matching the language and version.
static java.lang.String getNotationNameString(java.lang.String k1, java.lang.String k2)
           
 java.lang.String getTitle()
          Gets a textual title for the notation suitable for use in a combo box or other such visual location.
 java.lang.String getVersion()
          Accessor for the language version
static NotationName makeNotation(java.lang.String k1, java.lang.String k2, javax.swing.Icon icon)
          Create a NotationName with or without a version.
 void moduleDisabled(ArgoModuleEvent event)
          Invoked when a module has been disabled.
 void moduleEnabled(ArgoModuleEvent event)
          Invoked when a module has been enabled.
 void moduleLoaded(ArgoModuleEvent event)
          Invoked when a module has been loaded.
 void moduleUnloaded(ArgoModuleEvent event)
          Invoked when a module has been unloaded.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotationNameImpl

protected NotationNameImpl(java.lang.String name)
A notation without a version or icon.

NotationNameImpl

protected NotationNameImpl(java.lang.String name,
                           javax.swing.Icon icon)
A notation without a version and with an icon.

NotationNameImpl

protected NotationNameImpl(java.lang.String name,
                           java.lang.String version)
A notation with a version and no icon.

NotationNameImpl

protected NotationNameImpl(java.lang.String name,
                           java.lang.String version,
                           javax.swing.Icon icon)
A notation with a version and an icon.
Method Detail

getName

public java.lang.String getName()
Accessor for the language name
Specified by:
getName in interface NotationName

getVersion

public java.lang.String getVersion()
Accessor for the language version
Specified by:
getVersion in interface NotationName

getTitle

public java.lang.String getTitle()
Gets a textual title for the notation suitable for use in a combo box or other such visual location.
Specified by:
getTitle in interface NotationName

getIcon

public javax.swing.Icon getIcon()
Returns an icon for the notation, or null if no icon is available.
Specified by:
getIcon in interface NotationName

getConfigurationValue

public java.lang.String getConfigurationValue()
Description copied from interface: NotationName
Returns the text string stored in the configuration for this notation. This string is used to determine notation equality in NotationName.equals(NotationName). This should incorporate both the name and the version if one exists.
Specified by:
getConfigurationValue in interface NotationName

getNotationNameString

public static java.lang.String getNotationNameString(java.lang.String k1,
                                                     java.lang.String k2)

makeNotation

public static NotationName makeNotation(java.lang.String k1,
                                        java.lang.String k2,
                                        javax.swing.Icon icon)
Create a NotationName with or without a version. The NotationName is only created if there is no such notation before.

getAvailableNotations

public static java.util.ArrayList getAvailableNotations()
Get all of the registered notations.

findNotation

public static NotationName findNotation(java.lang.String s)
Finds a NotationName matching the configuration string. Returns null if no match.

equals

public boolean equals(NotationName nn)
Description copied from interface: NotationName
Ease-of-use helper to determine if this notation is the same as another. This must be equivalent to getConfigurationValue().equals(nn.getConfigurationValue())
Specified by:
equals in interface NotationName

getNotation

public static NotationName getNotation(java.lang.String k1)
Finds a NotationName matching the language with no version. Returns null if no match.

getNotation

public static NotationName getNotation(java.lang.String k1,
                                       java.lang.String k2)
Finds a NotationName matching the language and version. Returns null if no match.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

moduleLoaded

public void moduleLoaded(ArgoModuleEvent event)
Description copied from interface: ArgoModuleEventListener
Invoked when a module has been loaded.
Specified by:
moduleLoaded in interface ArgoModuleEventListener

moduleUnloaded

public void moduleUnloaded(ArgoModuleEvent event)
Description copied from interface: ArgoModuleEventListener
Invoked when a module has been unloaded.
Specified by:
moduleUnloaded in interface ArgoModuleEventListener

moduleEnabled

public void moduleEnabled(ArgoModuleEvent event)
Description copied from interface: ArgoModuleEventListener
Invoked when a module has been enabled.
Specified by:
moduleEnabled in interface ArgoModuleEventListener

moduleDisabled

public void moduleDisabled(ArgoModuleEvent event)
Description copied from interface: ArgoModuleEventListener
Invoked when a module has been disabled.
Specified by:
moduleDisabled in interface ArgoModuleEventListener


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook