|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmauda.SimpleExercise
mauda.Exercise
public class Exercise
A central class to hold all relevant exercise-specific values and references to important other classes. Extends SimpleExercise with GUI-specific needs.
| Field Summary | |
|---|---|
static int |
BOTHOPERATION
Show both operations and suboperations in the interactive-menu |
static jedas.CompPanel |
compPanel
|
static jedas.ControlPanel |
controlPanel
|
static java.awt.event.MouseListener |
interactive
|
JedasPanel |
jedasPanel
|
static int |
NOPOPUP
Allow no user-inputs in the interactive-menu |
static int |
OPERATION
Show only operations in the interactive-menu |
java.util.Vector |
opsToAnimate
|
static boolean |
quickAnim
|
static jedas.Scheduler |
scheduler
|
static int |
SUBOPERATION
Show only suboperations in the interactive-menu |
| Fields inherited from class mauda.SimpleExercise |
|---|
availableOperations, availableSubOperations, operationExecuter |
| Constructor Summary | |
|---|---|
Exercise(java.lang.String type)
Creates a new exercise |
|
| Method Summary | |
|---|---|
boolean |
actionsAllowed()
Returns the actions-allowed state |
java.util.Vector |
addFullLoadedMessage(java.util.Vector v)
|
void |
animate()
Starts the jedas-animation. |
void |
back()
Performs a step back. |
void |
commit(OperationQueue oq)
Adds several operations (from OperationQueue) to the animation-operations that the JedasPanel should execute |
void |
commit(SimpleOperation so)
Adds an operation to the animation-queue |
void |
commit(java.lang.String operation,
java.lang.String alert)
Generates a failure-message in respect to the operation, that should executed. |
void |
commit(java.util.Vector v)
Adds several operations/exercise-update-events to the animation-operations that the JedasPanel should execute |
void |
commitInteractive(SimpleOperation so)
Adds an operation to the animation-queue. |
void |
forward()
Performs a step forward. |
int |
getInteractiveMode()
Gets the current editing-mode |
UndoRedo |
getUndoRedo()
Gets the undo/redo-handler |
boolean |
isModified()
Returns the modification-state of the exericse |
java.lang.String |
isReadyToSave()
Checking for correct exercises. |
void |
jumpToBeginning()
Jumps to the beginning of the exercise. |
void |
jumpToEnd()
|
java.util.HashMap |
load(java.lang.String filename)
Loads an exercise |
void |
redo()
Performs a redo. |
void |
reset()
Prepares the exercise-object for loading a new exercise, or to generate a new exercise. |
java.util.HashMap |
save(java.lang.String filename)
Saves an exercise. |
void |
setActionsAllowed(boolean b)
Turns actions for buttons/menus on or off |
void |
setDifficulty(int difficulty)
Sets the difficulty |
void |
setInteractiveMode(int mode)
Mode for editing on exercise |
void |
setMode(int mode)
Sets the mode of the exercise, e.g. |
void |
setModified(boolean m)
Sets the modification-state of the exercise |
static void |
setQuickAnim(boolean b)
Sets the quick-animation-mode for the jedas-panel |
void |
stopPlaying()
This methods stops the jedas-animation immediatly after the operation that is currently executed. |
void |
switchTo(java.lang.String plugInName)
Switches between available PlugIns. |
void |
undo()
Performs an undo. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public JedasPanel jedasPanel
public static jedas.Scheduler scheduler
public static jedas.ControlPanel controlPanel
public static jedas.CompPanel compPanel
public static java.awt.event.MouseListener interactive
public static boolean quickAnim
public java.util.Vector opsToAnimate
public static final int OPERATION
public static final int SUBOPERATION
public static final int BOTHOPERATION
public static final int NOPOPUP
| Constructor Detail |
|---|
public Exercise(java.lang.String type)
type - the plug-in-type, e.g. FibHeap| Method Detail |
|---|
public void setModified(boolean m)
m - true if modified, false otherwisepublic boolean isModified()
public java.util.Vector addFullLoadedMessage(java.util.Vector v)
public void reset()
ExerciseUpdateEvent
with the id RESET, and sends it to its
listeners.
public void switchTo(java.lang.String plugInName)
SimpleExercise
switchTo in class SimpleExerciseplugInName - The name of the PlugInpublic void setMode(int mode)
SimpleExercise
setMode in class SimpleExercisemode - mode-IDExerciseModepublic static void setQuickAnim(boolean b)
b - true turns quick-animation on, false offpublic void setInteractiveMode(int mode)
mode - see NOPOPUP OPERATION SUBOPERATION BOTHOPERATIONpublic int getInteractiveMode()
setInteractiveMode(int)public void setActionsAllowed(boolean b)
b - true to turn on actions, false otherwisepublic boolean actionsAllowed()
public UndoRedo getUndoRedo()
public void setDifficulty(int difficulty)
SimpleExercise
setDifficulty in class SimpleExercisedifficulty - difficulty-IDDifficultiespublic void animate()
public void back()
public void forward()
public void undo()
public void redo()
public void jumpToBeginning()
public void jumpToEnd()
public void commit(SimpleOperation so)
so - SimpleOperationpublic void commitInteractive(SimpleOperation so)
so - SimpleOperationpublic void commit(java.util.Vector v)
v - Vector of operations and/or ExerciseUpdateEventspublic void commit(OperationQueue oq)
oq - OperationQueuepublic void stopPlaying()
public void commit(java.lang.String operation,
java.lang.String alert)
operation - The ID of the selected operationalert - A description, why this operation cannot be executed.public java.util.HashMap load(java.lang.String filename)
SimpleExercise
load in class SimpleExercisefilename - Filename
public java.util.HashMap save(java.lang.String filename)
SimpleExercise
save in class SimpleExercisefilename - Filename
public java.lang.String isReadyToSave()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||