rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvConstantScaleStepsUpdater Class Reference

Class for computing the graduations of a scale. More...

#include <ilviews/charts/scaledis.h>

Inheritance diagram for IlvConstantScaleStepsUpdater:
IlvScaleStepsUpdater IlvNamedProperty IlvAutoScaleStepsUpdater

List of all members.

Public Member Functions

 IlvConstantScaleStepsUpdater (IlvSingleScaleDisplayer *scale, IlDouble stepUnit, IlDouble subStepUnit=0.)
 Constructor.
 IlvConstantScaleStepsUpdater (IlvSingleScaleDisplayer *scale, IlUInt stepsCount, IlUInt subStepsCount=0)
 Constructor.
 IlvConstantScaleStepsUpdater (IlvSingleScaleDisplayer *scale)
 Constructor.
virtual IlBoolean checkRange (IlvCoordInterval &range) const
 Checks whether an interval is valid with respect to the step definition.
void fixStepsCount (IlUInt stepsCount, IlUInt subStepsCount)
 Sets the number of steps and the number of substeps between two steps.
void fixStepUnit (IlDouble stepUnit, IlDouble subStepUnit)
 Sets the step unit and the substep unit.
IlDouble getFirstStepData () const
 Returns the data value associated with the first major step.
IlDouble getLastStepData () const
 Returns the data value associated with the last major step.
IlUInt getStepsCount () const
 Returns the number of major steps.
virtual void getStepSubStepValues (const IlvProjectorArea &area, IlUInt &stepsCount, IlDouble *&stepValues, IlUInt &subStepsCount, IlDouble *&subStepValues) const
 Computes and returns the step and substep values for the associated scale.
IlDouble getStepUnit () const
 Returns the step unit.
IlUInt getSubStepsCount () const
 Returns the number of minor steps between two major steps.
IlDouble getSubStepUnit () const
 Returns the substep unit.
IlBoolean isFirstStepDataDefined () const
 Indicates whether a data value is associated with the first major step.
IlBoolean isLastStepDataDefined () const
 Indicates whether a data value is associated with the last major step.
void setFirstStepData (IlDouble value)
 Sets the data value associated with the first major step.
void setLastStepData (IlDouble value)
 Sets the data value associated with the last major step.

Detailed Description

Class for computing the graduations of a scale.

Library: ilvcharts

IlvConstantScaleStepsUpdater is a subclass of IlvScaleStepsUpdater that allows you to compute steps and substeps having a fixed spacing.

See also:
IlvScaleStepsUpdater, IlvSingleScaleDisplayer.

Constructor & Destructor Documentation

IlvConstantScaleStepsUpdater::IlvConstantScaleStepsUpdater ( IlvSingleScaleDisplayer scale  ) 

Constructor.

Initializes a new IlvConstantScaleStepsUpdater object.

Parameters:
scale The scale associated with the current scale steps updater.
IlvConstantScaleStepsUpdater::IlvConstantScaleStepsUpdater ( IlvSingleScaleDisplayer scale,
IlUInt  stepsCount,
IlUInt  subStepsCount = 0 
)

Constructor.

Initializes a new IlvConstantScaleStepsUpdater object with a fixed number of steps and substeps.

Parameters:
scale The scale associated with the current scale steps updater.
stepsCount The number of steps defined for the scale scale .
subStepsCount The number of substeps defined for the scale scale.
IlvConstantScaleStepsUpdater::IlvConstantScaleStepsUpdater ( IlvSingleScaleDisplayer scale,
IlDouble  stepUnit,
IlDouble  subStepUnit = 0. 
)

Constructor.

Initializes a new IlvConstantScaleStepsUpdater object with fixed step and substep units.

Parameters:
scale The scale associated with the current scale steps updater.
stepUnit The step unit defined for the scale scale.
subStepUnit The substep unit defined for the scale scale.

Member Function Documentation

virtual IlBoolean IlvConstantScaleStepsUpdater::checkRange ( IlvCoordInterval range  )  const [virtual]

Checks whether an interval is valid with respect to the step definition.

Called whenever the range of the coordinate associated with the current scale is modified. With this method, you can modify the interval range so that it becomes consistent with the steps definition. The default implementation simply returns IlTrue.

Parameters:
range The range to check.
Returns:
IlFalse if the range was not correct and had to be modified, and IlTrue otherwise.

Reimplemented from IlvScaleStepsUpdater.

