com.change_vision.jude.api.inf.editor
Interface StateMachineDiagramEditor

com.change_vision.jude.api.inf.editor.StateMachineDiagramEditor
All Superinterfaces:
BasicDiagramEditor, BehaviorDiagramEditor, DiagramEditor
All Implemented Interfaces:
BasicDiagramEditor, BehaviorDiagramEditor, DiagramEditor

public abstract StateMachineDiagramEditor
extends BehaviorDiagramEditor

Interface to create presentations in Statemachine Diagram.


Method Summary
abstract  void addRegion(INodePresentation parent, boolean isHorizontal)
          Add a region in a parent presentation.
abstract  void changeParentOfState(INodePresentation child, INodePresentation parent)
          Change a parent of a state or a pseudostate.
abstract  INodePresentation createChoicePseudostate(INodePresentation parent, Point2D location)
          Create a choice pseudostate.
abstract  INodePresentation createDeepHistoryPseudostate(INodePresentation parent, Point2D location)
          Create a deep history Pseudostate.
abstract  INodePresentation createFinalState(INodePresentation parent, Point2D location)
          Create a final state.
abstract  INodePresentation createForkPseudostate(INodePresentation parent, Point2D location, double width, double height)
          Create a fork pseudostate.
abstract  INodePresentation createInitialPseudostate(INodePresentation parent, Point2D location)
          Create an initial pseudostate.
abstract  INodePresentation createJoinPseudostate(INodePresentation parent, Point2D location, double width, double height)
          Create a Join Pseudostate.
abstract  INodePresentation createJunctionPseudostate(INodePresentation parent, Point2D location)
          Create a junction pseudostate.
abstract  INodePresentation createShallowHistoryPseudostate(INodePresentation parent, Point2D location)
          Create a shallow history Pseudostate.
abstract  INodePresentation createState(String name, INodePresentation parent, Point2D location)
          Create a state in a parent presentation.
abstract  IStateMachineDiagram createStatemachineDiagram(INamedElement owner, String name)
          Crate a statemachine diagram in a parent package.
abstract  INodePresentation createSubmachineState(INodePresentation parent, IStateMachineDiagram submachine, Point2D location)
          Create a submachine state.
abstract  ILinkPresentation createTransition(INodePresentation source, INodePresentation target)
          Create a transition.
abstract  void deleteRegion(INodePresentation parent, int index)
          Delete a region in a parent presentation.
 
Methods inherited from class com.change_vision.jude.api.inf.editor.BasicDiagramEditor
createNote, createNoteAnchor, createNoteAnchor
 
Methods inherited from class com.change_vision.jude.api.inf.editor.DiagramEditor
createImage, createImage, createLine, createRect, createText, delete, deleteDiagram, deletePresentation, getDiagram, setDiagram
 

Method Detail

createStatemachineDiagram

abstract IStateMachineDiagram createStatemachineDiagram(INamedElement owner,
                                                        String name)
Crate a statemachine diagram in a parent package. Diagram is set to DiagramEditor (DiagramEditor.setDiagram(IDiagram diagram)) if the diagram is created successfully.

Parameters:
owner - Parent Package
name - Statemachine Diagram Name
Returns:
Statemachine Diagram
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_NAME_ERROR_KEY - if the name is empty.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       READ_ONLY_KEY - if a read-only element is edited.
       INVALID_OWNER_KEY - if the owner is invalid.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createState

abstract INodePresentation createState(String name,
                                       INodePresentation parent,
                                       Point2D location)
Create a state in a parent presentation.

Parameters:
name - State Name
parent - Parent Presentation
location - Location
Returns:
INodePresentation State
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_NAME_ERROR_KEY - if the name is empty.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

addRegion

abstract void addRegion(INodePresentation parent,
                        boolean isHorizontal)
Add a region in a parent presentation.

Parameters:
parent - Parent Presentation
isHorizontal - is Horizontal.
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_NAME_ERROR_KEY - if the name is empty.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.
Since:
6.6.4

deleteRegion

abstract void deleteRegion(INodePresentation parent,
                           int index)
Delete a region in a parent presentation.

