moebiusViewer.viewer
Class ViewerCanvas

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended bymoebiusViewer.viewer.AbstractViewerCanvas
              extended bymoebiusViewer.viewer.ViewerCanvas
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
MoebiusViewer, ViewerCanvasWithGenericPicker

public class ViewerCanvas
extends AbstractViewerCanvas
implements java.io.Serializable, java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.awt.image.ImageObserver

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class moebiusViewer.viewer.AbstractViewerCanvas
offscreenGraphics, preferredHeight, preferredWidth, size, viewer
 
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
 
Constructor Summary
ViewerCanvas(AbstractDrawer drawer, AbstractPicker picker, AbstractBounder bounder)
           
 
Method Summary
 void add(MoebiusShape aShape)
           
 void add(MoebiusShape[] aShape)
           
 void center()
           
 boolean contains(MoebiusShape shape)
           
 void encompass()
           
 void encompass(boolean reset)
           
 Attributes getAttributes()
           
 void invertInUnitCircle()
           
 void paintOffScreen(java.awt.image.BufferedImage anImage)
           
protected  void processTypedKey(char typedKey)
           
 void remove(MoebiusShape aShape)
           
 void remove(MoebiusShape[] aShape)
           
 void removeAll()
           
 void set(int index, MoebiusShape aShape)
           
 void set(MoebiusShape[] someShapes)
           
 void setAttributes(Attributes a)
           
 void setFont(java.awt.Font aFont)
           
 void writePPM()
           
 void writePPM(java.io.File file)
           
 void writePPM(java.lang.String filename)
           
 void writePS()
           
 void writePS(java.awt.Dimension d)
           
 void writePS(MoebiusShape shape, Rectangle aBound)
           
 void writePS(Rectangle aBound)
           
 
Methods inherited from class moebiusViewer.viewer.AbstractViewerCanvas
actionPerformed, getMinimumSize, getPreferredHeight, getPreferredSize, getPreferredWidth, invalidate, isDoubleBuffered, isFocusTraversable, isOpaque, mousePressed, paint, processKeyEvent, processMouseEvent, processMouseMotionEvent, propertyChange, repaint, repaint, repaint, repaint, setDoubleBuffered, setPreferredHeight, setPreferredWidth, update, validate
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
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, 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, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface java.awt.image.ImageObserver
imageUpdate
 

Constructor Detail

ViewerCanvas

public ViewerCanvas(AbstractDrawer drawer,
                    AbstractPicker picker,
                    AbstractBounder bounder)
Method Detail

processTypedKey

protected void processTypedKey(char typedKey)
Overrides:
processTypedKey in class AbstractViewerCanvas

setFont

public void setFont(java.awt.Font aFont)

contains

public boolean contains(MoebiusShape shape)

removeAll

public void removeAll()

set

public void set(MoebiusShape[] someShapes)

set

public void set(int index,
                MoebiusShape aShape)

add

public void add(MoebiusShape aShape)

add

public void add(MoebiusShape[] aShape)

remove

public void remove(MoebiusShape aShape)

remove

public void remove(MoebiusShape[] aShape)

writePS

public void writePS(MoebiusShape shape,
                    Rectangle aBound)

writePS

public void writePS(Rectangle aBound)

writePS

public void writePS(java.awt.Dimension d)

writePS

public void writePS()

paintOffScreen

public void paintOffScreen(java.awt.image.BufferedImage anImage)

writePPM

public void writePPM(java.lang.String filename)
              throws java.io.IOException
Throws:
java.io.IOException

writePPM

public void writePPM(java.io.File file)
              throws java.io.IOException
Throws:
java.io.IOException

writePPM

public void writePPM()

encompass

public void encompass()

encompass

public void encompass(boolean reset)

center

public void center()

invertInUnitCircle

public void invertInUnitCircle()

setAttributes

public void setAttributes(Attributes a)

getAttributes

public Attributes getAttributes()