public class IlvTimeScale extends JComponent implements IlvTimeScrollable
IlvTimeScale
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.
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.
The default actions provided on this object are that it will:
To adjust the time scale rows visibility whenever the visible time interval
of the time scale changes, a new IlvTimeScaleVisibilityPolicy
object must be set for the scale. The default
implementation does not set this visibility policy, and the visibility of
the rows is based on their visible property. This means that users
of this class must control row visibility using the hideRow(ilog.views.gantt.scale.IlvTimeScaleRow)
and the showRow(ilog.views.gantt.scale.IlvTimeScaleRow)
methods.
Use this class to define a time scale using cascading style sheets (CSS).
Modifier and Type | Class and Description |
---|---|
static class |
IlvTimeScale.PaintContext
A
PaintContext defines the context in which the time scale
paints. |
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DEFAULT_MINIMUM_DURATION
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvTimeScale()
Creates a new
IlvTimeScale object that initially contains
no rows . |
IlvTimeScale(IlvTimeScaleVisibilityPolicy visibilityPolicy)
Creates a new
IlvTimeScale instance with the specified
visibility policy. |
Modifier and Type | Method and Description |
---|---|
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.
|
protected void |
adjustRowsVisibility(Graphics dst,
IlvTimeScale.PaintContext context)
Adjusts which rows are visible, based on the
visibility policy . |
void |
computeCalendar()
Deprecated.
Beginning with Perforce JViews 8.7, this method is called automatically and
is considered part of the internal implementation. This method should not be called
from user code.
|
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. |
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. |
long |
getLocation(Date time)
Returns the x position corresponding to the specified time.
|
Date |
getMaxVisibleTime()
Returns the maximum time that the scale can show in bounded
scrolling mode.
|
IlvDuration |
getMinVisibleDuration()
Returns the minimum duration that the scale can show.
|
Date |
getMinVisibleTime()
Returns the minimum time that the scale can show in bounded
scrolling mode.
|
IlvTimeScale.PaintContext |
getPaintContext()
Returns the cached
PaintContext used to paint the time
scale on the 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(long x)
Returns the time that corresponds to the specified 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.
|
int |
getTotalRowSize()
Returns the size of the entire array of
IlvTimeScaleRow objects. |
com.ibm.icu.util.ULocale |
getULocale()
Returns the locale of this scale.
|
IlvTimeScaleVisibilityPolicy |
getVisibilityPolicy()
Returns the visibility policy of the time 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 |
isConstantZoomFactorOnWidthChange()
Returns whether the visible duration of the scale will be modified when its
width changes in order to maintain a constant zoom factor.
|
boolean |
isIntegerZoomAllowed()
Tests if double-click zooming with the mouse is allowed.
|
boolean |
isOpaqueTranslation()
Returns the opaque translation mode.
|
boolean |
isTranslationAllowed()
Tests if drag panning with the mouse is allowed.
|
boolean |
isVisibilityAdjusted()
Returns the time scale visibility adjusted status.
|
boolean |
isZoomAllowed()
Tests if click-move-click zooming with the mouse is allowed.
|
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 |
repaint()
Request a repaint of this component.
|
void |
revalidate()
Request a call to
invalidate() and a subsequent call to
validate() on this component. |
void |
setBounds(int x,
int y,
int w,
int h)
Moves and resizes the time scale.
|
void |
setComponentOrientation(ComponentOrientation o)
Sets the language-sensitive orientation of this time scale.
|
void |
setConstantZoomFactorOnWidthChange(boolean enabled)
Sets if the visible duration for the scale will be modified in order to
maintain a constant zoom factor when the width of the scale changes.
|
void |
setIntegerZoomAllowed(boolean value)
Set to
true to enable double-click zooming with the mouse. |
void |
setLocale(Locale locale)
Sets the locale of this component.
|
void |
setMaxVisibleTime(Date max)
Sets the maximum time that the scale can show in bounded
scrolling mode.
|
void |
setMinVisibleDuration(IlvDuration duration)
Sets the minimum duration that the scale can show.
|
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[] rows)
This method replaces the existing
IlvTimeScaleRow objects by
those passed in the row argument. |
void |
setRow(int index,
IlvTimeScaleRow row)
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)
Sets whether drag panning with the mouse is allowed.
|
void |
setULocale(com.ibm.icu.util.ULocale locale)
Sets the locale of this component.
|
void |
setVisibilityAdjusted(boolean visibilityAdjusted)
Sets whether the rows visibility should be adjusted or not.
|
void |
setVisibilityPolicy(IlvTimeScaleVisibilityPolicy policy)
Sets the visibility policy of the time scale, and adjusts the rows if
needed.
|
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)
Sets whether click-move-click zooming with the mouse is allowed.
|
void |
showRow(IlvTimeScaleRow row)
This method shows the specified row.
|
void |
updateUI()
This method is a notification that the L&F has changed.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public IlvTimeScale()
IlvTimeScale
object that initially contains
no rows
.
By default, the time scale uses an IlvLinearTimeConverter
, and no
IlvTimeScaleVisibilityPolicy
. The time scale time converter can be
set by calling the setTimeConverter
method.
The time scale visibility policy can be set by calling setVisibilityPolicy(ilog.views.gantt.scale.IlvTimeScaleVisibilityPolicy)
.public IlvTimeScale(IlvTimeScaleVisibilityPolicy visibilityPolicy)
IlvTimeScale
instance with the specified
visibility policy.
By default, the time scale uses an IlvLinearTimeConverter
.
The time scale time converter can be set by calling
setTimeConverter
.visibilityPolicy
- The row visibility policy.public IlvTimeScale.PaintContext getPaintContext()
PaintContext
used to paint the time
scale on the screen. The paint context is immutable and calling any of its
setter methods will throw an UnsupportedOperationException
.public IlvTimeScale.PaintContext createPaintContext(Date start, IlvDuration duration, Rectangle viewport)
PaintContext
so that the time scale paints
the specified time interval into the specified view port.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.public void updateUI()
JTableHeader
.updateUI
in class JComponent
public void addRow(IlvTimeScaleRow row)
row
- The row to be added.removeRow(ilog.views.gantt.scale.IlvTimeScaleRow)
public void removeRow(IlvTimeScaleRow row)
IlvTimeScale
object.
To see the modification, you must redraw the object.row
- The row to be removed.public IlvTimeScaleRow getRow(int index)
IlvTimeScaleRow
at a specified index.index
- The index of the returned row.public void setRow(int index, IlvTimeScaleRow row)
IlvTimeScaleRow
object at a specified
index.
The old row at this position will be removed.
If the index is greater than the last row index, fake invisible
rows are created between the two rows.index
- The index of the row to be changed.row
- The new IlvTimeScaleRow
.public IlvTimeScaleRow[] getRow()
IlvTimeScaleRow
objects.public int getTotalRowSize()
IlvTimeScaleRow
objects.IlvTimeScaleRow
objects.public void setRow(IlvTimeScaleRow[] rows)
IlvTimeScaleRow
objects by
those passed in the row
argument.rows
- The new array of IlvTimeScaleRow
.public IlvTimeScaleRow getTimeScaleRow(int y)
y
- The y position in the component.public Date getTime(long x)
x
- The x position in the component.public long getLocation(Date time)
time
- The time.public void showRow(IlvTimeScaleRow row)
row
- The row to be shown.public void hideRow(IlvTimeScaleRow row)
row
- The row to be hidden.public void revalidate()
invalidate()
and a subsequent call to
validate()
on this component.
Usually, the invalidate()
call is done immediately, and
the validate()
call is delayed.revalidate
in class JComponent
public void repaint()
paint
call is delayed.protected void paintComponent(Graphics dst)
paintRows
method.paintComponent
in class JComponent
dst
- The destination graphics.protected void paintRows(Graphics dst)
paint(Graphics,
Rectangle, PaintContext)
method. The cached PaintContext
is used.
If a visibility policy exists, the rows will be adjusted if necessary.
dst
- The destination graphics.public void paint(Graphics dst, Rectangle viewport, IlvTimeScale.PaintContext context)
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.
dst
- The destination graphics.viewport
- The viewport. It defines the potion of the time scale
to be painted.context
- The paint context.public void setBounds(int x, int y, int w, int h)
x
and y
, and the
new size is specified by width
and height
.public void setIntegerZoomAllowed(boolean value)
true
to enable double-click zooming with the mouse.
The default value is true
.value
- If true
, double-click zooming with the mouse
is enabled.isIntegerZoomAllowed()
,
setZoomAllowed(boolean)
public boolean isIntegerZoomAllowed()
true
is returned.setIntegerZoomAllowed(boolean)
,
isZoomAllowed()
public void setZoomAllowed(boolean value)
true
.value
- Set to true
to enable click-move-click zooming
with the mouse.isZoomAllowed()
,
setIntegerZoomAllowed(boolean)
public boolean isZoomAllowed()
true
is returned.setZoomAllowed(boolean)
,
isIntegerZoomAllowed()
public void setTranslationAllowed(boolean value)
true
.value
- Set to true
to enable drag panning with the mouse.isTranslationAllowed()
public boolean isTranslationAllowed()
true
is
returned.setTranslationAllowed(boolean)
public void setOpaqueTranslation(boolean value)
value
- If false
, the scale will not be drawn during
translation.public boolean isOpaqueTranslation()
true
.setOpaqueTranslation(boolean)
public Dimension getPreferredSize()
JComponent
one to take the preferred
height of each row into account.getPreferredSize
in class JComponent
public void paintSeparator(Graphics dst, int x, int y, int width)
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.public IlvTimeConverter getTimeConverter()
IlvTimeConverter
object of this scale.public void setTimeConverter(IlvTimeConverter timeConverter)
IlvTimeConverter
object
of this scale.
This object allows you to draw the scale correctly by converting time value
to units on the screen.timeConverter
- The new IlvTimeConverter
object.public IlvTimeScaleVisibilityPolicy getVisibilityPolicy()
setVisibilityPolicy(ilog.views.gantt.scale.IlvTimeScaleVisibilityPolicy)
public void setVisibilityPolicy(IlvTimeScaleVisibilityPolicy policy)
A visibility policy determines which rows are visible when the time scale visible time interval changed.
policy
- The visibility policy. If the policy is set to
the default value of null
, row visibility
is based on their visible property. If the policy is not null
,
the visibility of the rows is adjusted by calling
adjustRows
.setVisibleDuration(ilog.views.gantt.IlvDuration)
,
setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)
public boolean isVisibilityAdjusted()
false
is
returned.
The default value is false
.public void setVisibilityAdjusted(boolean visibilityAdjusted)
visibilityAdjusted
- Set to false
so that at the next
paint
request, the time scale will take any existing
visibility policy into account for row adjustment.protected void adjustRowsVisibility(Graphics dst, IlvTimeScale.PaintContext context)
visibility policy
.dst
- The destination graphics.context
- The paint context.public com.ibm.icu.util.ULocale getULocale()
ULocale
.setULocale(ULocale)
public void setULocale(com.ibm.icu.util.ULocale locale)
locale
- An ICU ULocale
, or null
if this
component shall inherit its locale from the parent component.getULocale()
,
setLocale(Locale)
public void setLocale(Locale locale)
setLocale
in class Component
locale
- An Locale
, or null
if this
component shall inherit its locale from the parent component.setULocale(ULocale)
public void setComponentOrientation(ComponentOrientation o)
setComponentOrientation
in class Component
o
- The orientation for this time scale.@Deprecated public void computeCalendar()
public Calendar getCalendar()
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.public Calendar getCalendar(Date time)
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.time
- The current day on the calendar.public void setTimeZone(TimeZone timezone)
timezone
argument to null
.timezone
- The new time zone.getCalendar()
public TimeZone getTimeZone()
public boolean isConstantZoomFactorOnWidthChange()
false
, the visible duration of the scale stays the same and
its zoom factor is modified when the width of the scale changes.
The default value is true
.
When multiple IlvTimeScrollable
user interface components have their
time scrolling synchronized through an IlvBasicTimeScrollController
or one of its subclasses, all of the scrollable components should be placed
in a container that ensures that they maintain equal widths. Their
constantZoomFactorOnWidthChange
properties must also be set to
the same value. When the GUI resizes, each scrollable component is
responsible for computing its own duration change. When a time scale
is added to an IlvHierarchyChart
,
its constantZoomFactorOnWidthChange
property is set to match
that of the
chart.
setConstantZoomFactorOnWidthChange(boolean)
public void setConstantZoomFactorOnWidthChange(boolean enabled)
true
.
When multiple IlvTimeScrollable
user interface components have their
time scrolling synchronized through an IlvBasicTimeScrollController
or one of its subclasses, all of the scrollable components should be placed
in a container that ensures that they maintain equal widths. Their
constantZoomFactorOnWidthChange
properties must also be set to
the same value. When the GUI resizes, each scrollable component is
responsible for computing its own duration change. When a time scale
is added to an IlvHierarchyChart
,
its constantZoomFactorOnWidthChange
property is set to match
that of the
chart.
enabled
- Set to true
so the zoom factor stays the same
and the visible duration changes when the scale resizes. Set to
false
so the visible duration stays the same and the zoom
factor changes.isConstantZoomFactorOnWidthChange()
public Date getMinVisibleTime()
getMinVisibleTime
in interface IlvTimeScrollable
null
if the scale
is in unbounded scrolling mode.setMinVisibleTime(java.util.Date)
public void setMinVisibleTime(Date min)
time
and
duration
are trimmed to fit the new min-max
interval by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A
minVisibleTimeChanged
event
is then fired to all registered
listeners
. If min > maxVisibleTime
an
IllegalArgumentException
will be thrown.setMinVisibleTime
in interface IlvTimeScrollable
min
- The minimum visible time or null
to set the scale
to unbounded scrolling mode.getMinVisibleTime()
public Date getMaxVisibleTime()
getMaxVisibleTime
in interface IlvTimeScrollable
null
if the scale
is in unbounded scrolling mode.setMaxVisibleTime(java.util.Date)
public void setMaxVisibleTime(Date max)
time
and
duration
are trimmed to fit the new min-max
interval by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A
maxVisibleTimeChanged
event
is then fired to all registered
listeners
. If max < minVisibleTime
an
IllegalArgumentException
will be thrown.setMaxVisibleTime
in interface IlvTimeScrollable
max
- The maximum visible time or null
to set the scale
to unbounded scrolling mode.getMaxVisibleTime()
public IlvDuration getMinVisibleDuration()
getMinVisibleDuration
in interface IlvTimeScrollable
setMinVisibleDuration(ilog.views.gantt.IlvDuration)
public void setMinVisibleDuration(IlvDuration duration)
minVisibleDurationChanged event
is fired to all registered listeners
.setMinVisibleDuration
in interface IlvTimeScrollable
duration
- The minimum visible duration.getMinVisibleDuration()
public Date getVisibleTime()
getVisibleTime
in interface IlvTimeScrollable
setVisibleTime(java.util.Date)
public void setVisibleTime(Date time)
min
and max
visible times and is trimmed if
necessary by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
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.setVisibleTime
in interface IlvTimeScrollable
time
- The new time value.getVisibleTime()
public IlvDuration getVisibleDuration()
getVisibleDuration
in interface IlvTimeScrollable
setVisibleDuration(ilog.views.gantt.IlvDuration)
public void setVisibleDuration(IlvDuration duration)
min
and max
visible times and is trimmed if
necessary by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
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.setVisibleDuration
in interface IlvTimeScrollable
duration
- The new duration value.getVisibleDuration()
public IlvTimeInterval getVisibleInterval()
getVisibleInterval
in interface IlvTimeScrollable
setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)
public void setVisibleInterval(Date time, IlvDuration duration)
min
and
max
visible times and is trimmed if necessary
by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. This method
then fires an adjusting VisibleTimeChangedEvent
followed by a VisibleDurationChangedEvent
to
all registered listeners
.setVisibleInterval
in interface IlvTimeScrollable
time
- The new time value.duration
- The new duration value.public void addTimeScrollListener(TimeScrollListener listener)
addTimeScrollListener
in interface IlvTimeScrollable
listener
- The listener that will be subscribed to subsequent time
scroll events.removeTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)
public void removeTimeScrollListener(TimeScrollListener listener)
removeTimeScrollListener
in interface IlvTimeScrollable
listener
- The listener that will be unsubscribed from receiving
time scroll events.addTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.