org.argouml.notation.providers.uml
Class StateBodyNotationUml

java.lang.Object
  extended by org.argouml.notation.NotationProvider
      extended by org.argouml.notation.providers.StateBodyNotation
          extended by org.argouml.notation.providers.uml.StateBodyNotationUml

public class StateBodyNotationUml
extends StateBodyNotation

UML notation for the body of a state.


Constructor Summary
StateBodyNotationUml(java.lang.Object state)
          The constructor.
 
Method Summary
 java.lang.String getParsingHelp()
           
 void parse(java.lang.Object modelElement, java.lang.String text)
          Parses the given text, and adapts the modelElement and maybe related elements accordingly.
protected  void parseStateBody(java.lang.Object st, java.lang.String s)
          Parse user input for state bodies and assign the individual lines to according actions or transitions.
 java.lang.String toString(java.lang.Object modelElement, NotationSettings settings)
          Generate a string representation for the given model element.
 
Methods inherited from class org.argouml.notation.providers.StateBodyNotation
initialiseListener
 
Methods inherited from class org.argouml.notation.NotationProvider
addElementListener, addElementListener, addElementListener, cleanListener, formatNameList, formatNameList, removeAllElementListeners, removeElementListener, updateListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateBodyNotationUml

public StateBodyNotationUml(java.lang.Object state)
The constructor.

Parameters:
state - the state represented by the notation
Method Detail

parse

public void parse(java.lang.Object modelElement,
                  java.lang.String text)
Description copied from class: NotationProvider
Parses the given text, and adapts the modelElement and maybe related elements accordingly.

Specified by:
parse in class NotationProvider
Parameters:
modelElement - the modelelement to adapt
text - the string given by the user to be parsed to adapt the model

getParsingHelp

public java.lang.String getParsingHelp()
Specified by:
getParsingHelp in class NotationProvider
Returns:
a i18 key that represents a help string giving an explanation to the user of the syntax

toString

public java.lang.String toString(java.lang.Object modelElement,
                                 NotationSettings settings)
Description copied from class: NotationProvider
Generate a string representation for the given model element.

Specified by:
toString in class NotationProvider
Parameters:
modelElement - the base UML element
settings - settings that control rendering of the text
Returns:
the string written in the correct notation

parseStateBody

protected void parseStateBody(java.lang.Object st,
                              java.lang.String s)
                       throws java.text.ParseException
Parse user input for state bodies and assign the individual lines to according actions or transitions. The user input consists of multiple lines like:
   action-label / action-expression
 
or the format of a regular transition - see parseTransition().

"action-label" stands for one of "entry", "do" and "exit". The words "entry", "do" and "exit" are case-independent.

Parameters:
st - The State object.
s - The string to parse.
Throws:
java.text.ParseException - when there is a syntax problem, e.g. non-matching brackets () or []


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook