easik.sketch.constraint
Class SumConstraint

java.lang.Object
  extended by easik.sketch.vertex.SketchVertex
      extended by easik.sketch.constraint.Constraint
          extended by easik.sketch.constraint.SumConstraint

public class SumConstraint
extends Constraint

This class represents the sum colimit constraint. It contains a list of paths sharing a target.

Version:
2006-07-13 Vera Ranieri
Author:
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
SumConstraint(java.util.ArrayList<SketchPath> inPaths)
          Default Constructor takes an ArrayList of SketchPaths
SumConstraint(java.util.ArrayList<SketchPath> inPaths, int x, int y, boolean isVisible)
          Constructor for specifying position on graph
 
Method Summary
static boolean isSumConstraint(java.util.ArrayList paths)
          Static method to determine whether a set of paths could theoretically designate a sum 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

SumConstraint

public SumConstraint(java.util.ArrayList<SketchPath> inPaths)
Default Constructor takes an ArrayList of SketchPaths

Parameters:
inPaths - An ArrayList of SketchPaths

SumConstraint

public SumConstraint(java.util.ArrayList<SketchPath> inPaths,
                     int x,
                     int y,
                     boolean isVisible)
Constructor for specifying position on graph

Parameters:
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

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

isSumConstraint

public static boolean isSumConstraint(java.util.ArrayList paths)
Static method to determine whether a set of paths could theoretically designate a sum constraint.

Parameters:
paths - The paths to check for a sum constraint formation.
Returns:
True if forms a sum constraint, false otherwise.
Since:
2006-05-29 Vera Ranieri