|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
edu.bonn.xulu.plugin.gui.ModelControlContainer
public class ModelControlContainer
Diese Klasse stellt einen Container dar, ueber den der Modellablauf gesteuert werden kann. Hierzu enthaelt er 5 Buttons
StepModelThread
falls das Modell StepModel
implementiert, sonst XuluModelThread
)
und fuehrt XuluModel.initModel()
ausXuluModelThread#start()
ausXuluModelThread#pause()
ausStepModelThread.step()
ausXuluModelThread.terminate()
ausaddButtonActionListener(int,ActionListener)
koennen den
Button zusaetzliche Aktionen zugewiesen werden.
MultiModelControlPlugin
)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
BUTTON_INIT
Identifiziert den Init-Button. |
static int |
BUTTON_PAUSE
Identifiziert den Pause-Button. |
static int |
BUTTON_START
Identifiziert den Start/Resume-Button. |
static int |
BUTTON_STEP
Identifiziert den Step-Button. |
static int |
BUTTON_STOP
Identifiziert den Stop-Button. |
protected XuluModel |
model
|
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ModelControlContainer(XuluModel model)
Erzeugt eine neue Modell-Steuerungs-Komponente. |
Method Summary | |
---|---|
void |
addButtonActionListener(int button,
ActionListener listener)
Belegt einen Button mit einer Aktion. |
void |
addThreadListener(WorkingThreadListener listener)
Fuegt dem Modell-Thread einen Listener hinzu. |
protected void |
createNewThread()
Erzeugt einen neuen Thread fuer das Modell. |
XuluModel |
getModel()
Liefert das Modell, das durch den Container kontrolliert wird. |
XuluModelThread |
getModelThread()
|
void |
init()
inits the model |
void |
pause()
pauses the model |
void |
setModel(XuluModel model)
Setzt das Modell, das durch den Container kontrolliert wird. |
void |
start()
starts the model |
void |
step()
makes one model step |
void |
stop()
stops the model |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int BUTTON_INIT
public static final int BUTTON_START
public static final int BUTTON_PAUSE
public static final int BUTTON_STEP
public static final int BUTTON_STOP
protected XuluModel model
Constructor Detail |
---|
public ModelControlContainer(XuluModel model)
model
- zu steuerndes XuluModelMethod Detail |
---|
public void setModel(XuluModel model)
model
- ein Modellpublic XuluModel getModel()
public void addButtonActionListener(int button, ActionListener listener)
button
- Code fuer den Buttonlistener
- AktionBUTTON_INIT
,
BUTTON_START
,
BUTTON_PAUSE
,
BUTTON_STEP
,
BUTTON_STOP
public void addThreadListener(WorkingThreadListener listener)
listener
- Modell-Listenerpublic void start()
public void init()
public void stop()
public void step()
public void pause()
public XuluModelThread getModelThread()
protected void createNewThread()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |