xmltool.datastructure
Class LinePoints

java.lang.Object
  |
  +--xmltool.datastructure.LinePoints

public class LinePoints
extends java.lang.Object
implements java.lang.Cloneable

LinePoints keeps track of the lines to be drawn for each link (AND or OR) condition.


Field Summary
 java.awt.geom.Line2D.Float[] linePointsArray
           
 
Constructor Summary
LinePoints()
           
 
Method Summary
 boolean contains(double x, double y)
          Verify if the point (x,y) where the mouse is clicked is on or nearby this link
 int getNumLinePoints()
          Get the number of lines drawn in this link
 double getX1(int i)
          Get the start x coordinate of the ith line drawn in that link
 double getX2(int i)
          Get the end x coordinate of the ith line drawn in that link
 double getY1(int i)
          Get the start y coordinate of the ith line drawn in that link
 double getY2(int i)
          Get the end y coordinate of the ith line drawn in that link
 void insert(float x1, float y1, float x2, float y2)
          Add a line to be drawn as part of a join condition
 void LinePoints()
          Default Constructor
 void reset()
          Delete this link
 void setNumLinePoints(int c)
          Set the number of lines drawn in this link
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

linePointsArray

public java.awt.geom.Line2D.Float[] linePointsArray
Constructor Detail

LinePoints

public LinePoints()
Method Detail

LinePoints

public void LinePoints()
Default Constructor

insert

public void insert(float x1,
                   float y1,
                   float x2,
                   float y2)
Add a line to be drawn as part of a join condition
Parameters:
x1 - x coordinate of start point of line
y1 - y coordinate of start point of line
x2 - x coordinate of end point of line
y2 - y coordinate of end point of line

getX1

public double getX1(int i)
Get the start x coordinate of the ith line drawn in that link
Parameters:
i - Line number
Returns:
double x coordinate

getY1

public double getY1(int i)
Get the start y coordinate of the ith line drawn in that link
Parameters:
i - Line number
Returns:
double y coordinate

getX2

public double getX2(int i)
Get the end x coordinate of the ith line drawn in that link
Parameters:
i - Line number
Returns:
double x coordinate

getY2

public double getY2(int i)
Get the end y coordinate of the ith line drawn in that link
Parameters:
i - Line number
Returns:
double y coordinate

getNumLinePoints

public int getNumLinePoints()
Get the number of lines drawn in this link
Returns:
int Number of lines

setNumLinePoints

public void setNumLinePoints(int c)
Set the number of lines drawn in this link
Parameters:
c - Number of lines

contains

public boolean contains(double x,
                        double y)
Verify if the point (x,y) where the mouse is clicked is on or nearby this link
Parameters:
x - x coordinate of point
y - y coordinate of point

reset

public void reset()
Delete this link