com.dlsc.flexgantt.policy.eventline

## Interface IEditEventlineObjectPolicy

- All Superinterfaces:
    IPolicy
  All Known Implementing Classes:
    DefaultEditEventlineObjectPolicy

      public interface IEditEventlineObjectPolicy
      extends IPolicy

  A policy that is used for making various decisions regarding the editing behaviour of eventline objects.
  Since:
    1.0
  Version:
    $Revision: 1.5 $
  Author:
    Dirk Lemmermann

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ICommand` | `getChangeTimeSpanCommand(Object eventlineObject, IEventlineModel model, ITimeSpan span)` Returns a command object that will perform the actual change of the eventline object's time span.
    `ICommand` | `getCreateCommand(IEventlineModel model, ITimeSpan span)` Returns a command object that will perform the actual creating of a new eventline object.
    `ICommand` | `getDeleteCommand(Collection<Object> eventlineObjects, IEventlineModel model)` Returns a command object that will perform the actual deletion of the eventline objects.
    `boolean` | `isCreatable(IEventlineModel model, ITimeSpan span)` Decides whether an eventline object may be created for the given model and with the given time span.
    `boolean` | `isDeletable(Object eventlineObject, IEventlineModel model)` Decides whether the eventline object may be deleted.
    `boolean` | `isDurationChangeable(Object eventlineObject, IEventlineModel model)` Decides whether the duration of an eventline object may be edited / changed.
    `boolean` | `isStartTimeChangeable(Object eventlineObject, IEventlineModel model)` Decides whether the start time of an eventline object may be edited / changed.

- - ### Method Detail

    - #### isStartTimeChangeable

          boolean isStartTimeChangeable(Object eventlineObject,
                                        IEventlineModel model)

      Decides whether the start time of an eventline object may be edited / changed.
      Parameters:
        `eventlineObject` - the eventline object that gets checked for its time span editing ability
        `model` - the data source of the eventline object
      Returns:
        TRUE if the start time of the eventline object may be edited
      Since:
        1.0

    - #### isDurationChangeable

          boolean isDurationChangeable(Object eventlineObject,
                                       IEventlineModel model)

      Decides whether the duration of an eventline object may be edited / changed.
      Parameters:
        `eventlineObject` - the eventline object that gets checked for its time span editing ability
        `model` - the data source of the eventline object
      Returns:
        TRUE if the duration of the eventline object may be edited
      Since:
        1.0

    - #### isDeletable

          boolean isDeletable(Object eventlineObject,
                              IEventlineModel model)

      Decides whether the eventline object may be deleted.
      Parameters:
        `eventlineObject` - the eventline object that gets checked
        `model` - the data source of the eventline object
      Returns:
        TRUE if the eventline object may be deleted
      Since:
        1.0

    - #### isCreatable

          boolean isCreatable(IEventlineModel model,
                              ITimeSpan span)

      Decides whether an eventline object may be created for the given model and with the given time span.
      Parameters:
        `model` - the model to which the newly created object will be added
        `span` - the time span where the event object gets created
      Returns:
        TRUE if the eventline object may be deleted
      Since:
        1.0

    - #### getCreateCommand

          ICommand getCreateCommand(IEventlineModel model,
                                    ITimeSpan span)

      Returns a command object that will perform the actual creating of a new eventline object.
      Parameters:
        `model` - the model to which the new object needs to be added
        `span` - the time span for the new eventline object
      Returns:
        a command that will create a new eventline object
      Since:
        1.0

    - #### getChangeTimeSpanCommand

          ICommand getChangeTimeSpanCommand(Object eventlineObject,
                                            IEventlineModel model,
                                            ITimeSpan span)

      Returns a command object that will perform the actual change of the eventline object's time span.
      Parameters:
        `eventlineObject` - the eventline object that gets checked for its editing ability
        `model` - the data source of the eventline object
        `span` - the new time span for the eventline object
      Returns:
        a command that will modify the eventline object's time span
      Since:
        1.0

    - #### getDeleteCommand

          ICommand getDeleteCommand(Collection<Object> eventlineObjects,
                                    IEventlineModel model)

      Returns a command object that will perform the actual deletion of the eventline objects.
      Parameters:
        `eventlineObjects` - the eventline objects that get deleted
        `model` - the data source of the eventline object
      Returns:
        a command that will delete the eventline object
      Since:
        1.0

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