org.argouml.notation
Class Notation

java.lang.Object
  extended byorg.argouml.notation.Notation
All Implemented Interfaces:
EventListener, PropertyChangeListener

public final class Notation
extends Object
implements PropertyChangeListener

Provides centralized methods dealing with notation.

Since:
0.9.4

Field Summary
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_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
protected  void finalize()
          Remove the notation change listener.
static NotationName findNotation(String s)
          Convert a String into a NotationName.
static ArrayList getAvailableNotations()
          Get list of available notations, of type NotationName.
static NotationName getConfigueredNotation()
          Returns the Notation as set in the menu.
static int getDefaultShadowWidth()
          Deprecated. by MVW in V0.21.3.Use ProjectSettings instead.
static Notation getInstance()
           
static NotationName getNotation(NotationContext context)
          Deprecated. by MVW in V0.21.3. Replaced by ProjectSettings.getNotationName() See issue 3140.
static boolean getUseGuillemots()
          Deprecated. by MVW in V0.21.3.Use ProjectSettings instead.
static NotationName makeNotation(String k1, String k2, Icon icon)
          Create a versioned notation name with an icon.
 void propertyChange(PropertyChangeEvent pce)
          Called after the notation default property gets changed.
static void setDefaultNotation(NotationName n)
           
static void setDefaultShadowWidth(int width)
          Deprecated. by MVW in V0.21.3.Use ProjectSettings instead.
static void setUseGuillemots(boolean useGuillemots)
          Deprecated. by MVW in V0.21.3.Use ProjectSettings instead.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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_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.


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

protected void finalize()
Remove the notation change listener. finalize should never happen, but play it safe. TODO: Explain why we don't call super.finalize()!


setDefaultNotation

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

findNotation

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

Parameters:
s - the String
Returns:
the matching Notationname

getConfigueredNotation

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

Returns:
the default NotationName

getInstance

public static Notation getInstance()
Returns:
the singleton

getNotation

public static NotationName getNotation(NotationContext context)
Deprecated. by MVW in V0.21.3. Replaced by ProjectSettings.getNotationName() See issue 3140.

Parameters:
context - the notation context
Returns:
the notation name

propertyChange

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

Specified by:
propertyChange in interface PropertyChangeListener
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

getAvailableNotations

public static ArrayList getAvailableNotations()
Get list of available notations, of type NotationName.

Returns:
list of available notations

makeNotation

public static NotationName makeNotation(String k1,
                                        String k2,
                                        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

getUseGuillemots

public static boolean getUseGuillemots()
Deprecated. by MVW in V0.21.3.Use ProjectSettings instead.

Returns:
true if guillemots (« and ») are used instead of << and >>.

setUseGuillemots

public static void setUseGuillemots(boolean useGuillemots)
Deprecated. by MVW in V0.21.3.Use ProjectSettings instead.

Parameters:
useGuillemots - true if guillemots (« and ») shall be used instead of << and >>.

getDefaultShadowWidth

public static int getDefaultShadowWidth()
Deprecated. by MVW in V0.21.3.Use ProjectSettings instead.

Get the default width for Fig shadows.

Returns:
the default width for Fig shadows

setDefaultShadowWidth

public static void setDefaultShadowWidth(int width)
Deprecated. by MVW in V0.21.3.Use ProjectSettings instead.

Set the default width for Fig Shadow.

Parameters:
width - the Fig shadow width


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook