se.liu.ida.critiquer.constraints
Class VisualConstraints

java.lang.Object
  extended by se.liu.ida.critiquer.constraints.VisualConstraints

public class VisualConstraints
extends Object

A map of visual constraints, with flags indicating if they are active or not

We actually only care about the ViewRenderingListener constraints here, the other ones can do their job without knowing about the view rendering


Constructor Summary
VisualConstraints()
           
 
Method Summary
static void addConstraint(VisualConstraint c)
           
static List<VisualConstraint> getActiveConstraints()
          Get a list of the constraints that are currently displaying visual information.
static VisualConstraint getConstraintByClass(Class c)
          Retrieve a singleton constraint given its class
static void removeConstraint(VisualConstraint c)
           
static void setConstraintEnabled(Class constraintClass, boolean enabled)
          Toggles constraints on and off, though they are still active in the sense that they are updated with information from the activities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisualConstraints

public VisualConstraints()
Method Detail

setConstraintEnabled

public static void setConstraintEnabled(Class constraintClass,
                                        boolean enabled)
Toggles constraints on and off, though they are still active in the sense that they are updated with information from the activities


getConstraintByClass

public static VisualConstraint getConstraintByClass(Class c)
Retrieve a singleton constraint given its class

Parameters:
c - the class of the constraint
Returns:
the singleton constraint

addConstraint

public static void addConstraint(VisualConstraint c)

removeConstraint

public static void removeConstraint(VisualConstraint c)

getActiveConstraints

public static List<VisualConstraint> getActiveConstraints()
Get a list of the constraints that are currently displaying visual information.

Returns:
a list of active constraints