org.argouml.notation
Class Notation

java.lang.Object
  extended by org.argouml.notation.Notation
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

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

Provides centralized methods dealing with notation.

Since:
0.9.4
Stereotype:
singleton

Field Summary
static java.lang.String DEFAULT_NOTATION
          Default notation with both base name and version (e.g.
static ConfigurationKey KEY_DEFAULT_NOTATION
          The configuration key for the preferred notation.
static ConfigurationKey KEY_SHOW_ASSOCIATION_NAMES
          Indicates if the user wants to see association names
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_SINGULAR_MULTIPLICITIES
          The configuration key that indicates whether to show stereotypes in the navigation panel.
static ConfigurationKey KEY_SHOW_STEREOTYPES
          The configuration key that indicates whether to show stereotypes in the navigation panel.
static ConfigurationKey KEY_SHOW_TYPES
          Indicates if the user wants to see the types and parameters of attributes and operations.
static ConfigurationKey KEY_SHOW_VISIBILITY
          Indicates if the user wants to see visibility signs (public, private, protected or # + -).
static ConfigurationKey KEY_USE_GUILLEMOTS
          The configuration key that indicates whether to use guillemots or greater/lessthan characters in stereotypes.
 
Method Summary
static NotationName findNotation(java.lang.String s)
          Convert a String into a NotationName.
static java.util.List<NotationName> getAvailableNotations()
          Get list of available notations, of type NotationName.
static NotationName getConfiguredNotation()
          Returns the Notation as set in the menu.
static Notation getInstance()
           
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)
           
static boolean removeNotation(NotationName theNotation)
          Remove a complete Notation language.
static void setDefaultNotation(NotationName n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NOTATION

public static final java.lang.String DEFAULT_NOTATION
Default notation with both base name and version (e.g. "UML 1.4")

See Also:
Constant Field Values

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_SHOW_SINGULAR_MULTIPLICITIES

public static final ConfigurationKey KEY_SHOW_SINGULAR_MULTIPLICITIES
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_SHOW_ASSOCIATION_NAMES

public static final ConfigurationKey KEY_SHOW_ASSOCIATION_NAMES
Indicates if the user wants to see association names


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_SHOW_TYPES

public static final ConfigurationKey KEY_SHOW_TYPES
Indicates if the user wants to see the types and parameters of attributes and operations.

Method Detail

setDefaultNotation

public static void setDefaultNotation(NotationName n)
Parameters:
n - the NotationName that will become default

findNotation

public static NotationName findNotation(java.lang.String s)
Convert a String into a NotationName.

Parameters:
s - the String
Returns:
the matching NotationName

getConfiguredNotation

public static NotationName getConfiguredNotation()
Returns the Notation as set in the menu.

Returns:
the default NotationName

getInstance

public static Notation getInstance()
Returns:
the singleton

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pce)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getAvailableNotations

public static java.util.List<NotationName> getAvailableNotations()
Get list of available notations, of type NotationName. This returns an immutable list so that the implementation type isn't exposed in the API.

Returns:
list of available notations

removeNotation

public static boolean removeNotation(NotationName theNotation)
Remove a complete Notation language. This is to be used by plug-ins that implement their own notation, and that are removed.

This function fails if the given notation does not exist.

Parameters:
theNotation - the given NotationName
Returns:
true if the Notation indeed is removed

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.

Parameters:
k1 - the name (e.g. UML)
k2 - the version (e.g. 1.3)
icon - the icon
Returns:
the notation name


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook