|
Jedit 4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.bsu.cs.algorithm.Algorithm
Serves as a superclass of all algorithms for Jedit. Any properly written subclass can be used in Jedit 3.1 or higher with a single line of code in the JeditAlgorithms.java file. However, to add to menus and buttons, more must be done.
JeditAlgorithms
Constructor Summary | |
Algorithm()
Default constructor. |
|
Algorithm(String newName)
Constructor with a parameter to set the algorithm name to newName. |
Method Summary | |
abstract void |
callOwnConstructor(JavaGraph jGraph,
Vector inputs,
Vector animation)
This method is called by Jedit for any algorithm it executes and must be used in any working algorithm. |
String |
getCode()
Returns the value of code - generally the class name of the algorithm. |
Vector |
getDescription()
Returns the description of the algorithm. |
String |
getName()
Returns the algorithm's name. |
int |
getType()
Returns the type of the algorithm. |
void |
setCode(String newCode)
Sets the value of code - generally the class name of the algorithm. |
void |
setDescription(Vector d)
Sets the description of the algorithm to d. |
void |
setFromResources()
Sets algorithm attributes from the external resource file jedit.properties stored in the classes subdirectory. |
void |
setName(String newName)
Sets the algorithm's name to newName. |
void |
setType(int t)
Sets the algorithm type to t. |
boolean |
succeeded()
Returns true if the Algorithm succeeded, otherwise returns false. |
void |
succeeded(boolean newValue)
Sets the value of success. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Algorithm()
public Algorithm(String newName)
newName
- the name of the algorithmMethod Detail |
public boolean succeeded()
public void succeeded(boolean newValue)
newValue
- new value for algorithm successpublic String getName()
public void setName(String newName)
newName
- the new name for the algorithmpublic Vector getDescription()
public void setDescription(Vector d)
d
- a Vector containing the description of the algorithmpublic int getType()
public void setType(int t)
t
- the algorithm type (see options above)public String getCode()
public void setCode(String newCode)
newCode
- the String to set the algorithm code value topublic void setFromResources()
public abstract void callOwnConstructor(JavaGraph jGraph, Vector inputs, Vector animation)
jGraph
- the edu.bsu.cs.graph.JavaGraph that the algorithm is performed oninputs
- a Vector of inputs that consists of
animation
- a Vector that is filled with AnimObjects as the algorithm proceeds. It must be instantiated before this method is called.
|
Jedit 4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |