org.argouml.application.api
Class Notation

java.lang.Object
  |
  +--org.argouml.application.api.Notation
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener

public final class Notation
extends java.lang.Object
implements java.beans.PropertyChangeListener

Provides centralized methods dealing with notation.

Since:
0.9.4

Field Summary
static Logger cat
          Define a static log4j category variable for ArgoUML notation.
static ConfigurationKey KEY_DEFAULT_NOTATION
          The configuration key for the preferred notation
static ConfigurationKey KEY_DEFAULT_SHADOW_WIDTH
          Default value for the shadow size of classes, interfaces etc.
static ConfigurationKey KEY_SHOW_INITIAL_VALUE
          Indicates if the user wants to see the initial value
static ConfigurationKey KEY_SHOW_MULTIPLICITY
          Indicates if the user wants to see multiplicity in attributes and classes
static ConfigurationKey KEY_SHOW_PROPERTIES
          Indicates if the user wants to see the properties (everything between braces), that is for example the concurrency
static ConfigurationKey KEY_SHOW_STEREOTYPES
          The configuration key that indicates whether to show stereotypes in the navigation panel
static ConfigurationKey KEY_SHOW_VISIBILITY
          Indicates if the user wants to see visibility signs (public, private, protected or # + -)
static ConfigurationKey KEY_UML_NOTATION_ONLY
          Indicates if the user only wants to see UML notation.
static ConfigurationKey KEY_USE_GUILLEMOTS
          The configuration key that indicates whether to use guillemots or greater/lessthan characters in stereotypes.
 
Method Summary
 void finalize()
          Remove the notation change listener.
static NotationName findNotation(java.lang.String s)
           
static java.lang.String generate(NotationContext ctx, java.lang.Object o)
           
static java.lang.String generate(NotationContext ctx, java.lang.Object o, boolean documented)
          General purpose static generator for any object that wishes to set the documented flag.
static java.lang.String generate(NotationName nn, java.lang.Object o)
           
static java.lang.String generate(NotationName nn, java.lang.Object o, boolean documented)
          General purpose static generator for any object that wishes to set the documented flag.
static java.lang.String generateAction(NotationContext ctx, java.lang.Object m)
           
protected  java.lang.String generateAction(NotationName notation, java.lang.Object m)
           
static java.lang.String generateAssociation(NotationContext ctx, MAssociation a)
           
protected  java.lang.String generateAssociation(NotationName notation, MAssociation a)
           
static java.lang.String generateAssociationEnd(NotationContext ctx, MAssociationEnd ae)
           
protected  java.lang.String generateAssociationEnd(NotationName notation, MAssociationEnd ae)
           
static java.lang.String generateAssociationRole(NotationContext ctx, MAssociationRole m)
           
protected  java.lang.String generateAssociationRole(NotationName notation, MAssociationRole m)
           
static java.lang.String generateAttribute(NotationContext ctx, MAttribute attr)
           
static java.lang.String generateAttribute(NotationContext ctx, MAttribute attr, boolean documented)
           
protected  java.lang.String generateAttribute(NotationName notation, MAttribute attr, boolean documented)
           
static java.lang.String generateClassifier(NotationContext ctx, MClassifier cls)
           
protected  java.lang.String generateClassifier(NotationName notation, MClassifier cls)
           
static java.lang.String generateClassifierRef(NotationContext ctx, MClassifier cls)
           
protected  java.lang.String generateClassifierRef(NotationName notation, MClassifier m)
           
protected  java.lang.String generateExpression(NotationName notation, MExpression expr)
           
static java.lang.String generateExtensionPoint(NotationContext ctx, MExtensionPoint ep)
          Static accessor for extension point generation.
protected  java.lang.String generateExtensionPoint(NotationName notation, MExtensionPoint ep)
          General accessor for an extension point.
static java.lang.String generateGuard(NotationContext ctx, MGuard m)
           
protected  java.lang.String generateGuard(NotationName notation, MGuard m)
           
static java.lang.String generateMessage(NotationContext ctx, MMessage m)
           
protected  java.lang.String generateMessage(NotationName notation, MMessage m)
           
static java.lang.String generateMultiplicity(NotationContext ctx, MMultiplicity m)
           
protected  java.lang.String generateMultiplicity(NotationName notation, MMultiplicity m)
           
protected  java.lang.String generateName(NotationName notation, java.lang.String name)
           
static java.lang.String generateOperation(NotationContext ctx, MOperation op)
           
static java.lang.String generateOperation(NotationContext ctx, MOperation op, boolean documented)
           
protected  java.lang.String generateOperation(NotationName notation, MOperation op, boolean documented)
           
static java.lang.String generatePackage(NotationContext ctx, MPackage p)
           
protected  java.lang.String generatePackage(NotationName notation, MPackage pkg)
           
static java.lang.String generateParameter(NotationContext ctx, MParameter param)
           
protected  java.lang.String generateParameter(NotationName notation, MParameter param)
           
static java.lang.String generateState(NotationContext ctx, MState m)
           
protected  java.lang.String generateState(NotationName notation, MState m)
           
static java.lang.String generateStateBody(NotationContext ctx, MState m)
           
protected  java.lang.String generateStateBody(NotationName notation, MState stt)
           
static java.lang.String generateStereotype(NotationContext ctx, MStereotype s)
           
protected  java.lang.String generateStereotype(NotationName notation, MStereotype s)
           
static java.lang.String generateTaggedValue(NotationContext ctx, MTaggedValue s)
           
protected  java.lang.String generateTaggedValue(NotationName notation, MTaggedValue s)
           
static java.lang.String generateTransition(NotationContext ctx, MTransition m)
           
protected  java.lang.String generateTransition(NotationName notation, MTransition m)
           
static java.util.ArrayList getAvailableNotations()
          List of available notations.
static NotationName getDefaultNotation()
           
 NotationProvider getDefaultProvider()
           
static int getDefaultShadowWidth()
          get the default width for Fig shadows.
static Notation getInstance()
           
static NotationName getNotation(NotationContext context)
           
static boolean getUseGuillemots()
           
static NotationName makeNotation(java.lang.String k1, java.lang.String k2, javax.swing.Icon icon)
          Create a versioned notation name with an icon.
 void propertyChange(java.beans.PropertyChangeEvent pce)
          Called after the notation default property gets changed.
static void setDefaultNotation(NotationName n)
           
static void setDefaultShadowWidth(int width)
          set the default width for Fig Shadow.
static void setUseGuillemots(boolean useGuillemots)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

public static final Logger cat
Define a static log4j category variable for ArgoUML notation.


KEY_DEFAULT_NOTATION

public static final ConfigurationKey KEY_DEFAULT_NOTATION
The configuration key for the preferred notation


KEY_SHOW_STEREOTYPES

public static final ConfigurationKey KEY_SHOW_STEREOTYPES
The configuration key that indicates whether to show stereotypes in the navigation panel


KEY_USE_GUILLEMOTS

public static final ConfigurationKey KEY_USE_GUILLEMOTS
The configuration key that indicates whether to use guillemots or greater/lessthan characters in stereotypes.


KEY_UML_NOTATION_ONLY

public static final ConfigurationKey KEY_UML_NOTATION_ONLY
Indicates if the user only wants to see UML notation.


KEY_SHOW_VISIBILITY

public static final ConfigurationKey KEY_SHOW_VISIBILITY
Indicates if the user wants to see visibility signs (public, private, protected or # + -)


KEY_SHOW_MULTIPLICITY

public static final ConfigurationKey KEY_SHOW_MULTIPLICITY
Indicates if the user wants to see multiplicity in attributes and classes


KEY_SHOW_INITIAL_VALUE

public static final ConfigurationKey KEY_SHOW_INITIAL_VALUE
Indicates if the user wants to see the initial value


KEY_SHOW_PROPERTIES

public static final ConfigurationKey KEY_SHOW_PROPERTIES
Indicates if the user wants to see the properties (everything between braces), that is for example the concurrency


KEY_DEFAULT_SHADOW_WIDTH

public static final ConfigurationKey KEY_DEFAULT_SHADOW_WIDTH
Default value for the shadow size of classes, interfaces etc.

Method Detail

finalize

public void finalize()
Remove the notation change listener. finalize should never happen, but play it safe.

Overrides:
finalize in class java.lang.Object

setDefaultNotation

public static void setDefaultNotation(NotationName n)

findNotation

public static NotationName findNotation(java.lang.String s)

getDefaultNotation

public static NotationName getDefaultNotation()

generateExtensionPoint

protected java.lang.String generateExtensionPoint(NotationName notation,
                                                  MExtensionPoint ep)

General accessor for an extension point.

Parameters:
notation - Name of the notation to be used.
ep - The extension point to generate for.
Returns:
The generated text.

generateOperation

protected java.lang.String generateOperation(NotationName notation,
                                             MOperation op,
                                             boolean documented)

generateAttribute

protected java.lang.String generateAttribute(NotationName notation,
                                             MAttribute attr,
                                             boolean documented)

generateParameter

protected java.lang.String generateParameter(NotationName notation,
                                             MParameter param)

generateName

protected java.lang.String generateName(NotationName notation,
                                        java.lang.String name)

generatePackage

protected java.lang.String generatePackage(NotationName notation,
                                           MPackage pkg)

generateExpression

protected java.lang.String generateExpression(NotationName notation,
                                              MExpression expr)

generateClassifier

protected java.lang.String generateClassifier(NotationName notation,
                                              MClassifier cls)

generateStereotype

protected java.lang.String generateStereotype(NotationName notation,
                                              MStereotype s)

generateTaggedValue

protected java.lang.String generateTaggedValue(NotationName notation,
                                               MTaggedValue s)

generateAssociation

protected java.lang.String generateAssociation(NotationName notation,
                                               MAssociation a)

generateAssociationEnd

protected java.lang.String generateAssociationEnd(NotationName notation,
                                                  MAssociationEnd ae)

generateMultiplicity

protected java.lang.String generateMultiplicity(NotationName notation,
                                                MMultiplicity m)

generateState

protected java.lang.String generateState(NotationName notation,
                                         MState m)

generateStateBody

protected java.lang.String generateStateBody(NotationName notation,
                                             MState stt)

generateTransition

protected java.lang.String generateTransition(NotationName notation,
                                              MTransition m)

generateAction

protected java.lang.String generateAction(NotationName notation,
                                          java.lang.Object m)

generateGuard

protected java.lang.String generateGuard(NotationName notation,
                                         MGuard m)

generateMessage

protected java.lang.String generateMessage(NotationName notation,
                                           MMessage m)

generateClassifierRef

protected java.lang.String generateClassifierRef(NotationName notation,
                                                 MClassifier m)

generateAssociationRole

protected java.lang.String generateAssociationRole(NotationName notation,
                                                   MAssociationRole m)

getInstance

public static Notation getInstance()

generateExtensionPoint

public static java.lang.String generateExtensionPoint(NotationContext ctx,
                                                      MExtensionPoint ep)

Static accessor for extension point generation. Invokes our protected accessor from the singleton instance with the "documented" flag set false.

Parameters:
ctx - Context used to identify the notation
ep - The extension point to generate for.
Returns:
The generated text.

generateOperation

public static java.lang.String generateOperation(NotationContext ctx,
                                                 MOperation op)

generateOperation

public static java.lang.String generateOperation(NotationContext ctx,
                                                 MOperation op,
                                                 boolean documented)

generateAttribute

public static java.lang.String generateAttribute(NotationContext ctx,
                                                 MAttribute attr)

generateAttribute

public static java.lang.String generateAttribute(NotationContext ctx,
                                                 MAttribute attr,
                                                 boolean documented)

generateParameter

public static java.lang.String generateParameter(NotationContext ctx,
                                                 MParameter param)

generatePackage

public static java.lang.String generatePackage(NotationContext ctx,
                                               MPackage p)

generateClassifier

public static java.lang.String generateClassifier(NotationContext ctx,
                                                  MClassifier cls)

generateStereotype

public static java.lang.String generateStereotype(NotationContext ctx,
                                                  MStereotype s)

generateTaggedValue

public static java.lang.String generateTaggedValue(NotationContext ctx,
                                                   MTaggedValue s)

generateAssociation

public static java.lang.String generateAssociation(NotationContext ctx,
                                                   MAssociation a)

generateAssociationEnd

public static java.lang.String generateAssociationEnd(NotationContext ctx,
                                                      MAssociationEnd ae)

generateMultiplicity

public static java.lang.String generateMultiplicity(NotationContext ctx,
                                                    MMultiplicity m)

generateState

public static java.lang.String generateState(NotationContext ctx,
                                             MState m)

generateStateBody

public static java.lang.String generateStateBody(NotationContext ctx,
                                                 MState m)

generateTransition

public static java.lang.String generateTransition(NotationContext ctx,
                                                  MTransition m)

generateAction

public static java.lang.String generateAction(NotationContext ctx,
                                              java.lang.Object m)

generateGuard

public static java.lang.String generateGuard(NotationContext ctx,
                                             MGuard m)

generateMessage

public static java.lang.String generateMessage(NotationContext ctx,
                                               MMessage m)

generateClassifierRef

public static java.lang.String generateClassifierRef(NotationContext ctx,
                                                     MClassifier cls)

generateAssociationRole

public static java.lang.String generateAssociationRole(NotationContext ctx,
                                                       MAssociationRole m)

generate

public static java.lang.String generate(NotationContext ctx,
                                        java.lang.Object o,
                                        boolean documented)

General purpose static generator for any object that wishes to set the documented flag.

Uses the class of the object to determine which method to invoke. Only actually looks for MOperation and MAttribute. All others invoke the simpler version with no documented flag, so taking the default version.

Parameters:
ctx - The context to look up the notation generator.
o - The object to generate.
documented - A flag of unknown meaning. Only has any effect for MOperation and MAttribute.
Returns:
The generated string.

generate

public static java.lang.String generate(NotationName nn,
                                        java.lang.Object o,
                                        boolean documented)

General purpose static generator for any object that wishes to set the documented flag.

Uses the class of the object to determine which method to invoke. Only actually looks for MOperation and MAttribute. All others invoke the simpler version with no documented flag, so taking the default version.

Parameters:
o - The object to generate.
documented - A flag of unknown meaning. Only has any effect for MOperation and MAttribute.
Returns:
The generated string.

generate

public static java.lang.String generate(NotationContext ctx,
                                        java.lang.Object o)

generate

public static java.lang.String generate(NotationName nn,
                                        java.lang.Object o)

getNotation

public static NotationName getNotation(NotationContext context)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pce)
Called after the notation default property gets changed.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getDefaultProvider

public NotationProvider getDefaultProvider()

getAvailableNotations

public static java.util.ArrayList getAvailableNotations()
List of available notations.


makeNotation

public static NotationName makeNotation(java.lang.String k1,
                                        java.lang.String k2,
                                        javax.swing.Icon icon)
Create a versioned notation name with an icon.


getUseGuillemots

public static boolean getUseGuillemots()

setUseGuillemots

public static void setUseGuillemots(boolean useGuillemots)

getDefaultShadowWidth

public static int getDefaultShadowWidth()
get the default width for Fig shadows.


setDefaultShadowWidth

public static void setDefaultShadowWidth(int width)
set the default width for Fig Shadow.



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