All Packages Class Hierarchy This Package Previous Next Index
Class javaParse.Transition
java.lang.Object
|
+----javaParse.Transition
- public class Transition
- extends Object
This class implements the transition function of a machine.
It is designed to be used with the current machine types:
FSA, PDA, TM1, TM2.
-
distance
-
-
fieldCounter
-
-
from
-
-
label
-
-
off
-
-
offr
-
-
selectedSublabel
-
-
separator
-
-
st
-
-
sublabel
-
-
to
-
-
Transition(State, State, int, String[])
- Creates a transition with the given
from and to states.
-
Transition(State, State, String, int, String[])
- Creates a transition with the given
from and to states and with the given label.
-
Transition(State, String, State)
-
-
computeArrow(Point, int[], int[])
- Computes the points of the little triangle which shows
the direction of the transition.
-
move(int, int)
-
-
paintLabel(Graphics, Transition, Point)
- Paints the label of a transition.
-
paintLine(Graphics, Transition)
- Paints the line of a transition.
-
processKey(int, KeyEvent)
- processes a KeyEvent that occured in this transition for the Desktop.
-
setLabel(Vector)
-
-
slope()
- Returns the slope of the line between the from and to states.
-
tokenizeLabel()
- Tokenizes the given label.
-
tokenizeOrList()
- returns a Vector of Strings corresponding to the list of ORed transitions represented
by this Transition
works only for FSA's
from
public State from
to
public State to
label
public String label
sublabel
public String sublabel[]
distance
public int distance
st
public int st
fieldCounter
public int fieldCounter
separator
public String separator[]
selectedSublabel
public int selectedSublabel
off
public static final int off
offr
public static final int offr
Transition
public Transition(State from,
State to,
String symbol,
int fields,
String seps[])
- Creates a transition with the given
from and to states and with the given label.
Transition
public Transition(State from,
State to,
int fields,
String seps[])
- Creates a transition with the given
from and to states.
Transition
public Transition(State ifrom,
String ilabel,
State ito)
move
public void move(int x,
int y)
slope
public double slope()
- Returns the slope of the line between the from and to states.
paintLabel
public void paintLabel(Graphics g,
Transition selectedTransition,
Point pl)
- Paints the label of a transition.
paintLine
public void paintLine(Graphics g,
Transition selectedTransition)
- Paints the line of a transition.
computeArrow
public void computeArrow(Point pl,
int xPoints[],
int yPoints[])
- Computes the points of the little triangle which shows
the direction of the transition.
- Parameters:
- pl - the upper left corner of the transition's label.
- xpoints - the x coordinates of the points representing the arrow.
- ypoints - the y coordinates of the points representing the arrow.
processKey
public boolean processKey(int key,
KeyEvent e)
- processes a KeyEvent that occured in this transition for the Desktop.
tokenizeLabel
public void tokenizeLabel()
- Tokenizes the given label.
The result is stored in the sublabel array.
tokenizeOrList
public Vector tokenizeOrList()
- returns a Vector of Strings corresponding to the list of ORed transitions represented
by this Transition
works only for FSA's
setLabel
public void setLabel(Vector aVector)
All Packages Class Hierarchy This Package Previous Next Index