|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectturingmachine.CTMData
turingmachine.CTMDataState
State data class.
Field Summary | |
---|---|
static int |
END_NODE
End state type. |
static int |
GOSUB_NODE
Gosub state type. |
private boolean |
mBreakPoint
is the breakpoint set on this state. |
private java.util.ArrayList<CTMDataLink> |
mLinksFrom
links from other states that come to this ( used for faster updates ) maybe make transient and autogen on load. |
private java.util.ArrayList<CTMDataLink> |
mLinksTo
links from this state that go to another. |
private CTMPoint |
mLocation
This states position in the document. |
private java.lang.String |
mName
The name of this states displayed state. |
private int |
mType
What type of state is this? |
static int |
NORMAL_NODE
Normal state type. |
(package private) static long |
serialVersionUID
Serial id, so future version will load old files |
static int |
START_NODE
Start state type. |
Constructor Summary | |
---|---|
CTMDataState(CTMDocument aDocument,
java.lang.String aStateName,
java.awt.Point aPoint)
Constructor. |
Method Summary | |
---|---|
void |
delete()
Delete this state from its document |
CTMDataLink |
getLinkToState(CTMDataState aState)
Check whether this state links from this to aState ( used as check before creating links ). |
CTMPoint |
getLocation()
Get the states center point location. |
java.lang.String |
getName()
Get the state name. |
int |
getType()
Get the state type. |
boolean |
hasLinksFrom()
Get whether or not this state has links leaving it. |
boolean |
isBreakPointSet()
Is the breakpoint set. |
CTMDataLink |
linkAdd(CTMDataState toState)
Add a link from this state to another state. |
private void |
linkAddTo(CTMDataLink aFromLink)
Add a reference to another states link to this state. |
void |
linkRemove(CTMDataLink aLink)
Remove a link from this state. |
private void |
linkRemoveTo(CTMDataLink aLink)
Remove a reference from another states link to this state. |
java.util.Iterator<CTMDataLink> |
linksFromIterator()
Get the iterator to this states links From. |
java.util.Iterator<CTMDataLink> |
linksToIterator()
Get the iterator to this states links To. |
void |
setBreakPoint(boolean breakpoint)
Sets the breakpoint. |
void |
setLocation(java.awt.geom.Point2D aPoint)
Set this states position within the document. |
void |
setStateName(java.lang.String name)
Set the state name. |
void |
setType(int aType)
Set the states type. |
void |
toFront()
Bring this state to the front in the document. |
private void |
touchLinks()
Set all sub links as modified so they will sync. |
void |
translate(int aX,
int aY)
Move this state relative to its' current position. |
Methods inherited from class turingmachine.CTMData |
---|
getDataParent, getDocument, getModificationCount, isDeleted, touch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
private java.lang.String mName
private CTMPoint mLocation
private boolean mBreakPoint
private java.util.ArrayList<CTMDataLink> mLinksTo
private java.util.ArrayList<CTMDataLink> mLinksFrom
private int mType
public static final int START_NODE
public static final int NORMAL_NODE
public static final int END_NODE
public static final int GOSUB_NODE
Constructor Detail |
---|
public CTMDataState(CTMDocument aDocument, java.lang.String aStateName, java.awt.Point aPoint)
aDocument
- The document this state data is part of.aStateName
- The name of this states state.aPoint
- The initial location of the state.Method Detail |
---|
public CTMDataLink linkAdd(CTMDataState toState)
toState
- The State to link to.
private void linkAddTo(CTMDataLink aFromLink)
aFromLink
- The other states linkTo instance.public void linkRemove(CTMDataLink aLink)
aLink
- The link to remove.private void linkRemoveTo(CTMDataLink aLink)
aLink
- The other states link instance remove.public boolean isBreakPointSet()
public void setBreakPoint(boolean breakpoint)
breakpoint
- The value to set the breakpoint to.public int getType()
public void setType(int aType)
aType
- The type of state to set it to.public CTMPoint getLocation()
public void setLocation(java.awt.geom.Point2D aPoint)
aPoint
- The new location for the state.public void translate(int aX, int aY)
aX
- The horizontal shift offset.aY
- The vertical shift offset.private void touchLinks()
public java.lang.String getName()
public void setStateName(java.lang.String name)
name
- The new name for the state.public void toFront()
public void delete()
delete
in class CTMData
public CTMDataLink getLinkToState(CTMDataState aState)
aState
- the state to check to.
public java.util.Iterator<CTMDataLink> linksToIterator()
public java.util.Iterator<CTMDataLink> linksFromIterator()
public boolean hasLinksFrom()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |