se.liu.ida.critiquer.constraints
Class TimeCalculator
java.lang.Object
se.liu.ida.critiquer.activities.AbstractParamChangedListener
se.liu.ida.critiquer.constraints.StandardConstraint
se.liu.ida.critiquer.constraints.TimeCalculator
- All Implemented Interfaces:
- Serializable, Comparable<ActivityUpdateListener>, ActivityUpdateListener, SingletonConstraint, TextCritic, VisualConstraint, ViewRenderingListener
public class TimeCalculator
- extends StandardConstraint
- implements TextCritic
- See Also:
- Serialized Form
Field Summary |
(package private) int |
maxSlack
|
Methods inherited from class se.liu.ida.critiquer.constraints.StandardConstraint |
addStatusListener, debug, error, getApplicableViews, getColor, info, isActive, isApplicableFor, isConsistent, removeStatusListener, setActive, setColor, setConsistent, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxSlack
int maxSlack
TimeCalculator
public TimeCalculator()
paramChanged
public <T> void paramChanged(Activity activity,
Parameter<T> p)
- Description copied from interface:
ActivityUpdateListener
- A parameter has changed value
- Specified by:
paramChanged
in interface ActivityUpdateListener
- Specified by:
paramChanged
in class AbstractParamChangedListener
isAggressive
public boolean isAggressive()
- Returns:
- Returns the aggressive.
setAggressive
public void setAggressive(boolean aggressive)
- Set aggressiveness. If aggressive, the constraint will react on and/or
make sure that there is not more time allocated to the activity than what
the activity calculates that it will take with the current resources.
When not aggressive, it will only react on if there is too little time
allocated.
- Parameters:
aggressive
- The aggressive to set.
getDescription
public String getDescription()
- Specified by:
getDescription
in interface SingletonConstraint
viewUpdated
public void viewUpdated(View v,
Graphics2D g2)
- If our policy is to highlight this instead of forcing a value update, we
use this method.
- Specified by:
viewUpdated
in interface ViewRenderingListener
- See Also:
ViewRenderingListener.viewUpdated(se.liu.ida.critiquer.gui.View,
java.awt.Graphics2D)
initApplicableViews
protected void initApplicableViews()
- This can be viewable in the timeline view
- Overrides:
initApplicableViews
in class StandardConstraint
- See Also:
StandardConstraint.initApplicableViews()
getPolicy
public ConstraintPolicy getPolicy()
- Returns:
- Returns the policy.
setPolicy
public void setPolicy(ConstraintPolicy policy)
- Parameters:
policy
- The policy to set.
getText
public String getText()
- Present information on which activities that I cannot calculate the time
for
- Specified by:
getText
in interface TextCritic
- See Also:
TextCritic.getText()