|
SimJava v2.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--java.applet.Applet | +--eduni.simanim.Anim_applet
The superclass for all animated simulations.
Users that want to add animation to their simulations need to subclass Anim_applet
.
Following this they should override some or all of the following methods:
anim_layout
: This method must be overriden to set up the entities and
link their ports. Before setting up the entities, the sample generators' seed sequences could be modified.
anim_init
: This method may be overriden to add GUI components to the
simulation's animation. The way to do this would be to prepare the components and then add them to the
applet. The applet uses a BorderLayout
. The user in anim_init
may add to
"North", "East" and "West" (for example this.add("North", anOptionsPanel)
).
anim_completed
: This method may be overriden to add code that will be executed once the
simulation completes.
anim_output
: This method may be overriden to control the reporting information of the
animation. Since version 1.3, the simulation's report and simulation messages may be included in animated
simulations.
sim_setup
: This method may be overriden to add simulation conditions and set simulation
parameters. If a transient or termination condition is being used and if an output analysis method is selected
this method must be overriden to call these methods on Sim_system
.
More information of how to use these methods and how to add animation to simulations can be found at the SimJava Tutorial.
Sim_system
, Serialized FormInner classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected eduni.simanim.Sim_anim |
trace_out
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface eduni.simdiag.Traceable |
DISPLAY, LAYOUT, PAUSE, RUN, STOP, TRACE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Anim_applet()
|
Method Summary | |
void |
anim_completed()
Define code to be execute upon simulation completion. |
void |
anim_init()
Set up additional GUI components. |
abstract void |
anim_layout()
Setup the simulation. |
void |
anim_output()
Specify the level of reporting the animation should provide. |
void |
generate_messages(boolean do_messages)
Generate the simulation's messages. |
void |
generate_report(boolean do_report)
Generate the simulation's report. |
void |
sim_setup()
Specify simulation conditions, an output analysis method and other simulation parameters. |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
Methods inherited from interface java.awt.event.ActionListener |
actionPerformed |
Methods inherited from interface java.awt.event.AdjustmentListener |
adjustmentValueChanged |
Methods inherited from interface eduni.simjava.Sim_reporter |
append_report, close_report, setup_report |
Field Detail |
protected eduni.simanim.Sim_anim trace_out
Constructor Detail |
public Anim_applet()
Method Detail |
public abstract void anim_layout()
public void anim_init()
public void anim_completed()
public void sim_setup()
Sim_system
calls.
public void anim_output()
The only code that should be included here are a call to generate_report
and
a call to generate_messages
.
The default, if this method is not overriden, is to add only the simulation's messages.
public void generate_report(boolean do_report)
anim_output
method.
do_report
- true
if the report should be generated, false
otherwise.public void generate_messages(boolean do_messages)
anim_output
method.
do_messages
- true
if the messages should be generated, false
otherwise.
|
SimJava v2.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |