Class Whiteboard

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--Whiteboard
Direct Known Subclasses:
WhiteboardClient

public class Whiteboard
extends java.awt.Canvas
implements Recipient

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
protected  MessageOutput messageOut
           
protected  int oldX
           
protected  int oldY
           
 
Fields inherited from class java.awt.Canvas
base, graphicsConfig, nameCounter, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
Whiteboard()
           
 
Method Summary
 MessageOutput getMessageOutput()
           
 java.awt.Dimension getPreferredSize()
           
protected  void mouseDragged(java.awt.event.MouseEvent event)
           
protected  void mousePressed(java.awt.event.MouseEvent event)
           
protected  void mouseReleased(java.awt.event.MouseEvent event)
           
protected  void processEvent(java.awt.AWTEvent event)
           
 void receive(java.io.DataInputStream dataIn)
           
protected  void scribble(int x, int y)
           
 void setMessageOutput(MessageOutput messageOut)
           
protected  void transmit(int x, int y)
           
 
Methods inherited from class java.awt.Canvas
, addNotify, constructComponentName, paint, postsOldMouseEvents
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initIDs, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPrint, 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, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, readObject, remove, removeComponentListener, removeFocusListener, 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, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

messageOut

protected MessageOutput messageOut

oldX

protected int oldX

oldY

protected int oldY
Constructor Detail

Whiteboard

public Whiteboard()
Method Detail

setMessageOutput

public void setMessageOutput(MessageOutput messageOut)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Component

processEvent

protected void processEvent(java.awt.AWTEvent event)
Overrides:
processEvent in class java.awt.Component

mousePressed

protected void mousePressed(java.awt.event.MouseEvent event)

mouseDragged

protected void mouseDragged(java.awt.event.MouseEvent event)

mouseReleased

protected void mouseReleased(java.awt.event.MouseEvent event)

transmit

protected void transmit(int x,
                        int y)

scribble

protected void scribble(int x,
                        int y)

getMessageOutput

public MessageOutput getMessageOutput()

receive

public void receive(java.io.DataInputStream dataIn)
Specified by:
receive in interface Recipient