Class ProductConstraint

  extended by easik.sketch.vertex.SketchVertex
      extended by easik.sketch.constraint.Constraint
          extended by easik.sketch.constraint.ProductConstraint

public class ProductConstraint
extends Constraint

Represents the product constraint. Contains a list of paths which all share a source.

2006-05-25 Vera Ranieri
Kevin Green 2006, Vera Ranieri 2006

Field Summary
Fields inherited from class easik.sketch.constraint.Constraint
_constraintLabel, _constraintNode, _edges, _isVisible, _paths, _visuals
Fields inherited from class easik.sketch.vertex.SketchVertex
_marked, _name, _posX, _posY
Constructor Summary
ProductConstraint(java.util.ArrayList<SketchPath> inPaths)
          Product constraint constructor.
ProductConstraint(java.util.ArrayList<SketchPath> inPaths, int x, int y, boolean isVisible)
          Product constraint constructor.
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 easik.sketch.vertex.SketchVertex
getMarked, getName, getX, getY, setMarked, setName, setX, setY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public ProductConstraint(java.util.ArrayList<SketchPath> inPaths)
Product constraint constructor. Accepts an ArrayList that can have any number of paths. Gives default coordinates.

inPaths - An ArrayList of SketchPaths


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.

inPaths - An ArrayList of SketchPaths
x - X coordinate of visual on graph
y - Y coordinate of visual on graph
isVisible - If the constraint is visible in the graph or not
Method Detail


public void setPaths(java.util.ArrayList<SketchPath> inPaths)
Sets the path array, updates edge list, and updates display

inPaths - The new array of paths


public static boolean isProductConstraint(java.util.ArrayList paths)
Method to determine whether a given set of paths could legally create a product constraint.

paths - The paths potentially involved in a product constraint
True if a legal path configuration, false otherwise
2006-05-25 Vera Ranieri