moebiusViewer.viewer
Class AbstractViewer
java.lang.Object
moebiusViewer.viewer.AbstractViewer
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable
- public class AbstractViewer
- extends java.lang.Object
- implements java.io.Serializable, java.awt.event.ActionListener, java.beans.PropertyChangeListener
- See Also:
- Serialized Form
|
Field Summary |
protected java.awt.Dimension |
size
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
size
protected java.awt.Dimension size
AbstractViewer
public AbstractViewer(java.awt.Component viewerComponent,
AbstractDrawer drawer,
AbstractPicker picker,
AbstractBounder bounder)
getSize
public java.awt.Dimension getSize()
getSize
public java.awt.Dimension getSize(java.awt.Dimension target)
setSize
public void setSize(java.awt.Dimension size)
setFont
public void setFont(java.awt.Font aFont)
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange in interface java.beans.PropertyChangeListener
contains
public boolean contains(MoebiusShape shape)
getBounderContext
public AbstractBounder getBounderContext()
setBounderContext
public void setBounderContext(AbstractBounder v)
getPickerContext
public AbstractPicker getPickerContext()
setPickerContext
public void setPickerContext(AbstractPicker v)
getDrawerContext
public AbstractDrawer getDrawerContext()
setDrawerContext
public void setDrawerContext(AbstractDrawer v)
clearShapeSet
public void clearShapeSet()
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)
getSelection
public MoebiusShape getSelection()
getCurrentTool
public MoebiusTool getCurrentTool()
deactivateTool
public void deactivateTool(MoebiusTool aTool)
activateTool
public void activateTool(MoebiusTool aTool)
setAttributes
public void setAttributes(Attributes a)
getAttributes
public Attributes getAttributes()
getMenu
public java.awt.Menu getMenu()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
invalidate
public void invalidate()
repaint
public void repaint()
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()
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()
draw
public void draw(MoebiusGraphics g)
draw
public void draw(java.awt.Graphics G)
pick
public boolean pick(java.awt.event.MouseEvent e)
getBound
public Rectangle getBound()
encompass
public void encompass()
encompass
public void encompass(boolean reset)
encompass
public void encompass(Rectangle aBound)
encompass
public void encompass(Rectangle aBound,
boolean reset)
center
public void center()
invertInUnitCircle
public void invertInUnitCircle()