public class SnapToGridActivityListener extends java.lang.Object implements ilog.views.gantt.event.ActivityListener, SimpleMessageBus.MessageHandler
ActivityListener
that decorates and existing
ActivityListener
by altering the IlvTimeInterval
for the
event to ensure that while the activity is moved or resized that it's times
align with the snap to grid interval.
The snap to grid time interval is controlled via the
gantt.view.snap-to-interval-mins property in the skdviewer.properties
The listener will also listen for MSG_SNAP_ENABLED messages on the SimpleMessageBus
and set the grid enabled/disabled state accordingly.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MSG_SNAP_ENABLED
Message to control the snapping behaviour.
|
Constructor and Description |
---|
SnapToGridActivityListener(ilog.views.gantt.event.ActivityListener parent) |
Modifier and Type | Method and Description |
---|---|
void |
activityChanged(ilog.views.gantt.event.ActivityEvent event) |
void |
handleMessage(java.lang.String msgId,
java.lang.Object... args)
handle a Mesage
|
boolean |
isEnabled() |
void |
setEnabled(boolean enabled) |
public static final java.lang.String MSG_SNAP_ENABLED
public SnapToGridActivityListener(ilog.views.gantt.event.ActivityListener parent)
public void activityChanged(ilog.views.gantt.event.ActivityEvent event)
activityChanged
in interface ilog.views.gantt.event.ActivityListener
public void handleMessage(java.lang.String msgId, java.lang.Object... args)
SimpleMessageBus.MessageHandler
handleMessage
in interface SimpleMessageBus.MessageHandler
msgId
- message/event idargs
- message/event parameterspublic boolean isEnabled()
public void setEnabled(boolean enabled)