com.dlsc.flexgantt.swing.layer.system
Class ActivityObjectEditModeController
java.lang.Object
com.dlsc.flexgantt.swing.layer.system.DefaultEditModeController
com.dlsc.flexgantt.swing.layer.system.ActivityObjectEditModeController
- All Implemented Interfaces:
- IEditModeController
public class ActivityObjectEditModeController
- extends DefaultEditModeController
A specialized edit mode controller for use with timeline objects of type
IActivityObject
. This kind of timeline object supports an attribute
called 'percentage complete'. The activity object edit mode controller
triggers an edit mode of type CHANGE_PERCENTAGE_COMPLETE when the mouse
hovers over the current percentage complete position while the user holds
down the SHIFT key.
- Since:
- 1.0
- Author:
- Dirk Lemmermann
- See Also:
DefaultActivityObject
,
IEditActivityObjectPolicy.isPercentageChangeable(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 |
ActivityObjectEditModeController
public ActivityObjectEditModeController()
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
isChangePercentageLocation
protected boolean isChangePercentageLocation(ObjectBounds bounds,
java.awt.event.MouseEvent evt)
- Returns TRUE if the given location is valid for changing the percentage
complete value 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