ilog.views.gantt.scale
Class IlvTimeScale

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--ilog.views.gantt.scale.IlvTimeScale
Direct Known Subclasses:
IlvGanttTimeScale

public class IlvTimeScale
extends JComponent
implements IlvTimeScrollable

The IlvTimeScale class is a time scale component that contains several IlvTimeScaleRow objects. Each row represents a particular time unit and is responsible for drawing itself. The rows are not true UI components, but behave like renderers.

IlvTimeScale

To scroll through the scale or to zoom on it when changing the time value and the visible duration, a new IlvTimeConverter object must be set for the scale.

Default actions are provided on this object:

You can disable these actions to provide your own ones through event listeners.


Inner Class Summary
 class IlvTimeScale.PaintContext
          A PaintContext defines the context in which the time scale paints.
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
IlvTimeScale()
          Creates a new IlvTimeScale that initially contains no rows.
 
Method Summary
 void addRow(IlvTimeScaleRow row)
          Appends the specified row to the scale.
 void addTimeScrollListener(TimeScrollListener listener)
          Adds the specified listener to receive time scroll events from this scale.
 void computeCalendar()
          This method is called when changing the locale or the time zone of this scale to compute the new calendar.
 IlvTimeScale.PaintContext createPaintContext(Date start, IlvDuration duration, Rectangle viewport)
          Creates a PaintContext so that the time scale paints the specified time interval into the specified view port.
protected  void fireTimeScrollableValueChanged(boolean adjusting)
          This method is called to fire a time value modification.
protected  void fireTimeScrollableVisibleDurationChanged()
          This method is called to fire a visible duration value modification.
 Calendar getCalendar()
          This method returns a Calendar object.
 Calendar getCalendar(Date time)
          This utility method returns a Calendar object that points to the specified time.
 int getLocation(Date time)
          This method returns the x position corresponding to the specified time.
 Date getMaxVisibleTime()
          Returns the maximum time that the scale can show in bounded scrolling mode.
 Date getMinVisibleTime()
          Returns the minimum time that the scale can show in bounded scrolling mode.
 IlvTimeScale.PaintContext getPaintContext()
          Gets the cached PaintContext used to paint the time scale on screen.
 Dimension getPreferredSize()
          This method overrides the JComponent one to take the preferred height of each row into account.
 IlvTimeScaleRow[] getRow()
          This method returns the entire array of IlvTimeScaleRow objects.
 IlvTimeScaleRow getRow(int index)
          This method returns the IlvTimeScaleRow at a specified index.
 Date getTime(int x)
          This method returns the time that is under the x position in the component.
 IlvTimeConverter getTimeConverter()
          Returns the IlvTimeConverter object of this scale.
 IlvTimeScaleRow getTimeScaleRow(int y)
          This method returns the row under a y position in the component.
 TimeZone getTimeZone()
          This method returns the time zone of this scale.
 IlvDuration getVisibleDuration()
          Returns the duration of the time interval displayed by the scale.
 IlvTimeInterval getVisibleInterval()
          Returns the time interval displayed by the scale.
 Date getVisibleTime()
          Returns the beginning of the time interval displayed by the scale.
 void hideRow(IlvTimeScaleRow row)
          This method hides the specified row.
 boolean isIntegerZoomAllowed()
          Returns the integer zoom mode.
 boolean isOpaqueTranslation()
          Returns the opaque translation mode.
 boolean isTranslationAllowed()
          Returns the translation mode.
 boolean isZoomAllowed()
          Returns the zoom mode.
 void paint(Graphics dst, Rectangle viewport, IlvTimeScale.PaintContext context)
          Paints the time scale to the given Graphics by using an external IlvTimeScale.PaintContext.
protected  void paintComponent(Graphics dst)
          Paints the time scale by calling the paintRows method.
