CH.ifa.draw.contrib
Class PolygonHandle

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractHandle
      extended by CH.ifa.draw.contrib.PolygonHandle
All Implemented Interfaces:
Handle

public class PolygonHandle
extends AbstractHandle

A handle for a node on the polygon.


Field Summary
 
Fields inherited from class CH.ifa.draw.standard.AbstractHandle
HANDLESIZE
 
Constructor Summary
PolygonHandle(PolygonFigure owner, Locator l, int index)
          Constructs a polygon handle.
 
Method Summary
 void invokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view)
          Tracks the end of the interaction.
 void invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)
          Tracks a step of the interaction.
 java.awt.Point locate()
          Locates the handle on the figure.
 
Methods inherited from class CH.ifa.draw.standard.AbstractHandle
containsPoint, displayBox, draw, invokeEnd, invokeStart, invokeStart, invokeStep, owner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolygonHandle

public PolygonHandle(PolygonFigure owner,
                     Locator l,
                     int index)
Constructs a polygon handle.

Parameters:
owner - the owning polygon figure.
Method Detail

invokeStep

public void invokeStep(int x,
                       int y,
                       int anchorX,
                       int anchorY,
                       DrawingView view)
Description copied from class: AbstractHandle
Tracks a step of the interaction.

Specified by:
invokeStep in interface Handle
Overrides:
invokeStep in class AbstractHandle
Parameters:
x - the current x position
y - the current y position
anchorX - the x position where the interaction started
anchorY - the y position where the interaction started

invokeEnd

public void invokeEnd(int x,
                      int y,
                      int anchorX,
                      int anchorY,
                      DrawingView view)
Description copied from class: AbstractHandle
Tracks the end of the interaction.

Specified by:
invokeEnd in interface Handle
Overrides:
invokeEnd in class AbstractHandle
Parameters:
x - the current x position
y - the current y position
anchorX - the x position where the interaction started
anchorY - the y position where the interaction started

locate

public java.awt.Point locate()
Description copied from class: AbstractHandle
Locates the handle on the figure. The handle is drawn centered around the returned point.

Specified by:
locate in interface Handle
Specified by:
locate in class AbstractHandle