|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.swing.layer.system.DefaultEditModeController
public class DefaultEditModeController
The default edit mode controller specifies the editing behaviour used for
timeline objects of type DefaultTimelineObject
. The editor lets the
user change the start and end times when the mouse cursor hovers over the
left or right edige of the timeline object. The user can drag and drop the
timeline object when the cursor is placed in its center region.
The controller makes heavy use of the IDragAndDropPolicy
and the
IEditTimelineObjectPolicy
. These policies define, which kind of
editing behaviour is supported by the timeline object.
IDragAndDropPolicy.getDragActions(Object, Object, IGanttChartModel)
,
IEditTimelineObjectPolicy.isStartTimeChangeable(Object, Object,
IGanttChartModel)
,
IEditTimelineObjectPolicy.isDurationChangeable(Object, Object,
IGanttChartModel)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.dlsc.flexgantt.swing.layer.system.IEditModeController |
---|
IEditModeController.EditMode |
Constructor Summary | |
---|---|
DefaultEditModeController()
|
Method Summary | |
---|---|
IEditModeController.EditMode |
getEditMode(DragLayer layer,
ObjectBounds bounds,
java.awt.event.MouseEvent e)
Returns an edit mode based on the given bounds and mouse event. |
protected boolean |
isChangeEndTimeLocation(ObjectBounds bounds,
java.awt.event.MouseEvent evt,
IEditTimelineObjectPolicy editPolicy)
Returns TRUE if the given location is valid for changing the end time of the timeline object. |
protected boolean |
isChangeStartTimeLocation(ObjectBounds bounds,
java.awt.event.MouseEvent evt,
IEditTimelineObjectPolicy editPolicy)
Returns TRUE if the given location is valid for changing the start time of the timeline object. |
protected boolean |
isDragLocation(ObjectBounds bounds,
java.awt.event.MouseEvent evt,
IEditTimelineObjectPolicy editPolicy)
Returns TRUE if the given location is a valid location within the object's bounds for initiating a drag operation. |
protected boolean |
isUsingDragOverrideModifiers(java.awt.event.MouseEvent evt)
Determines whether the modifiers of the mouse event override the standard editing behaviour so that the controller will return EditMode.CHANGE_TIME_SPAN even when the cursor is on the
locations that usually trigger an EditMode.CHANGE_START_TIME
or an EditMode.CHANGE_END_TIME . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultEditModeController()
Method Detail |
---|
public IEditModeController.EditMode getEditMode(DragLayer layer, ObjectBounds bounds, java.awt.event.MouseEvent e)
IEditModeController
getEditMode
in interface IEditModeController
layer
- the drag layer requesting the edit modebounds
- the object bounds over which the mouse cursor currently hoverse
- the mouse event that triggered the request
protected boolean isDragLocation(ObjectBounds bounds, java.awt.event.MouseEvent evt, IEditTimelineObjectPolicy editPolicy)
bounds
- the object bounds to checkevt
- the mouse event causing the location checkeditPolicy
- the timeline object editing policy
protected boolean isChangeEndTimeLocation(ObjectBounds bounds, java.awt.event.MouseEvent evt, IEditTimelineObjectPolicy editPolicy)
bounds
- the object bounds to checkevt
- the mouse event causing the location checkeditPolicy
- the timeline object editing policy
protected boolean isChangeStartTimeLocation(ObjectBounds bounds, java.awt.event.MouseEvent evt, IEditTimelineObjectPolicy editPolicy)
bounds
- the object bounds to checkevt
- the mouse event causing the location checkeditPolicy
- the timeline object editing policy
protected boolean isUsingDragOverrideModifiers(java.awt.event.MouseEvent evt)
EditMode.CHANGE_TIME_SPAN
even when the cursor is on the
locations that usually trigger an EditMode.CHANGE_START_TIME
or an EditMode.CHANGE_END_TIME
. An override can be useful
when the timeline object is too small for all edit modes. The default
implementation of this method returns TRUE when the user is pressing the
ALT key.
evt
- the mouse event to check for override modifiers
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |