From afed274c10a93957f82a009824cafe8d83aa68a8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 15 Aug 2008 04:09:42 +0000 Subject: new branches --- .../simulator/VSSimulatorVisualization.html | 1013 ++++++++++++++++++++ 1 file changed, 1013 insertions(+) create mode 100644 VS-Sim-Javadoc/simulator/VSSimulatorVisualization.html (limited to 'VS-Sim-Javadoc/simulator/VSSimulatorVisualization.html') diff --git a/VS-Sim-Javadoc/simulator/VSSimulatorVisualization.html b/VS-Sim-Javadoc/simulator/VSSimulatorVisualization.html new file mode 100644 index 0000000..f1e55d6 --- /dev/null +++ b/VS-Sim-Javadoc/simulator/VSSimulatorVisualization.html @@ -0,0 +1,1013 @@ + + + + + + +VSSimulatorVisualization + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +simulator +
+Class VSSimulatorVisualization

+
+java.lang.Object
+  extended by java.awt.Component
+      extended by java.awt.Canvas
+          extended by simulator.VSSimulatorVisualization
+
+
+
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, javax.accessibility.Accessible, VSSerializable
+
+
+
+
public class VSSimulatorVisualization
extends java.awt.Canvas
implements java.lang.Runnable, VSSerializable
+ + +

+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! +

+ +

+

