com.sun.multicast.reliable.applications.testtools
Class PerfMonCanvas

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--com.sun.multicast.reliable.applications.testtools.PerfMonCanvas
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.util.Observer, java.io.Serializable

public class PerfMonCanvas
extends java.awt.Canvas
implements java.util.Observer

PerfMonCanvas receives the GraphData objects from all the receivers, throws it into a GraphData vector and paints the Graph. The vector is used, so I can repaint the graph when the observer pattern notifies the engine that it needs repainting. Skewing is an option to allow the lines representing each receiver to be either next to each other (skewed) or on top of each other.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
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
 
Method Summary
 void customPaint()
          This is the paint that draws the lines in real time.
 void paint(java.awt.Graphics g)
          This is the paint that is called by the observer pattern.
 void printGData()
          Used for debugging only
 void resetGData()
          Restart the whole vector, this is not used currently used i for PerfMon
 void resetHostnames()
          Time to clear hash because it has been set to its original state.
 void setGData(com.sun.multicast.reliable.applications.testtools.GraphData gd)
          Sets the GraphData in the Graph Engine Vector.
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class java.awt.Canvas
addNotify, getAccessibleContext
 
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, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

paint

public void paint(java.awt.Graphics g)
This is the paint that is called by the observer pattern. It is also used whenever the graph is redrawn by reset or when starting up.
Overrides:
paint in class java.awt.Canvas

printGData

public void printGData()
Used for debugging only

customPaint

public void customPaint()
This is the paint that draws the lines in real time.

setGData

public void setGData(com.sun.multicast.reliable.applications.testtools.GraphData gd)
Sets the GraphData in the Graph Engine Vector. Replace, unless Vector is too small, in which case add it to the Vector.

resetGData

public void resetGData()
Restart the whole vector, this is not used currently used i for PerfMon

resetHostnames

public void resetHostnames()
Time to clear hash because it has been set to its original state.

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer


JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.