|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmauda.SimpleExercise
public class SimpleExercise
A central class to hold all relevant exercise-specific values and references to important other classes. If a GUI is needed please use the Exercise-class.
| Field Summary | |
|---|---|
static java.util.Vector |
availableOperations
Stores the possible operations on the data-structure |
static java.util.Vector |
availableSubOperations
Stores the possible suboperations on the data-structure |
static OperationExecuter |
operationExecuter
Stores the OperationExecuter who maps the Operation-IDs to the corresponding methods in the data-structure. |
| Constructor Summary | |
|---|---|
SimpleExercise()
Creates a SimpleExercise |
|
| Method Summary | |
|---|---|
void |
addExerciseUpdateListener(ExerciseUpdateListener eul)
Adds an ExerciseUpdateListener to the exercise. |
void |
addExerciseUpdateListenerFirst(ExerciseUpdateListener eul)
Adds an ExerciseUpdateListener to the exercise. |
java.util.Vector |
getAvailableOperations()
Gets the possible operations for a data-structure |
java.util.Vector |
getAvailableSubOperations()
Gets the possible suboperations for a given data-structure. |
java.lang.String |
getDataDirectory()
Gets the data-directory |
java.lang.String |
getDefaultFilename()
Gets the default exercise-filename |
int |
getDifficulty()
Gets the difficulty |
java.lang.Object |
getDSObject()
Gets the data-structure |
java.lang.String |
getFilename()
Gets the current exercise-filename |
MetaData |
getMetaData()
Gets the Meta-Data |
int |
getMode()
Gets the mode of the exercise |
static OperationExecuter |
getOperationExecuter()
Gets the OperationExecuter |
OperationRecorder |
getOperationRecorder()
Gets the OperationRecorder |
PlugInHandler |
getPlugInHandler()
Gets the PlugInHandler |
void |
init()
Initializes the SimpleExercise, so that it can be used |
boolean |
load(java.util.HashMap ht)
Loads a unworked exercise |
java.util.HashMap |
load(java.lang.String filename)
Loads an exercise |
boolean |
loadConfig(java.util.HashMap ht)
Configurates the editor for loading a specific exercise, what means, that e.g. the plug-in was checked, etc. |
void |
operationExecuted(java.lang.Object obj)
This method is called, when in JedasPanel an
operation was executed. |
void |
removeExerciseUpdateListener(ExerciseUpdateListener eul)
Removes an ExerciseUpdateListener from the exercise. |
java.util.HashMap |
save(java.lang.String filename)
Saves an exercise. |
void |
sendExerciseUpdateMessages(ExerciseUpdateEvent event)
Sends an ExerciseUpdateEvent to all listeners. |
void |
setAvailableOperations(java.util.Vector v)
Sets the possible operations for a data-structure. |
void |
setAvailableSubOperations(java.util.Vector v)
Sets the possible suboperations for a data-structure. |
void |
setDataDirectory(java.lang.String directory)
Sets the directory where plug-specific information is stored e.g. init-operations for automatic generation of exercises, or the knowledge-base for feedback-information |
void |
setDefaultFilename()
Sets the current exercise-filename to the default-filename |
void |
setDifficulty(int difficulty)
Sets the difficulty |
void |
setDSObject(java.lang.Object o)
Sets the data-structure, e.g. |
void |
setFilename(java.lang.String fn)
Sets the current exercise-filename |
void |
setMetaData(MetaData meta)
Sets the Meta-Data |
void |
setMode(int mode)
Sets the mode of the exercise, e.g. |
static void |
setOperationExecuter(OperationExecuter oe)
Sets the OperationExecuter |
void |
setPlugInHandler(PlugInHandler pih)
Sets the PlugInHandler |
void |
switchTo(java.lang.String plugInName)
Switches between available PlugIns. |
void |
updateMetaDataInitTodoRating()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static OperationExecuter operationExecuter
public static java.util.Vector availableOperations
PlugInHandlerpublic static java.util.Vector availableSubOperations
PlugInHandler| Constructor Detail |
|---|
public SimpleExercise()
| Method Detail |
|---|
public void init()
public void switchTo(java.lang.String plugInName)
plugInName - The name of the PlugInpublic PlugInHandler getPlugInHandler()
public void setPlugInHandler(PlugInHandler pih)
pih - PlugInHandlerpublic void addExerciseUpdateListener(ExerciseUpdateListener eul)
eul - ExerciseUpdateListenerpublic void addExerciseUpdateListenerFirst(ExerciseUpdateListener eul)
addExerciseUpdateListener(ExerciseUpdateListener)
place the Listener at the beginning of the Listener-Vector.
This is necessary, because OperationRecorder and UndoRedo,
have to notified before all other listeners, because other
listeners request the actual state of e.g. the
OperationRecorder's current operation. So there must be
entered an operation in the OperationRecorder before other
listeners perform a readout of that information.
eul - ExerciseUpdateListenerpublic void removeExerciseUpdateListener(ExerciseUpdateListener eul)
eul - ExerciseUpdateListenerpublic void sendExerciseUpdateMessages(ExerciseUpdateEvent event)
event - ExerciseUpdateEventpublic java.lang.String getFilename()
public java.lang.String getDefaultFilename()
public void setFilename(java.lang.String fn)
fn - filenamepublic void setDefaultFilename()
public void setDataDirectory(java.lang.String directory)
directory - Data-DirectoryPlugInHandlerpublic java.lang.String getDataDirectory()
setDataDirectory(String)public void setAvailableOperations(java.util.Vector v)
v - Vector of operation-IDsPlugInHandlerpublic java.util.Vector getAvailableOperations()
setAvailableOperations(Vector)public void setAvailableSubOperations(java.util.Vector v)
v - Vector of suboperation-IDsPlugInHandlerpublic java.util.Vector getAvailableSubOperations()
public static void setOperationExecuter(OperationExecuter oe)
oe - OperationExecuterPlugInHandlerpublic static OperationExecuter getOperationExecuter()
public MetaData getMetaData()
public void setMetaData(MetaData meta)
meta - Meta-Datapublic void updateMetaDataInitTodoRating()
public void setMode(int mode)
mode - mode-IDExerciseModepublic int getMode()
setMode(int)public void setDifficulty(int difficulty)
difficulty - difficulty-IDDifficultiespublic int getDifficulty()
setDifficulty(int)public void setDSObject(java.lang.Object o)
o - The data-structure-objectpublic java.lang.Object getDSObject()
setDSObject(Object)public OperationRecorder getOperationRecorder()
public void operationExecuted(java.lang.Object obj)
JedasPanel an
operation was executed.
obj - The executed operationpublic java.util.HashMap load(java.lang.String filename)
filename - Filename
public boolean loadConfig(java.util.HashMap ht)
ht - HashMap-representation of the exercise
public boolean load(java.util.HashMap ht)
ht - HashMap-representation of the exercise
public java.util.HashMap save(java.lang.String filename)
filename - Filename
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||