com.dlsc.flexgantt.swing.layer.system

## Class CapacityObjectEditModeController

- java.lang.Object
- - com.dlsc.flexgantt.swing.layer.system.DefaultEditModeController
  - - com.dlsc.flexgantt.swing.layer.system.CapacityObjectEditModeController

- All Implemented Interfaces:
    IEditModeController

      public class CapacityObjectEditModeController
      extends DefaultEditModeController

  A specialized edit mode controller for use with timeline objects of type `ICapacityObject`. This kind of timeline object supports an attribute called 'capacity'. The capacity object edit mode controller triggers an edit mode of type CHANGE_CAPACITY when the mouse hovers over the capacity change position while the user holds down the SHIFT key. The capcity change position is the top edge of the capacity object.
  Since:
    1.0
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann
  See Also:
    `DefaultCapacityObject`, `IEditCapacityObjectPolicy.isCapacityChangeable(com.dlsc.flexgantt.model.gantt.TimelineObjectPath, IGanttChartModel)`, `DragLayer.setEditModeController(Class, IEditModeController)`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.dlsc.flexgantt.swing.layer.system.IEditModeController

      `IEditModeController.EditMode`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CapacityObjectEditModeController()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IEditModeController.EditMode` | `getEditMode(DragLayer layer, ObjectBounds bounds, MouseEvent evt)` Returns an edit mode based on the given bounds and mouse event.
    `protected boolean` | `isChangeCapacityLocation(ObjectBounds bounds, MouseEvent evt)` Returns TRUE if the given location is valid for changing the capacity of the timeline object.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.layer.system.DefaultEditModeController

      `isChangeEndTimeLocation, isChangeStartTimeLocation, isDragLocation, isUsingDragOverrideModifiers`

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

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

- - ### Constructor Detail

    - #### CapacityObjectEditModeController

          public CapacityObjectEditModeController()

  - ### Method Detail

    - #### getEditMode

          public IEditModeController.EditMode getEditMode(DragLayer layer,
                                                          ObjectBounds bounds,
                                                          MouseEvent evt)

      Description copied from interface: `IEditModeController`
      Returns an edit mode based on the given bounds and mouse event. The method can evaluate the location and the modifiers of the event in order to determine what kind of editing operation will be supported.
      Specified by:
        `getEditMode` in interface `IEditModeController`
      Overrides:
        `getEditMode` in class `DefaultEditModeController`
      Parameters:
        `layer` - the drag layer requesting the edit mode
        `bounds` - the object bounds over which the mouse cursor currently hovers
        `evt` - the mouse event that triggered the request
      Returns:
        the edit mode that is appropriate for the given location and key modifiers

    - #### isChangeCapacityLocation

          protected boolean isChangeCapacityLocation(ObjectBounds bounds,
                                                     MouseEvent evt)

      Returns TRUE if the given location is valid for changing the capacity of the timeline object.
      Parameters:
        `bounds` - the object bounds to check
        `evt` - the mouse event causing the location check
      Returns:
        TRUE if the specified location is valid for changing the percentage complete value of the timeline object
      Since:
        1.0

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