public class IlvHourTimeScaleRow extends IlvBasicTimeScaleRow
IlvBasicTimeScaleRow
to provide a complete scale displaying
hourly intervals.
By default, it displays each hourly interval with a text formatted using a
java.text.SimpleDateFormat
created with the "HH" string.
The exact result depends on the time scale Locale
, in English
"20" for 8:12:34 PM.
By default, the text is centered on the interval.LEADING_TICK
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor and Description |
---|
IlvHourTimeScaleRow()
This constructor creates and initializes an
IlvHourTimeScaleRow object. |
Modifier and Type | Method and Description |
---|---|
protected String |
computeDateText(Date time)
Computes and returns the text that should be drawn for the interval
beginning at the specified
time . |
protected IlvTimeIncrementPolicy |
createTimeIncrementPolicy()
Creates the time increment policy for the row.
|
int |
getHourStep()
Returns the number of hours in an interval.
|
void |
setHourStep(int value)
Sets the number of hours for an interval.
|
getAdditionalString, getDateFormat, getFormatString, getHeight, getIntervalMinWidth, getPreferredHeight, getTextColor, getTextFont, getTextPosition, getTickColor, getTimeIncrementPolicy, incrementTime, invalidateDateTextCache, isOverlappingLabelAllowed, nextUnitTime, paint, paintRow, paintText, paintText, paintTick, paintTick, previousUnitTime, setAdditionalString, setFormatString, setHeight, setIntervalMinWidth, setOverlappingLabelAllowed, setTextColor, setTextFont, setTextPosition, setTickColor
getComponentOrientation, getLocale, getTimeScale, getULocale, isVisible, setVisible
public IlvHourTimeScaleRow()
IlvHourTimeScaleRow
object.public void setHourStep(int value)
value
- The number of hours for a scale interval.public int getHourStep()
protected IlvTimeIncrementPolicy createTimeIncrementPolicy()
IlvTimeIncrementPolicy.Hour
.createTimeIncrementPolicy
in class IlvBasicTimeScaleRow
IlvBasicTimeScaleRow.getTimeIncrementPolicy()
protected String computeDateText(Date time)
time
. The row's current
DateFormat
is used to format the time.
IlvBasicTimeScaleRow.invalidateDateTextCache()
must be invoked whenever a row property
changes which affects how this method formats the text.computeDateText
in class IlvBasicTimeScaleRow
time
- The start time of the scale interval.IlvBasicTimeScaleRow.getDateFormat()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.