public abstract class IlvTimeScaleRow extends Object implements Serializable
IlvTimeScale
, should extend.
An IlvTimeScaleRow
will display a part of the
IlvTimeScale
corresponding to a particular time unit.
An IlvTimeScaleRow
can belong to at most one
IlvTimeScale
at any given time.
IlvTimeScale
,
Serialized FormConstructor and Description |
---|
IlvTimeScaleRow()
This constructor creates a new instance of a time scale row.
|
Modifier and Type | Method and Description |
---|---|
ComponentOrientation |
getComponentOrientation()
Returns the language-sensitive orientation of this scale row.
|
Locale |
getLocale()
Returns the locale of this scale row.
|
abstract int |
getPreferredHeight()
This method returns the preferred height of this row.
|
protected IlvTimeScale |
getTimeScale()
This method can be used in subclasses to access the referring
IlvTimeScale . |
ULocale |
getULocale()
Returns the locale of this scale row.
|
boolean |
isVisible()
This method indicates whether the row is visible.
|
abstract Date |
nextUnitTime(Date time)
This method is called to compute the next unit value after the specified
time.
|
protected abstract void |
paint(Graphics dst,
Rectangle rect,
IlvTimeScale.PaintContext context)
This method should be overridden to draw the scale row in the specified paint
context.
|
protected abstract void |
paintRow(Graphics dst,
Rectangle rect)
Deprecated.
Beginning with Rogue Wave JViews 8.5 use
paint(Graphics, Rectangle,
IlvTimeScale.PaintContext) instead. |
abstract Date |
previousUnitTime(Date time)
This method is called to compute the previous unit value before the
specified time.
|
void |
setVisible(boolean visible)
This method can be used to switch the visibility setting of this row.
|
public IlvTimeScaleRow()
IlvTimeScaleRow
instance can be added to an
IlvTimeScale
object using the addRow
method.
Then, it can be removed using the removeRow
method.public void setVisible(boolean visible)
IlvTimeScale
object it belongs too.visible
- The state of the row.public boolean isVisible()
public abstract int getPreferredHeight()
protected IlvTimeScale getTimeScale()
IlvTimeScale
.public abstract Date nextUnitTime(Date time)
time
is already an integer unit value, the method
returns a copy of it.
Its implementation depends on the unit of the scale row.
For example, in a minute-unit time scale row, the next unit time of
January 14th, 2001, 8:12:34 is January 14th, 2001, 8:13:00,
and the next unit time of January 14th, 2001, 9:01:00 is
January 14th, 2001, 9:01:00.
This method is necessary for integer-zoom interaction on the scale
and useful when drawing it.
To implement this method, you can use a Calendar
object
provided by a method from the class IlvTimeScale
.time
- The time to compute the ceiling.IlvTimeScale.getCalendar()
public abstract Date previousUnitTime(Date time)
time
is already an integer unit value,
the method returns a copy of it.
For example, in a minute-unit time scale row, the previous unit time of
January 14th, 2001, 8:12:34 is January 14th, 2001, 8:12:00,
and the previous unit time of January 14th, 2001, 9:01:00 is
January 14th, 2001, 9:01:00.
Its implementation depends on the unit of the scale row.
This method is necessary for integer-zoom interaction on the scale.
To implement this method, you can use a Calendar
object
provided by a method from the class IlvTimeScale
.time
- The time to floor.IlvTimeScale.getCalendar()
@Deprecated protected abstract void paintRow(Graphics dst, Rectangle rect)
paint(Graphics, Rectangle,
IlvTimeScale.PaintContext)
instead.dst
- The destination Graphics
.rect
- The rectangle in which the scale row should be drawn.protected abstract void paint(Graphics dst, Rectangle rect, IlvTimeScale.PaintContext context)
dst
- The destination Graphics
.rect
- The rectangle in which the scale row should be drawn.context
- The paint context.public Locale getLocale()
public ULocale getULocale()
public ComponentOrientation getComponentOrientation()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.