protected  void paintRows(Graphics dst)
          Paints the time scale rows by calling the paint(Graphics, Rectangle, PaintContext) method.
 void paintSeparator(Graphics dst, int x, int y, int width)
          This method draws the separation between two rows.
 void removeRow(IlvTimeScaleRow row)
          This method removes a row from the IlvTimeScale object.
 void removeTimeScrollListener(TimeScrollListener listener)
          Removes the specified listener so that it will no longer receive time scroll events from this scale.
 void setIntegerZoomAllowed(boolean value)
          Changes the integer zoom mode.
 void setLocale(Locale locale)
          This method overrides the Component method to compute the new Calendar object attached to this scale.
 void setMaxVisibleTime(Date max)
          Sets the maximum time that the scale can show in bounded scrolling mode.
 void setMinVisibleTime(Date min)
          Sets the minimum time that the scale can show in bounded scrolling mode.
 void setOpaqueTranslation(boolean value)
          Changes the opaque translation mode.
 void setRow(IlvTimeScaleRow[] row)
          This method replaces the existing IlvTimeScaleRow objects by those passed in the row argument.
 void setRow(int index, IlvTimeScaleRow row)
          This method changes the IlvTimeScaleRow object at a specified index.
 void setTimeConverter(IlvTimeConverter timeConverter)
          This method can be used to change the IlvTimeConverter object of this scale.
 void setTimeZone(TimeZone timezone)
          The time zone set with this method will be used instead of the default time zone.
 void setTranslationAllowed(boolean value)
          Changes the translation mode.
 void setVisibleDuration(IlvDuration duration)
          Sets the duration of the time interval displayed by the scale.
 void setVisibleInterval(Date time, IlvDuration duration)
          Sets the time interval displayed by the scale.
 void setVisibleTime(Date time)
          Sets the beginning of the time interval displayed by the scale.
 void setZoomAllowed(boolean value)
          Changes the zoom mode.
 void showRow(IlvTimeScaleRow row)
          This method shows the specified row.
 void updateUI()
          This method is a notification that the L&F has changed.
protected  void widthChanged(int width)
          This method is invoked when the time scale width has been modified.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvTimeScale

public IlvTimeScale()
Creates a new IlvTimeScale that initially contains no rows. By default, the time scale uses an IlvLinearTimeConverter. The time scale time converter can be set by calling the setTimeConverter method.
Method Detail

getPaintContext

public IlvTimeScale.PaintContext getPaintContext()
Gets the cached PaintContext used to paint the time scale on screen.
Returns:
The cached paint context.
Since:
JViews 5.0

createPaintContext

public IlvTimeScale.PaintContext createPaintContext(Date start,
                                                    IlvDuration duration,
                                                    Rectangle viewport)
Creates a PaintContext so that the time scale paints the specified time interval into the specified view port.
Parameters:
start - The begin of the visible time interval.
duration - The duration of the visible time interval.
viewport - The rectangle defining the position the time scale to paint to.
Returns:
The paint context.
Since:
JViews 5.0

updateUI

public void updateUI()
This method is a notification that the L&F has changed. This method is overridden to initialize the scale default font and color to be the same as a JTableHeader.
Overrides:
updateUI in class JComponent
Since:
JViews 3.5

addRow

public void addRow(IlvTimeScaleRow row)
Appends the specified row to the scale. To see the modification, you must redraw the object.
Parameters:
row - The row to be added.
See Also:
removeRow(ilog.views.gantt.scale.IlvTimeScaleRow)

removeRow

public void removeRow(IlvTimeScaleRow row)
This method removes a row from the IlvTimeScale object. To see the modification, you must redraw the object.
Parameters:
row - The row to be removed.

getRow

public IlvTimeScaleRow getRow(int index)
This method returns the IlvTimeScaleRow at a specified index.
Parameters:
index - The index of the returned row.

setRow

public void setRow(int index,
                   IlvTimeScaleRow row)
This method changes the IlvTimeScaleRow object at a specified index.
Parameters:
index - The index of the changed row.
row - The new IlvTimeScaleRow.

getRow

public IlvTimeScaleRow[] getRow()
This method returns the entire array of IlvTimeScaleRow objects.

setRow

public void setRow(IlvTimeScaleRow[] row)
This method replaces the existing IlvTimeScaleRow objects by those passed in the row argument.
Parameters:
row - The new array of IlvTimeScaleRow.

getTimeScaleRow

public IlvTimeScaleRow getTimeScaleRow(int y)
This method returns the row under a y position in the component.
Parameters:
y - The y position in the component.

getTime

public Date getTime(int x)
This method returns the time that is under the x position in the component.
Parameters:
x - The x position in the component.

getLocation

public int getLocation(Date time)
This method returns the x position corresponding to the specified time.
Parameters:
time - The time.

showRow

public void showRow(IlvTimeScaleRow row)
This method shows the specified row.
Parameters:
row - The row to be shown.

hideRow

public void hideRow(IlvTimeScaleRow row)
This method hides the specified row.
Parameters:
row - The row to be hidden.

paintComponent

protected void paintComponent(Graphics dst)
Paints the time scale by calling the paintRows method. If the width of the scale has changed, the widthChanged method is called first.
Parameters:
dst - The destination graphics.
Overrides:
paintComponent in class JComponent

paintRows

protected void paintRows(Graphics dst)
Paints the time scale rows by calling the paint(Graphics, Rectangle, PaintContext) method. The cached PaintContext is used.
Parameters:
dst - The destination graphics.
Since:
JViews 3.5

paint

public void paint(Graphics dst,
                  Rectangle viewport,
                  IlvTimeScale.PaintContext context)
