Back to index

moin  1.9.0~rc2
PolyLineHandle.java
Go to the documentation of this file.
00001 /*
00002  * @(#)PolyLineHandle.java 5.1
00003  *
00004  */
00005 
00006 package CH.ifa.draw.figures;
00007 
00008 import java.awt.*;
00009 import CH.ifa.draw.framework.*;
00010 import CH.ifa.draw.standard.LocatorHandle;
00011 
00015 public class PolyLineHandle extends LocatorHandle {
00016 
00017     private int fIndex;
00018     private Point fAnchor;
00019 
00026     public PolyLineHandle(PolyLineFigure owner, Locator l, int index) {
00027         super(owner, l);
00028         fIndex = index;
00029     }
00030 
00031     public void invokeStart(int  x, int  y, DrawingView view) {
00032         fAnchor = new Point(x, y);
00033     }
00034 
00035     public void invokeStep (int x, int y, int anchorX, int anchorY, DrawingView view) {
00036         myOwner().setPointAt(new Point(x, y), fIndex);
00037     }
00038 
00039     private PolyLineFigure myOwner() {
00040         return (PolyLineFigure)owner();
00041     }
00042 }
00043 
00044