simulator
Class VSSimulatorVisualization.VSMessageLine

java.lang.Object
  extended by simulator.VSSimulatorVisualization.VSMessageLine
Enclosing class:
VSSimulatorVisualization

public class VSSimulatorVisualization.VSMessageLine
extends java.lang.Object

The class VSMessageLine, an object of this class represents a message line drawn into the painting area.

Author:
Paul C. Buetow

Constructor Summary
VSSimulatorVisualization.VSMessageLine(VSInternalProcess receiverProcess, long sendTime, long recvTime, long outageTime, int senderNum, int receiverNum, VSTask task)
          Instantiates a new VSMessageLine object.
 
Method Summary
 void draw(java.awt.Graphics2D g, long globalTime)
          Draws the message line.
 boolean equals(VSSimulatorVisualization.VSMessageLine line)
          Checks one line to another if they equal (have the same message line id)
 long getMessageLineNum()
          Gets the message line num.
 VSTask getTask()
          Gets the task.
 void recalcOnChange()
          Recalc on change.
 boolean removedAProcessAtIndex(int index)
          Called if a process within the simulator has been removed at a specified index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VSSimulatorVisualization.VSMessageLine

public VSSimulatorVisualization.VSMessageLine(VSInternalProcess receiverProcess,
                                              long sendTime,
                                              long recvTime,
                                              long outageTime,
                                              int senderNum,
                                              int receiverNum,
                                              VSTask task)
Instantiates a new VSMessageLine object.

Parameters:
receiverProcess - the receiver process
sendTime - the send time
recvTime - the recv time
outageTime - the outage time
senderNum - the sender num
receiverNum - the receiver num
task - the task
Method Detail

recalcOnChange

public void recalcOnChange()
Recalc on change.


draw

public void draw(java.awt.Graphics2D g,
                 long globalTime)
Draws the message line.

Parameters:
g - the grpahics object to draw at
globalTime - the global time

removedAProcessAtIndex

public boolean removedAProcessAtIndex(int index)
Called if a process within the simulator has been removed at a specified index.

Parameters:
index - the index
Returns:
true, if the sender or the receiver of the message has been removed from the simulator. Else false is returned.

getMessageLineNum

public long getMessageLineNum()
Gets the message line num.

Returns:
the message line num

equals

public boolean equals(VSSimulatorVisualization.VSMessageLine line)
Checks one line to another if they equal (have the same message line id)

Parameters:
line - the line to compare against
Returns:
true, if they equal

getTask

public VSTask getTask()
Gets the task.

Returns:
the task