com.dlsc.flexgantt.swing.layer.system
Interface IEditModeController
- All Known Implementing Classes:
- ActivityObjectEditModeController, CapacityObjectEditModeController, DefaultEditModeController
public interface IEditModeController
Edit mode controllers are used to fine-tune the editing behaviour of timeline
objects. The controller determines what kind of editing operation can be
performed on a timeline object based on a mouse move event. The possible
editing operations are listed in the enumerator class IEditModeController.EditMode
. The
drag layer retrieves the correct controller based on the object type of the
timeline object over which the mouse cursor hovers. Once retrieved the mouse
event is sent to the controller, which then needs to reply with one of the
values of IEditModeController.EditMode
. The controller can not only use the location of
the mouse event but also the modifiers. This way some editing modes can be
more protected when they can only be reached with certain modifiers active.
- Since:
- 1.0
- Author:
- Dirk Lemmermann
- See Also:
DragLayer.setEditModeController(Class, IEditModeController)
getEditMode
IEditModeController.EditMode getEditMode(DragLayer layer,
ObjectBounds bounds,
java.awt.event.MouseEvent evt)
- 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.
- 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
- Since:
- 1.0