Paints the time scale to the given Graphics by using an external IlvTimeScale.PaintContext. This method paints each visible IlvTimeScaleRow object of this scale by calling the row's paint method. Separation lines are drawn between each row by calling the paintSeparator method.

This method is usually called by paintRows(). In this case the cached PaintContext is used.

This method can also be called to print the time scale. In this case an external PaintContext must be provided in order to print the portion specified by the programmer.

Parameters:
dst - The destination graphics.
viewport - The viewport. It defines the potion of the time scale to be painted.
context - The paint context.
Since:
JViews 5.0

widthChanged

protected void widthChanged(int width)
This method is invoked when the time scale width has been modified. It calculates the new visible duration displayed by the scale.
Parameters:
width - The width of the time scale, less its horizontal insets.
Since:
JViews 3.5

setIntegerZoomAllowed

public void setIntegerZoomAllowed(boolean value)
Changes the integer zoom mode.
Parameters:
value - If false, the integer zoom will not be performed.

isIntegerZoomAllowed

public boolean isIntegerZoomAllowed()
Returns the integer zoom mode. The default is true.
See Also:
setIntegerZoomAllowed(boolean)

setZoomAllowed

public void setZoomAllowed(boolean value)
Changes the zoom mode.
Parameters:
value - If false, zoom will not be performed.

isZoomAllowed

public boolean isZoomAllowed()
Returns the zoom mode. The default is true.
See Also:
setZoomAllowed(boolean)

setTranslationAllowed

public void setTranslationAllowed(boolean value)
Changes the translation mode.
Parameters:
value - If false, translation will not be performed.

isTranslationAllowed

public boolean isTranslationAllowed()
Returns the translation mode. The default is true.
See Also:
setTranslationAllowed(boolean)

setOpaqueTranslation

public void setOpaqueTranslation(boolean value)
Changes the opaque translation mode.
Parameters:
value - If false, the scale will not be drawn during translation.

isOpaqueTranslation

public boolean isOpaqueTranslation()
Returns the opaque translation mode. The default is true.
See Also:
setOpaqueTranslation(boolean)

getPreferredSize

public Dimension getPreferredSize()
This method overrides the JComponent one to take the preferred height of each row into account.
Overrides:
getPreferredSize in class JComponent

paintSeparator

public void paintSeparator(Graphics dst,
                           int x,
                           int y,
                           int width)
This method draws the separation between two rows.
Parameters:
dst - The destination Graphics.
x - The x coordinate of the separation origin.
y - The y coordinate of the separation origin.
width - The width of the separation.

getTimeConverter

public IlvTimeConverter getTimeConverter()
Returns the IlvTimeConverter object of this scale.

setTimeConverter

public void setTimeConverter(IlvTimeConverter timeConverter)
This method can be used to change the IlvTimeConverter object of this scale. This object allows you to draw the scale correctly by converting time value to units on the screen.
Parameters:
timeConverter - The new IlvTimeConverter object.

getCalendar

public Calendar getCalendar()
This method returns a Calendar object. By default, it returns the result of the method Calendar.getInstance() (default locale and default time zone). If a Locale or a TimeZone has been specified with one of the methods setLocale or setTimeZone, the method constructs the calendar with these values. When deriving the class IlvTimeScaleRow, you should use this method to get a Calendar object to compute or display time values. However, be careful, this method always returns the same Calendar object constructed in computeCalendar. Therefore, you should clone it if you need more than one Calendar objects.
See Also:
setLocale(java.util.Locale), setTimeZone(java.util.TimeZone), computeCalendar(), getCalendar(Date), IlvBasicTimeScaleRow.getDateFormat()

getCalendar

public Calendar getCalendar(Date time)
This utility method returns a Calendar object that points to the specified time. Be careful, this method always returns the same Calendar object constructed in computeCalendar. You should therefore clone it if you need more than one object.
Parameters:
time - The current day on the calendar.
See Also:
computeCalendar()

setTimeZone

public void setTimeZone(TimeZone timezone)
The time zone set with this method will be used instead of the default time zone. To revert to the default time zone, set the timezone argument to null.
Parameters:
timezone - The new time zone.
See Also:
getCalendar()

getTimeZone

public TimeZone getTimeZone()
This method returns the time zone of this scale.

setLocale

public void setLocale(Locale locale)
This method overrides the Component method to compute the new Calendar object attached to this scale.
Overrides:
setLocale in class Component

computeCalendar

public void computeCalendar()
This method is called when changing the locale or the time zone of this scale to compute the new calendar. If you change the locale or time zone at another level, you should call this method to compute new values.

getMinVisibleTime

public Date getMinVisibleTime()
Returns the minimum time that the scale can show in bounded scrolling mode.
Specified by:
getMinVisibleTime in interface IlvTimeScrollable
Returns:
The minimum visible time or null if the scale is in unbounded scrolling mode.
See Also:
setMinVisibleTime(java.util.Date)

