com.dlsc.flexgantt.policy.layer
Interface IEditCapacityObjectPolicy

All Superinterfaces:
IPolicy
All Known Implementing Classes:
DefaultEditCapacityObjectPolicy

public interface IEditCapacityObjectPolicy
extends IPolicy

A policy that is used for making decisions regarding the editing behaviour of capacity objects. Capacity objects (ICapacityObject) extend the standard timeline objects (ITimelineObject) with an additional parameter called capacity used.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
ICapacityObject, DefaultCapacityObject

Method Summary
 ICommand getChangeCapacityCommand(java.lang.Object node, java.lang.Object capacityObject, IGanttChartModel model, double newCapacityUsed)
          Returns a command object that will perform the actual change of the capacity used value.
 boolean isCapacityChangeable(java.lang.Object node, java.lang.Object capacityObject, IGanttChartModel model)
          Decides whether or not the capacity used value of the object can be changed.
 

Method Detail

isCapacityChangeable

boolean isCapacityChangeable(java.lang.Object node,
                             java.lang.Object capacityObject,
                             IGanttChartModel model)
Decides whether or not the capacity used value of the object can be changed.

Parameters:
node - the tree node that owns the capacity object
capacityObject - the capacity object that gets checked for its editing ability
model - the data source of the tree node and the capacity object
Returns:
TRUE if the capacity can be edited
Since:
1.0

getChangeCapacityCommand

ICommand getChangeCapacityCommand(java.lang.Object node,
                                  java.lang.Object capacityObject,
                                  IGanttChartModel model,
                                  double newCapacityUsed)
Returns a command object that will perform the actual change of the capacity used value.

Parameters:
node - the tree node that owns the capacity object
capacityObject - the capacity object that gets checked for its editing ability
model - the data source of the tree node and the capacity object
newCapacityUsed -
Returns:
the command object that will change the capacity used value
Since:
1.0