moebiusViewer.viewer
Class JViewerCanvas

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bymoebiusViewer.viewer.AbstractJViewerCanvas
                  extended bymoebiusViewer.viewer.JViewerCanvas
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
JMoebiusViewer

public class JViewerCanvas
extends AbstractJViewerCanvas
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 javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
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.AbstractJViewerCanvas
size
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
JViewerCanvas(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.AbstractJViewerCanvas
actionPerformed, doLayout, isFocusTraversable, paintComponent, processKeyEvent, processMouseEvent, processMouseMotionEvent, propertyChange, repaint, repaint, repaint, repaint, validate
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, 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

JViewerCanvas

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

processTypedKey

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

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()