setMinVisibleTime

public void setMinVisibleTime(Date min)
Sets the minimum time that the scale can show in bounded scrolling mode. The current visible time and duration are trimmed to fit the new min-max interval by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. A minVisibleTimeChanged event is then fired to all registered listeners. If min > maxVisibleTime an IllegalArgumentException will be thrown.
Specified by:
setMinVisibleTime in interface IlvTimeScrollable
Parameters:
min - The minimum visible time or null to set the scale to unbounded scrolling mode.
See Also:
getMinVisibleTime()

getMaxVisibleTime

public Date getMaxVisibleTime()
Returns the maximum time that the scale can show in bounded scrolling mode.
Specified by:
getMaxVisibleTime in interface IlvTimeScrollable
Returns:
The maximum visible time or null if the scale is in unbounded scrolling mode.
See Also:
setMaxVisibleTime(java.util.Date)

setMaxVisibleTime

public void setMaxVisibleTime(Date max)
Sets the maximum time that the scale can show in bounded scrolling mode. The current visible time and duration are trimmed to fit the new min-max interval by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. A maxVisibleTimeChanged event is then fired to all registered listeners. If max < minVisibleTime an IllegalArgumentException will be thrown.
Specified by:
setMaxVisibleTime in interface IlvTimeScrollable
Parameters:
max - The maximum visible time or null to set the scale to unbounded scrolling mode.
See Also:
getMaxVisibleTime()

getVisibleTime

public Date getVisibleTime()
Returns the beginning of the time interval displayed by the scale.
Specified by:
getVisibleTime in interface IlvTimeScrollable
See Also:
setVisibleTime(java.util.Date)

setVisibleTime

public void setVisibleTime(Date time)
Sets the beginning of the time interval displayed by the scale. The specified time value is compared against the min and max visible times and is trimmed if necessary by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. The time scale then adjusts its internal zoom and scroll parameters so that the specified time value is drawn at the beginning of the time scale. A VisibleTimeChangedEvent is then fired to all registered listeners. If you are changing both the visible time and duration, it is preferable to use the setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration) method instead.
Specified by:
setVisibleTime in interface IlvTimeScrollable
Parameters:
time - The new time value.
See Also:
getVisibleTime()

getVisibleDuration

public IlvDuration getVisibleDuration()
Returns the duration of the time interval displayed by the scale.
Specified by:
getVisibleDuration in interface IlvTimeScrollable
See Also:
setVisibleDuration(ilog.views.gantt.IlvDuration)

setVisibleDuration

public void setVisibleDuration(IlvDuration duration)
Sets the duration of the time interval displayed by the scale. The specified duration is compared against the min and max visible times and is trimmed if necessary by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. The time scale then adjusts its internal zoom and scroll parameters so that the specified duration is visible. A VisibleDurationChangedEvent is then fired to all registered listeners. If you are changing both the visible time and duration, it is preferable to use the setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration) method instead.
Specified by:
setVisibleDuration in interface IlvTimeScrollable
Parameters:
duration - The new duration value.
See Also:
getVisibleDuration()

getVisibleInterval

public IlvTimeInterval getVisibleInterval()
Returns the time interval displayed by the scale.
Specified by:
getVisibleInterval in interface IlvTimeScrollable
Since:
JViews 3.5
See Also:
setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)

setVisibleInterval

public void setVisibleInterval(Date time,
                               IlvDuration duration)
Sets the time interval displayed by the scale. The specified interval is compared against the min and max visible times and is trimmed if necessary by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. This method then fires an adjusting VisibleTimeChangedEvent followed by a VisibleDurationChangedEvent to all registered listeners.
Specified by:
setVisibleInterval in interface IlvTimeScrollable
Parameters:
time - The new time value.
duration - The new duration value.

addTimeScrollListener

public void addTimeScrollListener(TimeScrollListener listener)
Adds the specified listener to receive time scroll events from this scale.
Specified by:
addTimeScrollListener in interface IlvTimeScrollable
Parameters:
listener - The listener that will be subscribed to subsequent time scroll events.
See Also:
removeTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)

removeTimeScrollListener

public void removeTimeScrollListener(TimeScrollListener listener)
Removes the specified listener so that it will no longer receive time scroll events from this scale.
Specified by:
removeTimeScrollListener in interface IlvTimeScrollable
Parameters:
listener - The listener that will be unsubscribed from receiving time scroll events.
See Also:
addTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)

fireTimeScrollableValueChanged

protected void fireTimeScrollableValueChanged(boolean adjusting)
This method is called to fire a time value modification.

fireTimeScrollableVisibleDurationChanged

protected void fireTimeScrollableVisibleDurationChanged()
This method is called to fire a visible duration value modification.