fdda.dialog.java2d
Class PointCreator

java.lang.Object
  |
  +--fdda.dialog.java2d.AbstractManipulator
        |
        +--fdda.dialog.java2d.PointCreator
All Implemented Interfaces:
Manipulator, SelectionModifier

public class PointCreator
extends AbstractManipulator
implements SelectionModifier

Creates a point on a line. Starting component must be a line.

Author:
Jörg Rüdenauer

Field Summary
 
Fields inherited from class fdda.dialog.java2d.AbstractManipulator
graphicHolder, painter
 
Constructor Summary
PointCreator(GraphicHolder graphicHolder)
          Constructor
 
Method Summary
 void execute(double x, double y)
          Executes the action.
 void finish(double x, double y)
          Adds the point at the specified place.
 void start(Component component)
          Starts the action, using the specified component
 void start(double x, double y)
          Starts the action.
 
Methods inherited from class fdda.dialog.java2d.AbstractManipulator
getGraphicHolder, moveToGrid, setGraphicHolder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointCreator

public PointCreator(GraphicHolder graphicHolder)
Constructor

Parameters:
graphicHolder - the graphic holder
Method Detail

start

public void start(Component component)
           throws NoSuitableComponentException
Description copied from interface: Manipulator
Starts the action, using the specified component

Specified by:
start in interface Manipulator
Parameters:
component - the component
Throws:
NoSuitableComponentException - if the component can't be used for the action of the manipulator

start

public void start(double x,
                  double y)
           throws NoSuitableComponentException
Description copied from interface: Manipulator
Starts the action. The component is specified by its coordinates.

Specified by:
start in interface Manipulator
Parameters:
x - the x coordinate
y - the y coordinate
Throws:
NoSuitableComponentException - if no component that could be used for the action of the manipulator is at that point

execute

public void execute(double x,
                    double y)
Description copied from interface: Manipulator
Executes the action.

Specified by:
execute in interface Manipulator
Parameters:
x - the new x coordinate (may not be important)
y - the new y coordinate (may not be important)

finish

public void finish(double x,
                   double y)
            throws NoSuitableComponentException
Adds the point at the specified place. If the line doesn't go through that place, the point is added anyway and the line will be changed.

Specified by:
finish in interface Manipulator
Parameters:
x - the new x coordinate (may not be important)
y - the new y coordinate (may not be important)
Throws:
NoSuitableComponentException - if no suitable component was selected first by calling start
See Also:
Manipulator.finish(double, double)


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