com.dlsc.flexgantt.policy.layer

## Class DefaultEditCapacityObjectPolicy

- java.lang.Object
- - com.dlsc.flexgantt.policy.AbstractPolicy
  - - com.dlsc.flexgantt.policy.layer.DefaultEditCapacityObjectPolicy

- All Implemented Interfaces:
    IPolicy, IEditCapacityObjectPolicy

      public class DefaultEditCapacityObjectPolicy
      extends AbstractPolicy
      implements IEditCapacityObjectPolicy

  The default implmementation of the edit policy for capacity objects. For a general description of this policy please refer to the policy interface `IEditCapacityObjectPolicy`.
  Since:
    1.0
  Version:
    $Revision: 1.7 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEditCapacityObjectPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ICommand` | `getChangeCapacityCommand(TimelineObjectPath path, IGanttChartModel model, double newPercentage)` Returns a command object that will perform the actual change of the capacity used value.
    `boolean` | `isCapacityChangeable(TimelineObjectPath path, IGanttChartModel model)` Decides whether or not the capacity used value of the object can be changed.

    - ### Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy

      `assertClass`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultEditCapacityObjectPolicy

          public DefaultEditCapacityObjectPolicy()

  - ### Method Detail

    - #### isCapacityChangeable

          public boolean isCapacityChangeable(TimelineObjectPath path,
                                              IGanttChartModel model)

      Description copied from interface: `IEditCapacityObjectPolicy`
      Decides whether or not the capacity used value of the object can be changed.
      Specified by:
        `isCapacityChangeable` in interface `IEditCapacityObjectPolicy`
      Parameters:
        `path` - the path to 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

    - #### getChangeCapacityCommand

          public ICommand getChangeCapacityCommand(TimelineObjectPath path,
                                                   IGanttChartModel model,
                                                   double newPercentage)

      Description copied from interface: `IEditCapacityObjectPolicy`
      Returns a command object that will perform the actual change of the capacity used value.
      Specified by:
        `getChangeCapacityCommand` in interface `IEditCapacityObjectPolicy`
      Parameters:
        `path` - the path to the capacity object that gets checked for its editing ability
        `model` - the data source of the tree node and the capacity object
      Returns:
        the command object that will change the capacity used value

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.