+
Author:
+
Paul C. Buetow
+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+ classVSSimulatorVisualization.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
+ voiddeserialize(VSSerialize serialize, + java.io.ObjectInputStream objectInputStream) + +
+          Deserializes
+ voideditProcess(int processNum) + +
+          Edits the process.
+ voideditProcess(VSInternalProcess process) + +
+          Edits the process.
+ voidfinish() + +
+          Called if the simulator has finished.
+ intgetNumProcesses() + +
+          Gets the num of processes.
+ VSInternalProcessgetProcess(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.
+ longgetStartTime() + +
+          Gets the start time.
+ VSTaskManagergetTaskManager() + +
+          Gets the task manager.
+ longgetTime() + +
+          Gets the time.
+ longgetUntilTime() + +
+          Gets the until time.
+ booleanhasThreadStopped() + +
+          Checks if the thread has been stopped.
+ voidisAntiAliased(boolean isAntiAliased) + +
+          Sets if the simulator graphics are anti aliased.
+ voidpaint() + +
+          Paints the simulator.
+ voidpause() + +
+          Call this, in order to pause the simulator.
+ voidplay() + +
+          Starts/plays the simulator.
+ intprocessIDCount() + +
+          Gets the next process id.
+ voidreset() + +
+          Call this, in order to reset the simulator.
+ voidrun() + +
+           
+ voidsendMessage(VSMessage message) + +
+          Sends a message.
+ voidserialize(VSSerialize serialize, + java.io.ObjectOutputStream objectOutputStream) + +
+          Serializes
+ voidshowLamport(boolean showLamport) + +
+          Sets, if the the lamport time should be shown.
+ voidshowVectorTime(boolean showVectorTime) + +
+          Sets, if the vector time should be shown.
+ voidstopThread() + +
+          Stops the thread of the simulator.
+ voidupdateFromPrefs() + +
+          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
+ +

+VSSimulatorVisualization

+
+public VSSimulatorVisualization(VSPrefs prefs,
+                                VSSimulator simulator,
+                                VSLogging loging)
+
+
Instantiates a new VSSimulatorVisualization object. +

+

+
Parameters:
prefs - the prefs
simulator - the simulator
loging - the loging
+
+ + + + + + + + +
+Method Detail
+ +

+paint

+
+public void paint()
+
+
Paints the simulator. +

+

+
+
+
+
+
+
+
+ +

+getTime

+
+public long getTime()
+
+
Gets the time. +

+

+
+
+
+ +
Returns:
the time
+
+
+
+ +

+getUntilTime

+
+public long getUntilTime()
+
+
Gets the until time. +

+

+
+
+
+ +
Returns:
the until time
+
+
+
+ +

+getStartTime

+
+public long getStartTime()
+
+
Gets the start time. +

+

+
+
+
+ +
Returns:
the start time
+
+
+
+ +

+processIDCount

+
+public int processIDCount()
+
+
Gets the next process id. +

+

+
+
+
+ +
Returns:
the next process id
+
+
+
+ +

+getTaskManager

+
+public VSTaskManager getTaskManager()
+
+
Gets the task manager. +

+

+
+
+
+ +
Returns:
the task manager
+
+
+
+ +

+getNumProcesses

+
+public int getNumProcesses()
+
+
Gets the num of processes. +

+

+
+
+
+ +
Returns:
the num of processes
+
+
+
+ +

+getProcess

+
+public VSInternalProcess getProcess(int processNum)
+
+
Gets the specified process. +

+

+
+
+
+
Parameters:
processNum - the process num to get the process of +
Returns:
the process
+
+
+
+ +

+run

+
+public void run()
+
+
+
Specified by:
run in interface java.lang.Runnable
+
+
+
+
+
+
+ +

+play

+
+public void play()
+
+
Starts/plays the simulator. +

+

+
+
+
+
+
+
+
+ +

+finish

+
+public void finish()
+
+
Called if the simulator has finished. +

+

+
+
+
+
+
+
+
+ +

+pause

+
+public void pause()
+
+
Call this, in order to pause the simulator. +

+

+
+
+
+
+
+
+
+ +

+reset

+
+public void reset()
+
+
Call this, in order to reset the simulator. +

+

+
+
+
+
+
+
+
+ +

+stopThread

+
+public void stopThread()
+
+
Stops the thread of the simulator. +

+

+
+
+
+
+
+
+
+ +

+hasThreadStopped

+
+public boolean hasThreadStopped()
+
+
Checks if the thread has been stopped. +

+

+
+
+
+ +
Returns:
true, if is thread has stopped
+
+
+
+ +

+showLamport

+
+public void showLamport(boolean showLamport)
+
+
Sets, if the the lamport time should be shown. It implicitly disables + the vector time. +

+

+
+
+
+
Parameters:
showLamport - true, if the lamport time should be shown
+
+
+
+ +

+showVectorTime

+
+public void showVectorTime(boolean showVectorTime)
+
+
Sets, if the vector time should be shown. It implicitly disables the + lamport time. +

+

+
+
+
+
Parameters:
showVectorTime - true, if the vector time should be shown
+
+
+
+ +

+isAntiAliased

+
+public void isAntiAliased(boolean isAntiAliased)
+
+
Sets if the simulator graphics are anti aliased. +

+

+
+
+
+
Parameters:
isAntiAliased - true, if the simulator is anti aliased
+
+
+
+ +

+sendMessage

+
+public void sendMessage(VSMessage message)
+
+
Sends a message. +

+

+
+
+
+
Parameters:
message - the message
+
+
+
+ +

+editProcess

+
+public void editProcess(int processNum)
+
+
Edits the process. +

+

+
+
+
+
Parameters:
processNum - the process num
+
+
+
+ +

+editProcess

+
+public void editProcess(VSInternalProcess process)
+
+
Edits the process. +

+

+
+
+
+
Parameters:
process - the process
+
+
+
+ +

+getProcessesArray

+
+public java.util.ArrayList<VSInternalProcess> getProcessesArray()
+
+
Gets the processes array. +

+

+
+
+
+ +
Returns:
the processes array
+
+
+
+ +

+getProcessIDs

+
+public java.lang.Integer[] getProcessIDs()
+
+
Gets the processes IDs. +

+

+
+
+
+ +
Returns:
the processes IDs
+
+
+
+ +

+getProcesses

+
+public java.util.ArrayList<VSInternalProcess> getProcesses()
+
+
Gets the processes. +

+

+
+
+
+ +
Returns:
the processes
+
+
+
+ +

+updateFromPrefs

+
+public void updateFromPrefs()
+
+
Updates from the prefs. Called by the VSSimulatorEditor if values + have been saved. +

+

+
+
+
+
+
+
+
+ +

+serialize

+
+public void serialize(VSSerialize serialize,
+                      java.io.ObjectOutputStream objectOutputStream)
+               throws java.io.IOException
+
+
Description copied from interface: VSSerializable
+
Serializes +

+

+
Specified by:
serialize in interface VSSerializable
+
+
+
Parameters:
serialize - The serialize object
objectOutputStream - The object output stream +
Throws: +
java.io.IOException
+
+
+
+ +

+deserialize

+
+public void deserialize(VSSerialize serialize,
+                        java.io.ObjectInputStream objectInputStream)
+                 throws java.io.IOException,
+                        java.lang.ClassNotFoundException
+
+
Description copied from interface: VSSerializable
+
Deserializes +

+

+
Specified by:
deserialize in interface VSSerializable
+
+
+
Parameters:
serialize - The serialize object
objectInputStream - The object input stream +
Throws: +
java.io.IOException +
java.lang.ClassNotFoundException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.3