org.openbp.cockpit.modeler.figures.spline
Class ConstrainedControlPointHandle

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractHandle
      extended by org.openbp.cockpit.modeler.figures.spline.ConstrainedControlPointHandle
All Implemented Interfaces:
CH.ifa.draw.framework.Handle

public class ConstrainedControlPointHandle
extends CH.ifa.draw.standard.AbstractHandle

Horizontally or vertically constrained control point handle for a poly line. Used for the start and end points of the spline. Sets the arc factor of the poly lines start or end point. See PolySplineFigure

Author:
Stephan Moritz

Field Summary
 
Fields inherited from class CH.ifa.draw.standard.AbstractHandle
HANDLESIZE
 
Constructor Summary
ConstrainedControlPointHandle(PolySplineConnection owner, int splineIndex, int splineIndex2)
          Constructs a poly line control point handle.
 
Method Summary
 java.awt.Rectangle displayBox()
           
 void draw(java.awt.Graphics g)
           
 void invokeStep(int x, int y, int anchorX, int anchorY, CH.ifa.draw.framework.DrawingView view)
          Sets the factor according to the handle position.
 java.awt.Point locate()
           
protected  java.awt.Point locateWayPoint()
          Locates the way point of the spline we are processing.
 
Methods inherited from class CH.ifa.draw.standard.AbstractHandle
containsPoint, getUndoActivity, invokeEnd, invokeEnd, invokeStart, invokeStart, invokeStep, owner, setUndoActivity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstrainedControlPointHandle

public ConstrainedControlPointHandle(PolySplineConnection owner,
                                     int splineIndex,
                                     int splineIndex2)
Constructs a poly line control point handle.

Parameters:
owner - The owning polyline figure
splineIndex - Spline index of the point this controlpoint belongs to
splineIndex2 - Spline index of a second point that determines the initial distance
Method Detail

invokeStep

public void invokeStep(int x,
                       int y,
                       int anchorX,
                       int anchorY,
                       CH.ifa.draw.framework.DrawingView view)
Sets the factor according to the handle position.

Specified by:
invokeStep in interface CH.ifa.draw.framework.Handle
Overrides:
invokeStep in class CH.ifa.draw.standard.AbstractHandle
Parameters:
x - Document coordinate
y - Document coordinate
anchorX - Document coordinate of the anchor point of the handle
anchorY - Document coordinate of the anchor point of the handle
view - View to draw on

locate

public java.awt.Point locate()
Specified by:
locate in interface CH.ifa.draw.framework.Handle
Specified by:
locate in class CH.ifa.draw.standard.AbstractHandle

locateWayPoint

protected java.awt.Point locateWayPoint()
Locates the way point of the spline we are processing.

Returns:
The position of the waypoint in document coordinates

displayBox

public java.awt.Rectangle displayBox()
Specified by:
displayBox in interface CH.ifa.draw.framework.Handle
Overrides:
displayBox in class CH.ifa.draw.standard.AbstractHandle

draw

public void draw(java.awt.Graphics g)
Specified by:
draw in interface CH.ifa.draw.framework.Handle
Overrides:
draw in class CH.ifa.draw.standard.AbstractHandle


Copyright © 2011. All Rights Reserved.