Parameters:
parent - Parent Presentation
index - region index
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_NAME_ERROR_KEY - if the name is empty.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.
Since:
6.6.4

createInitialPseudostate

abstract INodePresentation createInitialPseudostate(INodePresentation parent,
                                                    Point2D location)
Create an initial pseudostate.

Parameters:
parent - Parent Presentation
location - Location
Returns:
INodePresentation InitialPseudostate
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createFinalState

abstract INodePresentation createFinalState(INodePresentation parent,
                                            Point2D location)
Create a final state.

Parameters:
parent - Parent Presentation
location - Location
Returns:
INodePresentation FinalState
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createChoicePseudostate

abstract INodePresentation createChoicePseudostate(INodePresentation parent,
                                                   Point2D location)
Create a choice pseudostate.

Parameters:
parent - Parent Presentation
location - Location
Returns:
INodePresentation ChoicePseudostate
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createJunctionPseudostate

abstract INodePresentation createJunctionPseudostate(INodePresentation parent,
                                                     Point2D location)
Create a junction pseudostate.

Parameters:
parent - Parent Presentation
location - Location
Returns:
INodePresentation
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createForkPseudostate

abstract INodePresentation createForkPseudostate(INodePresentation parent,
                                                 Point2D location,
                                                 double width,
                                                 double height)
Create a fork pseudostate.

Parameters:
parent - parent Presentation
location - location
width - width
height - height
Returns:
INodePresentation
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createJoinPseudostate

abstract INodePresentation createJoinPseudostate(INodePresentation parent,
                                                 Point2D location,
                                                 double width,
                                                 double height)
Create a Join Pseudostate.

Parameters:
parent - Parent Presentation
location - Location
width - Width
height - Height
Returns:
INodePresentation
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createShallowHistoryPseudostate

abstract INodePresentation createShallowHistoryPseudostate(INodePresentation parent,
                                                           Point2D location)
Create a shallow history Pseudostate.

Parameters:
parent - Parent Presentation
location - Location
Returns:
INodePresentation
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       DUPLICATED_HISTORY_KEY - if a history already exists in a diagram or a composite state.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createDeepHistoryPseudostate

abstract INodePresentation createDeepHistoryPseudostate(INodePresentation parent,
                                                        Point2D location)
Create a deep history Pseudostate.

Parameters:
parent - Parent Presentation
location - Location
Returns:
INodePresentation
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       DUPLICATED_HISTORY_KEY - if a history already exists in a diagram or a composite state.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createSubmachineState

abstract INodePresentation createSubmachineState(INodePresentation parent,
                                                 IStateMachineDiagram submachine,
                                                 Point2D location)
Create a submachine state.

Parameters:
parent - Parent Presentation
submachine - Submachine
Returns:
INodePresentation
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       SAME_DIAGRAM_ERROR_KEY - if a SubmachineState is created in the same diagram.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       INVALID_PARENT_KEY - if the parent is invalid.
       READ_ONLY_KEY - if a read-only element is edited.
       OUT_OF_CONTAINER_KEY - if the location is specified out of container.
       LOCATION_ERROR_KEY - if a parent exists in the specified location.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

createTransition

abstract ILinkPresentation createTransition(INodePresentation source,
                                            INodePresentation target)
Create a transition.

Parameters:
source - Source
target - Target
Returns:
ILinkPresentation Transition
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
       READ_ONLY_KEY - if a read-only element is edited.
       INVALID_SOURCE_KEY - if a source of a relation is invalid.
       INVALID_TARGET_KEY - if a target of a relation is invalid.
       SELF_RELATION_KEY - if the self relationship is not allowed.
       DUPLICATED_OUTGOING_KEY - if duplicated outgoings are set.
       DUPLICATED_INCOMING_KEY - if duplicated incomings are set.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.

changeParentOfState

abstract void changeParentOfState(INodePresentation child,
                                  INodePresentation parent)
Change a parent of a state or a pseudostate.

Parameters:
child - Target presentation to change
parent - Parent presentation, null for just in diagram
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
       ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
       READ_ONLY_KEY - if a read-only element is edited.
       INVALID_PARENT_KEY - if the parent is invalid.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
Values:
       Error messages for exceptions.
Since:
6.7