Class PaintBugWindow.WindowCanvas
java.lang.Object
java.awt.Component
java.awt.Canvas
PaintBugWindow.WindowCanvas
- All Implemented Interfaces:
- DrawGraphics, ImageObserver, MenuContainer, Serializable, Accessible
- Enclosing class:
- PaintBugWindow
class PaintBugWindow.WindowCanvas
- extends Canvas
- implements DrawGraphics
Method Summary |
void |
addNotify()
|
void |
drawBugTrail(double xPos,
double yPos,
int trailWidth,
Color color)
|
void |
drawWindowToGraphics(Graphics g)
|
void |
drawWindowToGraphics(Graphics g,
int width,
int height)
|
int |
getMargin()
|
void |
hideBug(PaintBug bug,
double xPos,
double yPos,
double direction,
Color color,
String label)
|
void |
moveBug(PaintBug bug,
double xPos,
double yPos,
double direction)
|
void |
paint(Graphics g)
|
void |
showBug(PaintBug bug,
double xPos,
double yPos,
double direction,
Color color,
String label)
|
void |
update(Graphics g)
|
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, 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 |
BI_COMPRESSED_RLE4
static final int BI_COMPRESSED_RLE4
- See Also:
- Constant Field Values
BI_COMPRESSED_RLE8
static final int BI_COMPRESSED_RLE8
- See Also:
- Constant Field Values
BI_RGB
static final int BI_RGB
- See Also:
- Constant Field Values
bugColor
Color[] bugColor
bugDirection
double[] bugDirection
bugLabel
String[] bugLabel
bugLabelFM
FontMetrics bugLabelFM
bugLabelFont
Font bugLabelFont
bugs
PaintBug[] bugs
bugX
double[] bugX
bugY
double[] bugY
canvasHeight
int canvasHeight
canvasWidth
int canvasWidth
drawGrid
boolean drawGrid
gridLabelFM
FontMetrics gridLabelFM
gridLabelFont
Font gridLabelFont
labelHeight
int labelHeight
labelWidth
int labelWidth
left
int left
LEFT_TOP_MARGIN
static final int LEFT_TOP_MARGIN
- See Also:
- Constant Field Values
numBugs
int numBugs
offscreen
Image offscreen
offscreenTrails
Image offscreenTrails
out
DataOutputStream out
RIGHT_BOTTOM_MARGIN
static final int RIGHT_BOTTOM_MARGIN
- See Also:
- Constant Field Values
ROWS_GRABBED_AT_A_TIME
static final int ROWS_GRABBED_AT_A_TIME
- See Also:
- Constant Field Values
savePrint
SavePrint savePrint
status
Status status
TEXT_MARGIN
static final int TEXT_MARGIN
- See Also:
- Constant Field Values
textHeight
int textHeight
textLeft
int textLeft
textTop
int textTop
textWidth
int textWidth
top
int top
xSize
int xSize
ySize
int ySize
PaintBugWindow.WindowCanvas
public PaintBugWindow.WindowCanvas(int xSize,
int ySize,
boolean drawGrid)
addNotify
public void addNotify()
- Overrides:
addNotify
in class Canvas
drawBugTrail
public void drawBugTrail(double xPos,
double yPos,
int trailWidth,
Color color)
drawWindowToGraphics
public void drawWindowToGraphics(Graphics g)
- Specified by:
drawWindowToGraphics
in interface DrawGraphics
drawWindowToGraphics
public void drawWindowToGraphics(Graphics g,
int width,
int height)
- Specified by:
drawWindowToGraphics
in interface DrawGraphics
getMargin
public int getMargin()
- Specified by:
getMargin
in interface DrawGraphics
hideBug
public void hideBug(PaintBug bug,
double xPos,
double yPos,
double direction,
Color color,
String label)
moveBug
public void moveBug(PaintBug bug,
double xPos,
double yPos,
double direction)
paint
public void paint(Graphics g)
- Overrides:
paint
in class Canvas
showBug
public void showBug(PaintBug bug,
double xPos,
double yPos,
double direction,
Color color,
String label)
update
public void update(Graphics g)
- Overrides:
update
in class Canvas