void IlvConstantScaleStepsUpdater::fixStepsCount ( IlUInt  stepsCount,
IlUInt  subStepsCount 
)

Sets the number of steps and the number of substeps between two steps.

Allows you to define the step and substep values by specifying the exact number of steps and substeps. The resulting step unit will depend on the coordinate range shown by the associated scale.

Parameters:
stepsCount The fixed number of steps. This number must be at least equal to 1.
subStepsCount The fixed number of substeps between two steps.
See also:
fixStepUnit.
void IlvConstantScaleStepsUpdater::fixStepUnit ( IlDouble  stepUnit,
IlDouble  subStepUnit 
)

Sets the step unit and the substep unit.

Allows you to define the steps and substeps values by specifying the step and the substep unit. The number of resulting steps and substeps will depend on the coordinate range shown by the associated scale.

Parameters:
stepUnit The step unit. This value must be positive.
subStepUnit The substep unit. This value must be positive and less than stepUnit. A value equal to 0 means that there are no substeps.
See also:
fixStepsCount.
IlDouble IlvConstantScaleStepsUpdater::getFirstStepData (  )  const

Returns the data value associated with the first major step.

Returns:
The value associated with the first major step.
See also:
IlvConstantScaleStepsUpdater::setFirstStepData.
IlDouble IlvConstantScaleStepsUpdater::getLastStepData (  )  const

Returns the data value associated with the last major step.

Returns:
The value associated with the last major step.
See also:
IlvConstantScaleStepsUpdater::setLastStepData.
IlUInt IlvConstantScaleStepsUpdater::getStepsCount (  )  const

Returns the number of major steps.

Returns:
The number of major steps.
See also:
IlvConstantScaleStepsUpdater::fixStepsCount.
virtual void IlvConstantScaleStepsUpdater::getStepSubStepValues ( const IlvProjectorArea &  area,
IlUInt stepsCount,
IlDouble *&  stepValues,
IlUInt subStepsCount,
IlDouble *&  subStepValues 
) const [virtual]

Computes and returns the step and substep values for the associated scale.

Parameters:
area The data area definition. This data area definition can be retrieved with the IlvChartGraphic::getProjectorArea method.
stepsCount Returns the number of major steps.
stepValues Returns the values associated with the major steps.
subStepsCount Returns the number of minor steps.
subStepValues Returns the values associated with the minor steps.

Implements IlvScaleStepsUpdater.

Reimplemented in IlvAutoScaleStepsUpdater.

IlDouble IlvConstantScaleStepsUpdater::getStepUnit (  )  const

Returns the step unit.

Returns:
The step unit.
See also:
IlvConstantScaleStepsUpdater::fixStepUnit.
IlUInt IlvConstantScaleStepsUpdater::getSubStepsCount (  )  const

Returns the number of minor steps between two major steps.

Returns:
The number of minor steps between two major steps.
See also:
IlvConstantScaleStepsUpdater::fixStepsCount.
IlDouble IlvConstantScaleStepsUpdater::getSubStepUnit (  )  const

Returns the substep unit.

Returns:
The substep unit.
See also:
IlvConstantScaleStepsUpdater::fixStepUnit.
IlBoolean IlvConstantScaleStepsUpdater::isFirstStepDataDefined (  )  const

Indicates whether a data value is associated with the first major step.

Returns:
IlTrue if an associated value exists and IlFalse otherwise.
See also:
IlvConstantScaleStepsUpdater::setFirstStepData.
IlBoolean IlvConstantScaleStepsUpdater::isLastStepDataDefined (  )  const

Indicates whether a data value is associated with the last major step.

Returns:
IlTrue if an associated value exists and IlFalse otherwise.
See also:
IlvConstantScaleStepsUpdater::setLastStepData.
void IlvConstantScaleStepsUpdater::setFirstStepData ( IlDouble  value  ) 

Sets the data value associated with the first major step.

This method lets you define which value should be associated with the first major step of the scale. If this data is not defined, the first step will be drawn for the minimum value of the coordinate range represented by the associated scale.

Parameters:
value The value for the first major step.
void IlvConstantScaleStepsUpdater::setLastStepData ( IlDouble  value  ) 

Sets the data value associated with the last major step.

This method lets you define which value should be associated with the last major step of the scale. If this data is not defined, the last step will be drawn for the maximum value of the coordinate range represented by the associated scale.

Parameters:
value The value for the last major step.

© Copyright 2012, 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.