public interface IGanttEventListener
GanttChart.addGanttEventListener(IGanttEventListener)
to listen to events that happen in the chart.Modifier and Type | Method and Description |
---|---|
void |
eventDoubleClicked(GanttEvent event,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when an event is doubleclicked.
|
void |
eventHeaderSelected(java.util.Calendar newlySelectedDate,
java.util.List allSelectedDates)
Fires when a header section becomes selected (days in the header are clicked etc).
|
void |
eventMovedToNewSection(GanttEvent event,
GanttSection oldSection,
GanttSection newSection)
This is called when an event is moved (vertical DND) from one section to another.
|
void |
eventPropertiesSelected(java.util.List events)
Fires when the "properties" menu item is selected on an event (assuming it's visible).
|
void |
eventReordered(GanttEvent event)
This is called when an event was reordered vertically in the chart (via DND).
|
void |
eventsDeleteRequest(java.util.List events,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when the built-in delete action is run on an event.
|
void |
eventsDroppedOrResizedOntoUnallowedDateRange(java.util.List events,
GanttSpecialDateRange range)
This is called when one or more events were either dropped or resized over a
GanttSpecialDateRange which does not allow events on its dates. |
void |
eventSelected(GanttEvent event,
java.util.List allSelectedEvents,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when an event is selected.
|
void |
eventsMoved(java.util.List events,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when one or more events were moved.
|
void |
eventsMoveFinished(java.util.List events,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when a move has finished (the mouse button is let go).
|
void |
eventsResized(java.util.List events,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when one or more events were resized.
|
void |
eventsResizeFinished(java.util.List events,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when a resize has finished (the mouse button is let go).
|
void |
lastDraw(org.eclipse.swt.graphics.GC gc)
This method will be called when the chart has finished drawing.
|
void |
phaseMoved(GanttPhase phase,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when a GanttPhase was moved.
|
void |
phaseMoveFinished(GanttPhase phase,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when a move has finished on a GanttPhase (the mouse button is let go).
|
void |
phaseResized(GanttPhase phase,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when a GanttPhase was resized.
|
void |
phaseResizeFinished(GanttPhase phase,
org.eclipse.swt.events.MouseEvent mouseEvent)
Fires when a resize has finished on a GanttPhase (the mouse button is let go).
|
void |
zoomedIn(int newZoomLevel)
Fires when user zoomed in.
|
void |
zoomedOut(int newZoomLevel)
Fires when user zoomed out.
|
void |
zoomReset()
Fires when the zoom level has been reset.
|
void eventsMoved(java.util.List events, org.eclipse.swt.events.MouseEvent mouseEvent)
events
- List of modified events (post modification)mouseEvent
- MouseEventvoid eventsResized(java.util.List events, org.eclipse.swt.events.MouseEvent mouseEvent)
events
- List of modified events (post modification)mouseEvent
- MouseEventvoid eventsMoveFinished(java.util.List events, org.eclipse.swt.events.MouseEvent mouseEvent)
events
- List of modified events (post modification)mouseEvent
- MouseEventvoid eventsResizeFinished(java.util.List events, org.eclipse.swt.events.MouseEvent mouseEvent)
events
- List of modified events (post modification)mouseEvent
- MouseEventvoid phaseMoved(GanttPhase phase, org.eclipse.swt.events.MouseEvent mouseEvent)
phase
- GanttPhase that was movedmouseEvent
- MouseEventvoid phaseResized(GanttPhase phase, org.eclipse.swt.events.MouseEvent mouseEvent)
phase
- GanttPhase that movedmouseEvent
- MouseEventvoid phaseMoveFinished(GanttPhase phase, org.eclipse.swt.events.MouseEvent mouseEvent)
phase
- GanttPhase that was movedmouseEvent
- MouseEventvoid phaseResizeFinished(GanttPhase phase, org.eclipse.swt.events.MouseEvent mouseEvent)
phase
- GanttPhase that was resizedmouseEvent
- MouseEventvoid eventSelected(GanttEvent event, java.util.List allSelectedEvents, org.eclipse.swt.events.MouseEvent mouseEvent)
event
- Event that got selected.allSelectedEvents
- All currently selected events.mouseEvent
- MouseEventvoid eventsDeleteRequest(java.util.List events, org.eclipse.swt.events.MouseEvent mouseEvent)
events
- Events requested to be deletedmouseEvent
- MouseEventvoid eventDoubleClicked(GanttEvent event, org.eclipse.swt.events.MouseEvent mouseEvent)
event
- Event double clicked.mouseEvent
- MouseEventvoid zoomedIn(int newZoomLevel)
newZoomLevel
- The new zoom level.void zoomedOut(int newZoomLevel)
newZoomLevel
- The new zoom level.void zoomReset()
void eventPropertiesSelected(java.util.List events)
events
- Events to show properties on.void eventHeaderSelected(java.util.Calendar newlySelectedDate, java.util.List allSelectedDates)
newlySelectedDate
- The date that was just clickedallSelectedDates
- All dates that were selected previously including the currently added onevoid lastDraw(org.eclipse.swt.graphics.GC gc)
gc
- GC graphics objectvoid eventMovedToNewSection(GanttEvent event, GanttSection oldSection, GanttSection newSection)
event
- Event that was movedoldSection
- Section it used to belong tonewSection
- Section it belongs to nowvoid eventReordered(GanttEvent event)
event
- Event that was reorderedvoid eventsDroppedOrResizedOntoUnallowedDateRange(java.util.List events, GanttSpecialDateRange range)
GanttSpecialDateRange
which does not allow events on its dates.
Please note you should not try to undo any event resizing or moving when you are notified as this will take place automatically. Undo will also not contain
the events that "crossed the bounds", only events that did not "cross" will be in the undo/redo event generated by the resize or DND.events
- List of events that were not allowedrange
- GanttSpecialDateRange
on which events were dropped