xmltool.datastructure
Class JoinLines

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

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

JoinLines keeps track of which element or attribute on the frame are being linked together for a AND or OR condition.


Field Summary
 int[][] edgeLink
          Storage for edges
 
Constructor Summary
JoinLines()
           
 
Method Summary
 int getI(int i)
          Get element number of the ith click point
 int getJ(int i)
          Get attribute number of the ith click point
 int getNumLines()
          Get total number of lines drawn so far
 boolean inLine(int a, int b)
          Method to determine if (a,b) is one of the endpoints of the line
 void insert(int a, int b)
          Method to keep track of a new point, once the user has clicked a element/ attribute box.
 void JoinLines()
          Default Constructor
 void reset()
          Delete lines drawn
 void setNumLines(int c)
          Set total number of lines drawn so far
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edgeLink

public int[][] edgeLink
Storage for edges
Constructor Detail

JoinLines

public JoinLines()
Method Detail

JoinLines

public void JoinLines()
Default Constructor

insert

public void insert(int a,
                   int b)
Method to keep track of a new point, once the user has clicked a element/ attribute box. The parameters (a, b) stand for the bth attribute of the ath element if it is an attribute that is clicked, else it is the ath element, with b equal to -1, if it is an element that is clicked.
Parameters:
a - element number
b - attribute number

getI

public int getI(int i)
Get element number of the ith click point
Parameters:
i - point for which element number is needed
Returns:
int The element number

getJ

public int getJ(int i)
Get attribute number of the ith click point
Parameters:
i - point for which attribute number is needed
Returns:
int The attribute number, else -1 if it was an element that was clicked

inLine

public boolean inLine(int a,
                      int b)
Method to determine if (a,b) is one of the endpoints of the line
Parameters:
a - element number for that point
b - attribute number for that point
Returns:
boolean True if (a,b) is one of endpoints, else false

getNumLines

public int getNumLines()
Get total number of lines drawn so far
Returns:
int Number of lines

setNumLines

public void setNumLines(int c)
Set total number of lines drawn so far
Parameters:
int - Number of lines

reset

public void reset()
Delete lines drawn