Rogue Wave Views Foundation Package API Reference Guide |
Rogue Wave Views Documentation Home |
Time scale row class. More...
#include <ilviews/graphics/timescalerow.h>
Public Member Functions | |
IlvQuarterTimeScaleRow (IlvTimeScale *parent) | |
Constructor. More... | |
virtual IlString | computeDateText (IlDate dateval) const |
Returns the text that should be drawn for the interval beginning at the specified date. More... | |
virtual IlvTimeScaleRow * | copy () const |
Returns a copy of the current time scale row. | |
IlString | getQuarterLongString () const |
Returns the string that is used when year mode is not set. More... | |
IlString | getQuarterShortString () const |
Returns the string that is used when year mode is set. More... | |
virtual IlvTimeScaleRowFactory::rowtype | getType () const |
Returns the type of the IlvTimeScaleRow . More... | |
virtual IlDate | incrementTime (IlDate dateval) |
Increments the specified date by one quarter. More... | |
IlBoolean | isYearMode () |
Returns whether the displayed label contains the year or not. More... | |
virtual IlDate | previousUnitTime (IlDate dateval) |
Returns the previous unit time value of the quarter relative to the specified date. More... | |
virtual void | read (IlvInputFile &) |
Reads the time scale row description from an input file. More... | |
void | setQuarterLongString (IlString str) |
Sets the string that is used when the year mode is not set. More... | |
void | setQuarterShortString (IlString str) |
Sets the string that will be used when the year mode is set. More... | |
void | setYearMode (IlBoolean val) |
Sets or unsets the year mode used to display labels. More... | |
virtual void | write (IlvOutputFile &) const |
Saves the time scale row in an output file. More... | |
Public Member Functions inherited from IlvTimeScaleRow | |
IlvTimeScaleRow (IlvTimeScale *parent) | |
Constructor. More... | |
IlString | getAdditionalString () const |
Returns the additional text string displayed in the first interval. More... | |
IlCalendar * | getCalendar () const |
Gets the internal calendar of the parent scale. | |
IlCalendar * | getCalendar (IlDate time) const |
Gets the internal calendar of the parent scale set to the specified time. More... | |
IlvDisplay * | getDisplay () const |
Returns the IlvDisplay of the parent scale. | |
IlInt | getIntervalMinWidth () const |
Returns the minimal interval required to draw a text between two ticks. More... | |
IlvPalette * | getPalette () const |
Returns the IlvPalette of the parent scale. | |
virtual IlInt | getPreferredHeight () const |
Returns the preferred height of the time scale row. | |
IlvColor * | getTextColor () const |
Gets the color of the row labels. | |
IlvFont * | getTextFont () const |
Gets the font of the row labels. | |
IlvPalette * | getTextPalette () const |
Gets the palette of the row labels. | |
TextPos | getTextPosition () const |
Returns the position of labels. More... | |
IlvColor * | getTickColor () const |
Gets the color of the row ticks. | |
IlvPalette * | getTickPalette () const |
Gets the palette of the row ticks. | |
IlvTimeScale * | getTimeScale () const |
Gets the referring time scale. More... | |
const IlTimeUnit * | getTimeUnit () const |
Gets the internal time unit. | |
IlBoolean | isOverlappingLabelAllowed () const |
Indicates whether overlapping labels are allowed. More... | |
IlBoolean | isVisible () |
Indicates whether the row is visible. More... | |
virtual IlDate | nextUnitTime (IlDate dateval) |
Computes the next unit value after the specified date. More... | |
void | setAdditionalString (IlString str) |
Sets the additional text string displayed in the first interval. More... | |
void | setIntervalMinWidth (IlInt value) |
Sets the minimal interval required to draw a text between two ticks. More... | |
void | setOverlappingLabelAllowed (IlBoolean overlap) |
Specifies whether overlapping labels are allowed. More... | |
void | setTextColor (IlvColor *c) |
Sets the color of the row labels. | |
void | setTextFont (IlvFont *f) |
Sets the font of the row labels. | |
void | setTextPosition (TextPos pos) |
Sets the position of labels. More... | |
void | setTickColor (IlvColor *c) |
Sets the colors of the row ticks. | |
void | setTimeScale (IlvTimeScale *timescale) |
Sets the referring IlvTimeScale . More... | |
void | setVisible (IlBoolean visible) |
Sets the visibility of the time scale row. More... | |
Protected Member Functions | |
virtual IlvTimeScaleRow * | cloneType (IlvTimeScale *) const |
Returns an object of the same type. More... | |
Protected Member Functions inherited from IlvTimeScaleRow | |
virtual void | draw (IlvPort *dst, const IlvTransformer *t, const IlvTimeScalePaintContext &context, const IlvRect &rect) const |
Draws the time scale row on a specified port. More... | |
virtual void | drawLabel (IlvPort *dst, const IlvTransformer *t, const IlvPoint &prevPos, const IlvPoint &nextPos, IlString text) const |
Draws a label in a scale interval. More... | |
virtual void | drawTick (IlvPort *dst, const IlvTransformer *t, const IlvPoint &pos, IlInt height) const |
Draws a scale row tick. More... | |
Additional Inherited Members | |
Public Types inherited from IlvTimeScaleRow |
Time scale row class.
Library: views
This class implements methods from the parent class IlvTimeScaleRow
to provide a complete scale displaying quarter intervals. By default, each quarter interval is displayed with a text partly formatted using a java.text.SimpleDateFormat
created with the "yyyy" string. The exact result depends on the year mode and on the string chosen to display the "Quarter" text. For example, by default, if year mode is set, the result will be "Qtr. 1 2002" for January 2002.
IlvQuarterTimeScaleRow::IlvQuarterTimeScaleRow | ( | IlvTimeScale * | parent | ) |
Constructor.
Creates and initializes an IlvQuarterTimeScaleRow
object.
|
protectedvirtual |
Returns an object of the same type.
This method should be implemented by subclasses. It must return an object of the same type as the object on which the method is called, attached to the given IlvTimeScale
.
scale | The IlvTimeScale on which the row is attached. |
Implements IlvTimeScaleRow.
|
virtual |
Returns the text that should be drawn for the interval beginning at the specified date.
The current DateFormat
of the time scale row is used to format the time. invalidateDateTextCache()
must be invoked whenever a row property changes which affects how this method formats the text.
dateval | The date. |
Reimplemented from IlvTimeScaleRow.
IlString IlvQuarterTimeScaleRow::getQuarterLongString | ( | ) | const |
Returns the string that is used when year mode is not set.
setQuarterLongString()
IlString IlvQuarterTimeScaleRow::getQuarterShortString | ( | ) | const |
Returns the string that is used when year mode is set.
setQuarterShortString()
|
virtual |
Returns the type of the IlvTimeScaleRow
.
IlvTimeScaleRow
. Implements IlvTimeScaleRow.
|
virtual |
Increments the specified date by one quarter.
For example, the incremented date of January 14th, 2002, 8:12:34 is April 14th, 2002, 8:12:34.
dateval | The date to increment. |
Implements IlvTimeScaleRow.
IlBoolean IlvQuarterTimeScaleRow::isYearMode | ( | ) |
Returns whether the displayed label contains the year or not.
setYearMode()
|
virtual |
Returns the previous unit time value of the quarter relative to the specified date.
For example, the previous unit time of January 14th, 2002, is January 1st, 2002.
dateval | The date to floor. |
Implements IlvTimeScaleRow.
|
virtual |
Reads the time scale row description from an input file.
infile | The input file. |
Reimplemented from IlvTimeScaleRow.
void IlvQuarterTimeScaleRow::setQuarterLongString | ( | IlString | str | ) |
Sets the string that is used when the year mode is not set.
The default string is "Quarter ".
str | The string to display. |
setYearMode()
void IlvQuarterTimeScaleRow::setQuarterShortString | ( | IlString | str | ) |
Sets the string that will be used when the year mode is set.
The default string is "Qtr. ".
str | The string to display. |
setYearMode()
void IlvQuarterTimeScaleRow::setYearMode | ( | IlBoolean | val | ) |
Sets or unsets the year mode used to display labels.
The year mode is used to display labels.
If the year mode is set, the labels are displayed as follows: Qtr. 1 2002
If the year mode is unset and the labels are displayed as follows : Quarter 1
val | IlTrue to set the year mode and IlFalse to unset it. |
|
virtual |
Saves the time scale row in an output file.
outfile | The output file. |
Reimplemented from IlvTimeScaleRow.
© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.