public class IlvYearTimeScaleRow extends IlvBasicTimeScaleRow
IlvBasicTimeScaleRow
to provide a complete scale displaying
yearly intervals.
By default, each yearly interval is displayed with a text formatted using
java.text.SimpleDateFormat
created with the "yyy" string.
The exact result depends on the system Locale
, in English
"1998" for January 18th, 1998.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 |
---|
IlvYearTimeScaleRow()
This constructor creates and initializes an
IlvYearTimeScaleRow 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 |
getYearStep()
Returns the number of years in an interval.
|
void |
setYearStep(int step)
Sets the number of years 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 IlvYearTimeScaleRow()
IlvYearTimeScaleRow
object.public int getYearStep()
public void setYearStep(int step)
step
- The number of years for a scale interval.getYearStep()
protected IlvTimeIncrementPolicy createTimeIncrementPolicy()
createTimeIncrementPolicy
in class IlvBasicTimeScaleRow
IlvBasicTimeScaleRow.getTimeIncrementPolicy()
protected String computeDateText(Date time)
time
. The year's current
DateFormat
is used to format the time.
IlvBasicTimeScaleRow.invalidateDateTextCache()
must be invoked whenever a year 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.