com.nchart3d.NChart.NChartTimeAxis Class Reference

The NChartTimeAxis class provides methods to display the time axis of the chart. More...

Inheritance diagram for com.nchart3d.NChart.NChartTimeAxis:
com.nchart3d.NChart.NChartAxis com.nchart3d.NChart.NChartObject

Public Member Functions

void setBeginButtonStateImages (Bitmap normal, Bitmap pushed)
 Set images for button "go to the beginning". More...
 
void setEndButtonStateImages (Bitmap normal, Bitmap pushed)
 Set images for button "go to the ending". More...
 
void setPlayButtonStateImages (Context context, int normalResID, int pushedResID)
 Set image resources for button "play". More...
 
void setPauseButtonStateImages (Context context, int normalResID, int pushedResID)
 Set image resources for button "pause". More...
 
void setHandlerImage (Bitmap handler)
 Set image for the handler of the slider. More...
 
void setHandlerImage (Context context, int resID)
 Set image resource for the handler of the slider. More...
 
void setSliderImage (Bitmap slider, float leftInset, float rightInset)
 Specify the image for the slider and the cap insets to stretch it. More...
 
void setSliderImage (Context context, int resID, float leftInset, float rightInset)
 Specify the image resource for the slider and the cap insets to stretch it. More...
 
void setImages (Bitmap beginNormal, Bitmap beginPushed, Bitmap endNormal, Bitmap endPushed, Bitmap playNormal, Bitmap playPushed, Bitmap pauseNormal, Bitmap pausePushed, Bitmap slider, Bitmap handler)
 Set all images used for time axis at once. More...
 
void goToNextTick ()
 Go to the next timestamp (without any user interactions).
 
void goToPreviousTick ()
 Go to the previous timestamp (without any user interactions).
 
void goToFirstTick ()
 Go to the beginning of the timeline (without any user interactions).
 
void goToLastTick ()
 Go to the ending of the timeline (without any user interactions).
 
void play ()
 Start playing the timeline (without any user interactions).
 
void stop ()
 Stop playing the timeline (without any user interactions).
 
int getCurrentIndex ()
 Current timestamp index (index of the timestamp tick where the handler stays).
 
void setCurrentIndex (int currentIndex)
 For details see getCurrentIndex().
 
NChartTimeAxisTooltip getTooltip ()
 Tooltip that appears over the handler. More...
 
void setTooltip (NChartTimeAxisTooltip tooltip)
 For details see getTooltip().
 
NChartFont getTickTitlesFont ()
 Font used to display timestamp titles.
 
void setTickTitlesFont (NChartFont tickTitlesFont)
 For details see getTickTitlesFont().
 
int getTickTitlesColor ()
 Color used to display timestamp titles.
 
void setTickTitlesColor (int tickTitlesColor)
 For details see getTickTitlesColor().
 
int getTickColor ()
 Color used to display timestamp ticks.
 
void setTickColor (int tickColor)
 For details see getTickColor().
 
PointF getTickSize ()
 Size of ticks in pixels.
 
void setTickSize (PointF tickSize)
 For details see getTickSize().
 
float getTickOffset ()
 Offset of timestamp ticks (spacing between slider and ticks) in pixels. More...
 
void setTickOffset (float tickOffset)
 For details see getTickOffset().
 
float getTickTitlesOffset ()
 Offset of timestamp titles (spacing between the slider and titles) in pixels.
 
void setTickTitlesOffset (float tickTitlesOffset)
 For details see getTickTitlesOffset().
 
NChartTimeAxisTickShape getTickShape ()
 Shape of timestamp ticks. More...
 
void setTickShape (NChartTimeAxisTickShape tickShape)
 For details see getTickShape().
 
NChartTimeAxisLabelsLayout getTickTitlesLayout ()
 Layout of timestamp titles. More...
 
void setTickTitlesLayout (NChartTimeAxisLabelsLayout tickTitlesLayout)
 For details see getTickTitlesLayout().
 
NChartTimeAxisLabelsPosition getTickTitlesPosition ()
 Position of timestamp titles. More...
 
void setTickTitlesPosition (NChartTimeAxisLabelsPosition tickTitlesPosition)
 For details see getTickTitlesPosition().
 
float getMinTickSpacing ()
 Minimal spacing between neighbor ticks in pixels (the tick is the center place of the timestamp title, a kind of milestone on the axis). More...
 
void setMinTickSpacing (float minTickSpacing)
 For details see getMinTickSpacing().
 
NChartMargin getMargin ()
 Margin of the time axis.
 
void setMargin (NChartMargin margin)
 For details see getMargin().
 
boolean isAutohideTooltip ()
 Flag indicating whether the tooltip should be hidden automatically when the user interactions end (true) or not (false).
 
void setAutohideTooltip (boolean autohideTooltip)
 For details see isAutohideTooltip().
 
float getAnimationTime ()
 Time that takes to play the whole time axis in seconds.
 
void setAnimationTime (float animationTime)
 For details see getAnimationTime().
 
NChartMargin getPadding ()
 Padding of the time axis.
 
void setPadding (NChartMargin padding)
 For details see getPadding().
 
RectF getFrame ()
 Frame of the time axis in the view's coordinate system. More...
 
NChartTimeAxisDataSource getDataSource ()
 Time axis data source. More...
 
void setDataSource (NChartTimeAxisDataSource dataSource)
 For details see getDataSource().
 
- Public Member Functions inherited from com.nchart3d.NChart.NChartObject
boolean isVisible ()
 Flag that determines if the object is visible or not. More...
 
