se.umu.cs.SequenceDiagramEditor
Class CurrentState

java.lang.Object
  extended byse.umu.cs.SequenceDiagramEditor.CurrentState

public class CurrentState
extends java.lang.Object

This class represents the current state of a class and defines different states.

Author:
Matilda Östling

Field Summary
static int CHANGE
          The state when an entity can be changed.
private  int currentState
          The currentstate of the class.
static int DRAGGING_END
          The state when the end of an entity can be changed.
static int DRAGGING_START
          The state when the start of an entity can be changed.
static int FIND_END_POINT
          The state when finding a endpoint.
static int INSERT
          The state when inserting a new entity.
static int MOVE_OBJECT
          The state when an entity can be moved.
static int NORMAL
          The normal state.
static int RUBBERBAND
          The state when a message is being drawn.
 
Constructor Summary
CurrentState()
          The constructor of the class.
 
Method Summary
 int getCurrentState()
          This method returns the current state of the class.
 void setCurrentState(int s)
          This method sets the current state of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
The normal state.

See Also:
Constant Field Values

INSERT

public static final int INSERT
The state when inserting a new entity.

See Also:
Constant Field Values

FIND_END_POINT

public static final int FIND_END_POINT
The state when finding a endpoint.

See Also:
Constant Field Values

RUBBERBAND

public static final int RUBBERBAND
The state when a message is being drawn.

See Also:
Constant Field Values

CHANGE

public static final int CHANGE
The state when an entity can be changed.

See Also:
Constant Field Values

DRAGGING_END

public static final int DRAGGING_END
The state when the end of an entity can be changed.

See Also:
Constant Field Values

DRAGGING_START

public static final int DRAGGING_START
The state when the start of an entity can be changed.

See Also:
Constant Field Values

MOVE_OBJECT

public static final int MOVE_OBJECT
The state when an entity can be moved.

See Also:
Constant Field Values

currentState

private int currentState
The currentstate of the class.

Constructor Detail

CurrentState

public CurrentState()
The constructor of the class. Sets the current state to NORMAL.

Method Detail

setCurrentState

public void setCurrentState(int s)
This method sets the current state of this class.

Parameters:
s - The current state.

getCurrentState

public int getCurrentState()
This method returns the current state of the class.

Returns:
The current state.