easik.sketch.constraint
Class ProductConstraint
java.lang.Object
easik.sketch.vertex.SketchVertex
easik.sketch.constraint.Constraint
easik.sketch.constraint.ProductConstraint
public class ProductConstraint
- extends Constraint
Represents the product constraint. Contains a list of paths
which all share a source.
- Version:
- 2006-05-25 Vera Ranieri
- Author:
- Kevin Green 2006, Vera Ranieri 2006
Method Summary |
static boolean |
isProductConstraint(java.util.ArrayList paths)
Method to determine whether a given set of paths could legally create a product constraint. |
void |
setPaths(java.util.ArrayList<SketchPath> inPaths)
Sets the path array, updates edge list, and updates display |
Methods inherited from class easik.sketch.constraint.Constraint |
addEdges, addVisualsToSketch, getEdges, getNode, getPaths, getTablesInvolvedForError, getType, hasEdge, isDomainOrCoDomain, isVisible, setAllConstraintsVisible, setNode, setVisible, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ProductConstraint
public ProductConstraint(java.util.ArrayList<SketchPath> inPaths)
- Product constraint constructor. Accepts an ArrayList
that can have any number of paths. Gives default coordinates.
- Parameters:
inPaths
- An ArrayList of SketchPaths
ProductConstraint
public ProductConstraint(java.util.ArrayList<SketchPath> inPaths,
int x,
int y,
boolean isVisible)
- Product constraint constructor. Accepts coordinates in constructor
to allow for user-defined visual placement.
- Parameters:
inPaths
- An ArrayList of SketchPathsx
- X coordinate of visual on graphy
- Y coordinate of visual on graphisVisible
- If the constraint is visible in the graph or not
setPaths
public void setPaths(java.util.ArrayList<SketchPath> inPaths)
- Sets the path array, updates edge list, and updates display
- Parameters:
inPaths
- The new array of paths
isProductConstraint
public static boolean isProductConstraint(java.util.ArrayList paths)
- Method to determine whether a given set of paths could legally create a product constraint.
- Parameters:
paths
- The paths potentially involved in a product constraint
- Returns:
- True if a legal path configuration, false otherwise
- Since:
- 2006-05-25 Vera Ranieri