fdda.dialog.java2d
Class AbstractManipulator

java.lang.Object
  |
  +--fdda.dialog.java2d.AbstractManipulator
All Implemented Interfaces:
Manipulator
Direct Known Subclasses:
Deleter, LineCreator, Mover, NodeCreator, PointCreator, Selector

public abstract class AbstractManipulator
extends Object
implements Manipulator

Abstract superclass of all manipulators.

Author:
Jörg Rüdenauer

Field Summary
protected  GraphicHolder graphicHolder
          the graphics holder
protected  Painter painter
          the painter used for redrawing the components
 
Constructor Summary
AbstractManipulator(GraphicHolder graphicHolder)
          Constructor
 
Method Summary
 GraphicHolder getGraphicHolder()
          Returns the graphics holder
protected  double moveToGrid(double u, boolean isX)
          Changes a coordinate so that it lies on the grid
 void setGraphicHolder(GraphicHolder graphicHolder)
          Sets the object holding the graphics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fdda.dialog.java2d.Manipulator
execute, finish, start, start
 

Field Detail

graphicHolder

protected GraphicHolder graphicHolder
the graphics holder


painter

protected Painter painter
the painter used for redrawing the components

Constructor Detail

AbstractManipulator

public AbstractManipulator(GraphicHolder graphicHolder)
Constructor

Parameters:
graphicHolder - the object holding the graphics
Method Detail

getGraphicHolder

public GraphicHolder getGraphicHolder()
Description copied from interface: Manipulator
Returns the graphics holder

Specified by:
getGraphicHolder in interface Manipulator
Returns:
the graphics holder

setGraphicHolder

public void setGraphicHolder(GraphicHolder graphicHolder)
Description copied from interface: Manipulator
Sets the object holding the graphics

Specified by:
setGraphicHolder in interface Manipulator
Parameters:
graphicHolder - the graphics holder

moveToGrid

protected final double moveToGrid(double u,
                                  boolean isX)
Changes a coordinate so that it lies on the grid

Parameters:
u - the old coordinate
isX - whether the coordinate is an x coordinate (else it's y)
Returns:
the new coordinate on the grid


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.