fdda.dialog.java2d
Interface Manipulator

All Known Implementing Classes:
AbstractManipulator

public interface Manipulator

Interface for the manipulators that use and change graphical components. Command pattern is used here. Usually, a manipulators methods are called in the order start, execute, finish, though in rare cases execute may be skipped. These messages can take coordinates, probably the current mouse pointer position (e.g. while dragging).

Author:
Jörg Rüdenauer

Method Summary
 void execute(double x, double y)
          Executes the action.
 void finish(double x, double y)
          Finishes the action, making the changes permanent.
 GraphicHolder getGraphicHolder()
          Returns the graphics holder
 void setGraphicHolder(GraphicHolder graphicHolder)
          Sets the object holding the graphics
 void start(Component component)
          Starts the action, using the specified component
 void start(double x, double y)
          Starts the action.
 

Method Detail

start

public void start(Component component)
           throws NoSuitableComponentException
Starts the action, using the specified component

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
Starts the action. The component is specified by its coordinates.

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)
             throws NoSuitableComponentException
Executes the action.

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

finish

public void finish(double x,
                   double y)
            throws NoSuitableComponentException
Finishes the action, making the changes permanent.

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

setGraphicHolder

public void setGraphicHolder(GraphicHolder graphicHolder)
Sets the object holding the graphics

Parameters:
graphicHolder - the graphics holder

getGraphicHolder

public GraphicHolder getGraphicHolder()
Returns the graphics holder

Returns:
the graphics holder


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