|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
simulator.VSSimulatorVisualization
public class VSSimulatorVisualization
The class VSSimulatorVisualization. An instance of this object represents the graphical paint area of a simulator. It contains all graphic calculations. Also the simulator thread takes place in this class in a loop! This class is probably the most cryptic of the whole simulator source code. This is this way in order to gain more performance of the painting area!
| Nested Class Summary | |
|---|---|
class |
VSSimulatorVisualization.VSMessageLine
The class VSMessageLine, an object of this class represents a message line drawn into the painting area. |
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
VSSimulatorVisualization(VSPrefs prefs,
VSSimulator simulator,
VSLogging loging)
Instantiates a new VSSimulatorVisualization object. |
|
| Method Summary | |
|---|---|
void |
deserialize(VSSerialize serialize,
java.io.ObjectInputStream objectInputStream)
Deserializes |
void |
editProcess(int processNum)
Edits the process. |
void |
editProcess(VSInternalProcess process)
Edits the process. |
void |
finish()
Called if the simulator has finished. |
int |
getNumProcesses()
Gets the num of processes. |
VSInternalProcess |
getProcess(int processNum)
Gets the specified process. |
java.util.ArrayList<VSInternalProcess> |
getProcesses()
Gets the processes. |
java.util.ArrayList<VSInternalProcess> |
getProcessesArray()
Gets the processes array. |
java.lang.Integer[] |
getProcessIDs()
Gets the processes IDs. |
long |
getStartTime()
Gets the start time. |
VSTaskManager |
getTaskManager()
Gets the task manager. |
long |
getTime()
Gets the time. |
long |
getUntilTime()
Gets the until time. |
boolean |
hasThreadStopped()
Checks if the thread has been stopped. |
void |
isAntiAliased(boolean isAntiAliased)
Sets if the simulator graphics are anti aliased. |
void |
paint()
Paints the simulator. |
void |
pause()
Call this, in order to pause the simulator. |
void |
play()
Starts/plays the simulator. |
int |
processIDCount()
Gets the next process id. |
void |
reset()
Call this, in order to reset the simulator. |
void |
run()
|
void |
sendMessage(VSMessage message)
Sends a message. |
void |
serialize(VSSerialize serialize,
java.io.ObjectOutputStream objectOutputStream)
Serializes |
void |
showLamport(boolean showLamport)
Sets, if the the lamport time should be shown. |
void |
showVectorTime(boolean showVectorTime)
Sets, if the vector time should be shown. |
void |
stopThread()
Stops the thread of the simulator. |
void |
updateFromPrefs()
Updates from the prefs. |
| Methods inherited from class java.awt.Canvas |
|---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, paint, update |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VSSimulatorVisualization(VSPrefs prefs,
VSSimulator simulator,
VSLogging loging)
prefs - the prefssimulator - the simulatorloging - the loging| Method Detail |
|---|
public void paint()
public long getTime()
public long getUntilTime()
public long getStartTime()
public int processIDCount()
public VSTaskManager getTaskManager()
public int getNumProcesses()
public VSInternalProcess getProcess(int processNum)
processNum - the process num to get the process of
public void run()
run in interface java.lang.Runnablepublic void play()
public void finish()
public void pause()
public void reset()
public void stopThread()
public boolean hasThreadStopped()
public void showLamport(boolean showLamport)
showLamport - true, if the lamport time should be shownpublic void showVectorTime(boolean showVectorTime)
showVectorTime - true, if the vector time should be shownpublic void isAntiAliased(boolean isAntiAliased)
isAntiAliased - true, if the simulator is anti aliasedpublic void sendMessage(VSMessage message)
message - the messagepublic void editProcess(int processNum)
processNum - the process numpublic void editProcess(VSInternalProcess process)
process - the processpublic java.util.ArrayList<VSInternalProcess> getProcessesArray()
public java.lang.Integer[] getProcessIDs()
public java.util.ArrayList<VSInternalProcess> getProcesses()
public void updateFromPrefs()
public void serialize(VSSerialize serialize,
java.io.ObjectOutputStream objectOutputStream)
throws java.io.IOException
VSSerializable
serialize in interface VSSerializableserialize - The serialize objectobjectOutputStream - The object output stream
java.io.IOException
public void deserialize(VSSerialize serialize,
java.io.ObjectInputStream objectInputStream)
throws java.io.IOException,
java.lang.ClassNotFoundException
VSSerializable
deserialize in interface VSSerializableserialize - The serialize objectobjectInputStream - The object input stream
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||