Summ:  Fields Methods    Details:  Fields Methods      Class:  Constants Prev Next
com.artfulbits.aiCharts.Base
Class ChartAxisScale

java.lang.Object com.artfulbits.aiCharts.Base.ChartAxisScale

Declaration: public final class ChartAxisScale extends Object

 

Represents the scaling class for superior ChartAxis.

 

Since: 1.0

 

 

Fields Summary
static int INTERVAL_DAYS
    
Axis interval will be determined in days.
static int INTERVAL_DOUBLE
    
Double values will be used for axis interval.
static int INTERVAL_HOURS
    
Axis interval will be determined in hours.
static int INTERVAL_MILLISECONDS
    
Axis interval will be determined in milliseconds.
static int INTERVAL_MINUTES
    
Axis interval will be determined in minutes.
static int INTERVAL_MOUNTHS
    
Axis interval will be determined in months.
static int INTERVAL_SECONDS
    
Axis interval will be determined in seconds.
static int INTERVAL_YEARS
    
Axis interval will be determined in years.
static double MARGIN_INTERVAL
    
Axis range will be rounded to interval.
static double MARGIN_NONE
    
No margins used.
static double MARGIN_POINTS
    
Axis range will be increased on minimal distance between points.

 

 

Methods Summary
double coefficientToValue(double value)
    
Converts absolute portion of axis to ranged value.
boolean contains(double value)
    
Determines whether specified value falls into current visible range.
int getDesiredIntervalCount()
    
Gets desired axis intervals count.
double getInterval()
    
Gets interval used by axis to represent its values.
int getIntervalType()
    
Gets interval used by axis to represent its values.
double getMargin()
    
Gets value what margin will be used for range calculation.
double getRealMaximum()
    
Gets maximum value that is displayed by axis disregarding any zooming or scrolling.
double getRealMinimum()
    
Gets minimum value that is displayed by axis disregarding any zooming or scrolling.
double getRealSize()
    
Gets real scale size.
double getVisibleInterval()
    
Gets the visible interval for superior axis.
double getVisibleIntervalType()
    
Gets visible interval type used by this axis scale.
double getVisibleMaximum()
    
Gets the visible maximum for superior axis.
double getVisibleMinimum()
    
Gets the visible minimum for superior axis.
double getZoomPosition()
    
Gets current zoom position for superior axis.
double getZoomSize()
    
Gets current zoom size for superior axis.
boolean isInverted()
    
Indicates whether axis is inverted.
void mulZoom(double scale)
    
Zooms center of superior axis to specified scale.
void resetZoom()
    
Resets the zoom to initial value.
void setDesiredIntervalCount(int intervalCount)
    
Sets amount of desired intervals.
void setInterval(double interval)
    
Sets interval used by axis to represent its values.
void setInterval(double interval, int intervalType)
    
Sets interval used by axis to represent its values.
void setIntervalType(int intervalType)
    
Sets interval used by axis to represent its values.
void setInverted(boolean inverted)
    
Indicates whether axis is inverted.
void setMargin(double margin)
    
Sets margin that axis scale should use for range calculations.
void setMaximum(double max)
    
Sets maximum value of axis range.
void setMinimum(double min)
    
Sets minimal value of axis range.
void setRange(double min, double max)
    
Limits axis displaying range with a specified.
void setZoom(double position, double size)
    
Zooms superior axis to specified size on current position.
void setZoomPosition(double position)
    
Scrolls superior axis to specified position.
double valueToCoefficient(double value)
    
Converts ranged axis value to absolute portion of axis.
void zoomToFactor(double factor)
    
Zooms superior axis to specified factor (0...1).
void zoomToRange(double start, double end)
    
Zooms superior axis to specified range.
void zoomToSize(double size)
    
Zooms superior axis to specified size on current position.

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

MARGIN_NONE

 

public static final double MARGIN_NONE

 

No margins used.

 

Since: 1.0
See also: Constants

 

 

 

MARGIN_INTERVAL

 

public static final double MARGIN_INTERVAL

 

Axis range will be rounded to interval.

 

Since: 1.0
See also: Constants

 

 

 

MARGIN_POINTS

 

public static final double MARGIN_POINTS

 

Axis range will be increased on minimal distance between points. Works only for X axes, otherwise - rounded to interval

 

Since: 1.0
See also: Constants

 

 

 

INTERVAL_DOUBLE

 

public static final int INTERVAL_DOUBLE

 

Double values will be used for axis interval.

 

Since: 1.0
See also: Constants

 

 

 

INTERVAL_MILLISECONDS

 

public static final int INTERVAL_MILLISECONDS

 

Axis interval will be determined in milliseconds.

 

Since: 1.0
See also: setInterval(double,int)setIntervalType(int)Constants

 

 

 

INTERVAL_SECONDS

 

public static final int INTERVAL_SECONDS

 

Axis interval will be determined in seconds.

 

Since: 1.0
See also: setInterval(double,int)setIntervalType(int)Constants

 

 

 

INTERVAL_MINUTES

 

public static final int INTERVAL_MINUTES

 

Axis interval will be determined in minutes.

 

Since: 1.0
See also: setInterval(double,int)setIntervalType(int)Constants

 

 

 

INTERVAL_HOURS

 

public static final int INTERVAL_HOURS

 

Axis interval will be determined in hours.

 

Since: 1.0
See also: setInterval(double,int)setIntervalType(int)Constants

 

 

 

INTERVAL_DAYS

 

public static final int INTERVAL_DAYS

 

Axis interval will be determined in days.

 

Since: 1.0
See also: setInterval(double,int)setIntervalType(int)Constants

 

 

 

INTERVAL_MOUNTHS

 

public static final int INTERVAL_MOUNTHS

 

Axis interval will be determined in months.

 

Since: 1.0
See also: setInterval(double,int)setIntervalType(int)Constants

 

 

 

INTERVAL_YEARS

 

public static final int INTERVAL_YEARS

 

Axis interval will be determined in years.

 

Since: 1.0
See also: setInterval(double,int)setIntervalType(int)Constants

 

 

 

 

getMargin

 

public double getMargin( )

 

Gets value what margin will be used for range calculation.

 

Returns:
range margin.

 

Since: 1.0
See also: setMargin(double)

 

 

 

setMargin

 

public void setMargin( double margin)

 

Sets margin that axis scale should use for range calculations.

 

Parameters:
margin-
value of range margin.

 

Since: 1.0

 

 

 

setInverted

 

public void setInverted( boolean inverted)

 

Indicates whether axis is inverted.

 

Parameters:
inverted-
the inverted to set

 

Since: 1.0

 

 

 

isInverted

 

public boolean isInverted( )

 

Indicates whether axis is inverted.

 

Returns:
inverted is inverted.

 

Since: 1.0

 

 

 

setDesiredIntervalCount

 

public void setDesiredIntervalCount( int intervalCount)

 

Sets amount of desired intervals.

 

Parameters:
intervalCount-
number of desired axis intervals.

 

Since: 1.0
See also: getDesiredIntervalCount()

 

 

 

getDesiredIntervalCount

 

public int getDesiredIntervalCount( )

 

Gets desired axis intervals count.

 

Returns:
number of desired intervals count.

 

 

 

getRealMinimum

 

public double getRealMinimum( )

 

Gets minimum value that is displayed by axis disregarding any zooming or scrolling.

 

Returns:
real axis minimum.

 

Since: 1.0
See also: getRealMaximum()

 

 

 

getRealMaximum

 

public double getRealMaximum( )

 

Gets maximum value that is displayed by axis disregarding any zooming or scrolling.

 

Returns:
real axis maximum.

 

Since: 1.0

 

 

 

getRealSize

 

public double getRealSize( )

 

Gets real scale size.

 

Returns:
resulting size as difference between real boundaries.

 

Since: 1.0

 

 

 

getVisibleMinimum

 

public double getVisibleMinimum( )

 

Gets the visible minimum for superior axis.

 

Returns:
visible minimum.

 

Since: 1.0

 

 

 

getVisibleMaximum

 

public double getVisibleMaximum( )

 

Gets the visible maximum for superior axis.

 

Returns:
visible maximum.

 

Since: 1.0

 

 

 

getVisibleInterval

 

public double getVisibleInterval( )

 

Gets the visible interval for superior axis.

 

Returns:
visible interval.

 

Since: 1.0

 

 

 

getVisibleIntervalType

 

public double getVisibleIntervalType( )

 

Gets visible interval type used by this axis scale.

 

Returns:
currently applied interval type.

 

Since: 1.0

 

 

 

setRange

 

public void setRange( double min,
double max)

 

Limits axis displaying range with a specified.

 

Parameters:
min-
minimum value that is visible on axis.
max-
maximum value that is visible on axis.

 

Since: 1.0

 

 

 

setMinimum

 

public void setMinimum( double min)

 

Sets minimal value of axis range. Set a null to enable auto calculation.

 

Parameters:
min-
minimum value that is visible on axis.

 

Since: 1.0

 

 

 

setMaximum

 

public void setMaximum( double max)

 

Sets maximum value of axis range. Set a null to enable auto calculation.

 

Parameters:
max-
maximum value that is visible on axis.

 

Since: 1.0

 

 

 

setInterval

 

public void setInterval( double interval)

 

Sets interval used by axis to represent its values.

 

Parameters:
interval-
value of desired interval.

 

Since: 1.0

 

 

 

setInterval

 

public void setInterval( double interval,
int intervalType)

 

Sets interval used by axis to represent its values.

 

Parameters:
interval-
value of desired interval.
intervalType-
desired interval type.

 

Since: 1.0

 

 

 

getInterval

 

public double getInterval( )

 

Gets interval used by axis to represent its values.

 

Returns:
value of axis interval.

 

Since: 1.0

 

 

 

setIntervalType

 

public void setIntervalType( int intervalType)

 

Sets interval used by axis to represent its values.

 

Parameters:
intervalType-
value of desired interval.

 

Since: 1.0

 

 

 

getIntervalType

 

public int getIntervalType( )

 

Gets interval used by axis to represent its values.

 

Returns:
value of axis interval.

 

Since: 1.0

 

 

 

valueToCoefficient

 

public double valueToCoefficient( double value)

 

Converts ranged axis value to absolute portion of axis.

 

Parameters:
value-
value related to axis range.
Returns:
absolute portion value on axis.

 

Since: 1.0
See also: coefficientToValue(double)

 

 

 

coefficientToValue

 

public double coefficientToValue( double value)

 

Converts absolute portion of axis to ranged value.

 

Parameters:
value-
absolute portion of axis.
Returns:
ranged value.

 

Since: 1.0
See also: valueToCoefficient(double)

 

 

 

contains

 

public boolean contains( double value)

 

Determines whether specified value falls into current visible range.

 

Parameters:
value-
target value.
Returns:
true if visible interval contains specified value, otherwise false.

 

Since: 1.0

 

 

 

getZoomPosition

 

public double getZoomPosition( )

 

Gets current zoom position for superior axis.

 

Returns:
current zoom position value.

 

Since: 1.0
See also: getZoomSize()setZoomPosition(double)mulZoom(double)zoomToSize(double)resetZoom()getZoomSize()

 

 

 

setZoomPosition

 

public void setZoomPosition( double position)

 

Scrolls superior axis to specified position.

 

Parameters:
position-
required position.

 

Since: 1.0
See also: getZoomPosition()mulZoom(double)zoomToSize(double)resetZoom()getZoomSize()

 

 

 

getZoomSize

 

public double getZoomSize( )

 

Gets current zoom size for superior axis.

 

Returns:
current zoom size value.

 

Since: 1.0
See also: getZoomPosition()setZoomPosition(double)mulZoom(double)zoomToSize(double)resetZoom()getZoomSize()

 

 

 

setZoom

 

public void setZoom( double position,
double size)

 

Zooms superior axis to specified size on current position.

 

Parameters:
position-
desired zoom position.
size-
zoom size.

 

Since: 1.0
See also: getZoomPosition()setZoomPosition(double)mulZoom(double)resetZoom()getZoomSize()

 

 

 

zoomToRange

 

public void zoomToRange( double start,
double end)

 

Zooms superior axis to specified range.

 

Parameters:
start-
start value.
end-
end value.

 

Since: 1.0
See also: mulZoom(double)zoomToSize(double)setZoomPosition(double)resetZoom()getZoomSize()

 

 

 

zoomToFactor

 

public void zoomToFactor( double factor)

 

Zooms superior axis to specified factor (0...1).

 

Parameters:
factor-
factor value.

 

Since: 1.0
See also: mulZoom(double)zoomToSize(double)setZoomPosition(double)resetZoom()getZoomSize()

 

 

 

zoomToSize

 

public void zoomToSize( double size)

 

Zooms superior axis to specified size on current position.

 

Parameters:
size-
zoom size.

 

Since: 1.0
See also: getZoomPosition()setZoomPosition(double)mulZoom(double)resetZoom()getZoomSize()

 

 

 

mulZoom

 

public void mulZoom( double scale)

 

Zooms center of superior axis to specified scale.

 

Parameters:
scale-
required scale.

 

Since: 1.0
See also: setZoomPosition(double)resetZoom()zoomToSize(double)getZoomSize()

 

 

 

resetZoom

 

public void resetZoom( )

 

Resets the zoom to initial value.

 

Since: 1.0
See also: getZoomPosition()mulZoom(double)zoomToSize(double)getZoomSize()

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.