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
  Version:
    $Revision: 1.7 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEditActivityObjectPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ICommand` | `getChangePercentageCommand(TimelineObjectPath path, IGanttChartModel model, double percentage)` Returns a command object that will perform the actual change of the percentage complete value.
    `boolean` | `isPercentageChangeable(TimelineObjectPath path, IGanttChartModel model)` Decides whether or not the percentage complete value of the given activity object can be edited.

    - ### 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

    - #### DefaultEditActivityObjectPolicy

          public DefaultEditActivityObjectPolicy()

  - ### Method Detail

    - #### isPercentageChangeable

          public boolean isPercentageChangeable(TimelineObjectPath path,
                                                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:
        `path` - the path to the activity object that gets checked for its editing ability
        `model` - 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(TimelineObjectPath path,
                                                     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:
        `path` - the path to the activity object that gets checked for its editing ability
        `model` - the data source of the tree node and the activity object
      Returns:
        the command that will change the percentage complete value

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