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
- Author:
- Dirk Lemmermann
- See Also:
DefaultCapacityObject
,
IEditCapacityObjectPolicy.isCapacityChangeable(Object, Object,
IGanttChartModel)
,
DragLayer.setEditModeController(Class, IEditModeController)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CapacityObjectEditModeController
public CapacityObjectEditModeController()
getEditMode
public IEditModeController.EditMode getEditMode(DragLayer layer,
ObjectBounds bounds,
java.awt.event.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 modebounds
- the object bounds over which the mouse cursor currently hoversevt
- 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,
java.awt.event.MouseEvent evt)
- Returns TRUE if the given location is valid for changing the capacity of
the timeline object.
- Parameters:
bounds
- the object bounds to checkevt
- 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