void setVisible (boolean visible)
 For details see isVisible().
 
NChart getChart ()
 Chart the object belongs to. More...
 

Detailed Description

The NChartTimeAxis class provides methods to display the time axis of the chart.

Member Function Documentation

NChartTimeAxisDataSource com.nchart3d.NChart.NChartTimeAxis.getDataSource ( )
inline

Time axis data source.

See also
NChartTimeAxisDataSource
RectF com.nchart3d.NChart.NChartTimeAxis.getFrame ( )
inline

Frame of the time axis in the view's coordinate system.

The frame is a rect fully enclosing the entire time axis with its ticks, labels and control buttons, but not its tooltip. This rect is calculated during updateData call when the chat lays out its elements.

float com.nchart3d.NChart.NChartTimeAxis.getMinTickSpacing ( )
inline

Minimal spacing between neighbor ticks in pixels (the tick is the center place of the timestamp title, a kind of milestone on the axis).

According to this value some timestamps can be hidden, if there are too many of them.

float com.nchart3d.NChart.NChartTimeAxis.getTickOffset ( )
inline

Offset of timestamp ticks (spacing between slider and ticks) in pixels.

If positive, ticks are outside of slider, if negative, ticks may overlap the slider; so the outer border of the slider (including the slider's handler) is assumed as zero offset.

NChartTimeAxisTickShape com.nchart3d.NChart.NChartTimeAxis.getTickShape ( )
inline

Shape of timestamp ticks.

See also
NChartTimeAxisTickShape
NChartTimeAxisLabelsLayout com.nchart3d.NChart.NChartTimeAxis.getTickTitlesLayout ( )
inline

Layout of timestamp titles.

See also
NChartTimeAxisLabelsLayout
NChartTimeAxisLabelsPosition com.nchart3d.NChart.NChartTimeAxis.getTickTitlesPosition ( )
inline

Position of timestamp titles.

See also
NChartTimeAxisLabelsPosition
NChartTimeAxisTooltip com.nchart3d.NChart.NChartTimeAxis.getTooltip ( )
inline

Tooltip that appears over the handler.

This is null by default.

See also
NChartTimeAxisTooltip
void com.nchart3d.NChart.NChartTimeAxis.setBeginButtonStateImages ( Bitmap  normal,
Bitmap  pushed 
)
inline

Set images for button "go to the beginning".

Parameters
normal- image for the button's normal state.
pushed- image for the button's pushed state.
void com.nchart3d.NChart.NChartTimeAxis.setEndButtonStateImages ( Bitmap  normal,
Bitmap  pushed 
)
inline

Set images for button "go to the ending".

Parameters
normal- image for the button's normal state.
pushed- image for the button's pushed state.
void com.nchart3d.NChart.NChartTimeAxis.setHandlerImage ( Bitmap  handler)
inline

Set image for the handler of the slider.

Parameters
handler- image for the slider's handler.
void com.nchart3d.NChart.NChartTimeAxis.setHandlerImage ( Context  context,
int  resID 
)
inline

Set image resource for the handler of the slider.

Parameters
context- application context
resID- resource id for the slider's handler.
void com.nchart3d.NChart.NChartTimeAxis.setImages ( Bitmap  beginNormal,
Bitmap  beginPushed,
Bitmap  endNormal,
Bitmap  endPushed,
Bitmap  playNormal,
Bitmap  playPushed,
Bitmap  pauseNormal,
Bitmap  pausePushed,
Bitmap  slider,
Bitmap  handler 
)
inline

Set all images used for time axis at once.

This method automatically adjusts tickSize and tickOffset according to images provided.

Parameters
beginNormal- image for the begin button's normal state.
beginPushed- image for the begin button's pushed state.
endNormal- image for the end button's normal state.
endPushed- image for the end button's pushed state.
playNormal- image for the play button's normal state.
playPushed- image for the play button's pushed state.
pauseNormal- image for the pause button's normal state.
pausePushed- image for the pause button's pushed state.
slider- image for the slider.
handler- image for the slider's handler.
See also
getTickSize()
getTickOffset()
void com.nchart3d.NChart.NChartTimeAxis.setPauseButtonStateImages ( Context  context,
int  normalResID,
int  pushedResID 
)
inline

Set image resources for button "pause".

Parameters
context- application context
normalResID- resource id for the button's normal state image.
pushedResID- resource id for the button's pushed state image.
void com.nchart3d.NChart.NChartTimeAxis.setPlayButtonStateImages ( Context  context,
int  normalResID,
int  pushedResID 
)
inline

Set image resources for button "play".

Parameters
context- application context
normalResID- resource id for the button's normal state image.
pushedResID- resource id for the button's pushed state image.
void com.nchart3d.NChart.NChartTimeAxis.setSliderImage ( Bitmap  slider,
float  leftInset,
float  rightInset 
)
inline

Specify the image for the slider and the cap insets to stretch it.

The cap insets specifies the stretchable caps of the image.

Parameters
slider- image for the slider.
leftInset- left cap inset for the image.
rightInset- right cap inset for the image.
void com.nchart3d.NChart.NChartTimeAxis.setSliderImage ( Context  context,
int  resID,
float  leftInset,
float  rightInset 
)
inline

Specify the image resource for the slider and the cap insets to stretch it.

The cap insets specifies the stretchable caps of the image.

Parameters
context- application context
resID- resource id for the slider image.
leftInset- left cap inset for the image.
rightInset- right cap inset for the image.