1 19 package org.openharmonise.workfloweditor.flowchart.shapes; 20 21 import java.awt.*; 22 import java.awt.geom.*; 23 24 31 public class ControlPoint extends AbstractWorkflowShape { 32 33 36 private Rectangle2D.Float m_rect; 37 38 45 public ControlPoint(Point2D.Double control, int nWidth, int nHeight) { 46 super(new Double (control.x).floatValue(), new Double (control.y).floatValue()); 47 48 this.m_rect = new Rectangle2D.Float( new Double (control.x).intValue(), new Double (control.y).intValue(), nWidth, nHeight); 49 50 } 51 52 55 public void drawSelf(Graphics2D g) { 56 57 } 58 59 64 public Point2D.Double getControl() { 65 return new Point2D.Double(this.getX(), this.getY()); 66 } 67 68 75 public boolean contains(double x, double y) { 76 return this.m_rect.contains(x, y); 77 } 78 79 82 public void setX(float x) { 83 super.setX(x); 84 this.m_rect.x=x; 85 } 86 87 90 public void setY(float y) { 91 super.setY(y); 92 this.m_rect.y=y; 93 } 94 95 } 96 | Popular Tags |