com.dlsc.flexgantt.policy.layer
Class DefaultEditActivityObjectPolicy
java.lang.Object
com.dlsc.flexgantt.policy.AbstractPolicy
com.dlsc.flexgantt.policy.layer.DefaultEditActivityObjectPolicy
- All Implemented Interfaces:
- IPolicy, IEditActivityObjectPolicy
public class DefaultEditActivityObjectPolicy
- extends AbstractPolicy
- implements IEditActivityObjectPolicy
The default implmementation of edit policy for activity objects. For a
general description of this policy please refer to the policy interface
IEditActivityObjectPolicy
.
- Since:
- 1.0
- Author:
- Dirk Lemmermann
Method Summary |
ICommand |
getChangePercentageCommand(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model,
double percentage)
Returns a command object that will perform the actual change of the
percentage complete value. |
boolean |
isPercentageChangeable(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model)
Decides whether or not the percentage complete value of the given
activity object can be edited. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultEditActivityObjectPolicy
public DefaultEditActivityObjectPolicy()
isPercentageChangeable
public boolean isPercentageChangeable(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model)
- Description copied from interface:
IEditActivityObjectPolicy
- Decides whether or not the percentage complete value of the given
activity object can be edited.
- Specified by:
isPercentageChangeable
in interface IEditActivityObjectPolicy
- Parameters:
node
- the tree node that owns the capacity objecttimelineObject
- the activity object that gets checked for its editing abilitymodel
- the data source of the tree node and the activity object
- Returns:
- TRUE if the percentage complete value can be edited
getChangePercentageCommand
public ICommand getChangePercentageCommand(java.lang.Object node,
java.lang.Object timelineObject,
IGanttChartModel model,
double percentage)
- Description copied from interface:
IEditActivityObjectPolicy
- Returns a command object that will perform the actual change of the
percentage complete value.
- Specified by:
getChangePercentageCommand
in interface IEditActivityObjectPolicy
- Parameters:
node
- the tree node that owns the capacity objecttimelineObject
- the activity object that gets checked for its editing abilitymodel
- the data source of the tree node and the activity object
- Returns:
- the command that will change the percentage complete
value