com.rolemodelsoft.drawlet.shapes.ellipses
Class EllipseTool

java.lang.Object
  |
  +--com.rolemodelsoft.drawlet.basics.AbstractInputEventHandler
        |
        +--com.rolemodelsoft.drawlet.basics.CanvasTool
              |
              +--com.rolemodelsoft.drawlet.basics.ConstructionTool
                    |
                    +--com.rolemodelsoft.drawlet.shapes.ShapeTool
                          |
                          +--com.rolemodelsoft.drawlet.shapes.ellipses.EllipseTool

public class EllipseTool
extends ShapeTool

This tool produces Ellipses.


Fields inherited from class com.rolemodelsoft.drawlet.shapes.ShapeTool
anchorX, anchorY
 
Fields inherited from class com.rolemodelsoft.drawlet.basics.ConstructionTool
figure
 
Fields inherited from class com.rolemodelsoft.drawlet.basics.CanvasTool
canvas
 
Constructor Summary
EllipseTool(DrawingCanvas canvas)
          Constructs and initializes a new instance of a tool to create Ellipses on a DrawingCanvas
 
Method Summary
protected  Figure basicNewFigure(int x, int y)
          Create and answer a new Ellipse at the given coordinates.
 void mouseDragged(java.awt.event.MouseEvent e)
          Called if the mouse is dragged (when the mouse button is down).
 
Methods inherited from class com.rolemodelsoft.drawlet.shapes.ShapeTool
mousePressed, mouseReleased
 
Methods inherited from class com.rolemodelsoft.drawlet.basics.ConstructionTool
newFigure, setProperties
 
Methods inherited from class com.rolemodelsoft.drawlet.basics.CanvasTool
getX, getY
 
Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractInputEventHandler
keyPressed, keyReleased, keyTyped, mouseClicked, mouseDoubleClicked, mouseEntered, mouseExited, mouseMoved, mouseSingleClicked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EllipseTool

public EllipseTool(DrawingCanvas canvas)
Constructs and initializes a new instance of a tool to create Ellipses on a DrawingCanvas
Parameters:
canvas - the canvas on which to place Ellipses.
Method Detail

basicNewFigure

protected Figure basicNewFigure(int x,
                                int y)
Create and answer a new Ellipse at the given coordinates.
Overrides:
basicNewFigure in class ConstructionTool
Parameters:
x - the x coordinate
y - the y coordinate
Returns:
a newly created Ellipse

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Called if the mouse is dragged (when the mouse button is down).
Overrides:
mouseDragged in class ConstructionTool
Parameters:
e - the event