candy.util.whiteboard
Class Background

java.lang.Object
  |
  +--candy.core.candyObject
        |
        +--candy.util.whiteboard.WBPrimitive
              |
              +--candy.util.whiteboard.Background
All Implemented Interfaces:
net.jini.core.entry.Entry, java.io.Serializable

public class Background
extends WBPrimitive

See Also:
Serialized Form

Field Summary
 BGType bg
           
 
Fields inherited from class candy.util.whiteboard.WBPrimitive
begin, color, deleteFlag, end, myClassName, MyShape, myWB
 
Fields inherited from class candy.core.candyObject
description, handle, timestamp
 
Constructor Summary
Background(BGType j, java.lang.String s)
           
 
Method Summary
static boolean create(Whiteboard wb, ClientApp c)
          Entrypoint: fired when the primitive is selected from the toolbar
 boolean doAction(Whiteboard wb, java.awt.Graphics2D g2, javax.swing.JComponent j)
          Entry point: fired before the primitive is rendered
 java.awt.Shape drawNew()
          Every WBPrimitive must be able to draw itself.
static BGType generate(ClientApp c)
           
 javax.swing.JComponent getComponent()
          Entry point
static boolean preSequence(java.awt.event.MouseEvent e, Whiteboard w, java.awt.Graphics2D g)
          Entry points: fired when the mouse is initially clicked, released
 void setClient(ClientApp c)
          Entry point: if the primitive needs to know about the client, this will ensure that it's informed before the primitive renders
 
Methods inherited from class candy.util.whiteboard.WBPrimitive
deleted, draw, finalSequence, getClassName, getColor, getWBHandle, postSequence, setClassName
 
Methods inherited from class candy.core.candyObject
getDescription, getHandle, setDescription, setHandle
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bg

public BGType bg
Constructor Detail

Background

public Background(BGType j,
                  java.lang.String s)
Method Detail

drawNew

public java.awt.Shape drawNew()
Description copied from class: WBPrimitive
Every WBPrimitive must be able to draw itself.
Overrides:
drawNew in class WBPrimitive

setClient

public void setClient(ClientApp c)
Description copied from class: WBPrimitive
Entry point: if the primitive needs to know about the client, this will ensure that it's informed before the primitive renders
Overrides:
setClient in class WBPrimitive

create

public static boolean create(Whiteboard wb,
                             ClientApp c)
Description copied from class: WBPrimitive
Entrypoint: fired when the primitive is selected from the toolbar
Following copied from class: candy.util.whiteboard.WBPrimitive
Parameters:
wb - the whiteboard
c - the client

generate

public static BGType generate(ClientApp c)

getComponent

public javax.swing.JComponent getComponent()
Description copied from class: WBPrimitive
Entry point
Overrides:
getComponent in class WBPrimitive

preSequence

public static boolean preSequence(java.awt.event.MouseEvent e,
                                  Whiteboard w,
                                  java.awt.Graphics2D g)
Description copied from class: WBPrimitive
Entry points: fired when the mouse is initially clicked, released
Following copied from class: candy.util.whiteboard.WBPrimitive
Parameters:
e - The mouse event
w - The whiteboard
g - The graphics context

doAction

public boolean doAction(Whiteboard wb,
                        java.awt.Graphics2D g2,
                        javax.swing.JComponent j)
Description copied from class: WBPrimitive
Entry point: fired before the primitive is rendered
Overrides:
doAction in class WBPrimitive
Following copied from class: candy.util.whiteboard.WBPrimitive
Parameters:
w - the whiteboard
g2 - the graphics context
j - the background