Summ:  Nested 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

 

 

Nested Members Summary
static enum ChartAxisScale.IntervalType
    
Represents type of interval used by ChartAxisScale.

 

 

Fields Summary
static double MARGIN_INTERVAL
    
static double MARGIN_NONE
    
static double MARGIN_POINT
    

 

 

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.
java.lang.Double getInterval()
    
Gets interval used by axis to represent its values.
ChartAxisScale.IntervalType getIntervalType()
    
Gets currently applied interval type.
double getMargin()
    
Gets value indicating whether axis' range will be calculated using margins.
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.
ChartAxisScale.IntervalType 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 getVisibleSize()
    
Gets the visible scale size.
java.lang.Double getZoomPosition()
    
Gets current zoom position for parent axis.
java.lang.Double getZoomSize()
    
Gets current zoom size for parent 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 scroll(double position)
    
Deprecated. setZoomPosition(double)
void setDateRange(java.util.Calendar startDate, java.util.Calendar endDate)
    
Limits axis displaying date range with a specified.
void setDateRange(java.util.Date startDate, java.util.Date endDate)
    
Limits axis displaying date range with a specified.
void setDesiredIntervalCount(int count)
    
Sets amount of desired intervals.
void setInterval(java.lang.Double interval)
    
Sets interval used by axis to represent its values.
void setInterval(java.lang.Double interval, ChartAxisScale.IntervalType intervalType)
    
Sets interval used by axis to represent its values.
void setIntervalType(ChartAxisScale.IntervalType intervalType)
    
Sets interval type that this scale should report to parent axis.
void setInverted(boolean inverted)
    
Indicates whether axis is inverted.
void setMargin(double margin)
    
Sets value indicating whether axis' range will be calculated using margins.
void setMaximum(java.lang.Double max)
    
Sets maximum value of axis range.
void setMinimum(java.lang.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 zoom(double size)
    
Deprecated. zoomToSize(double)
void zoom(double position, double size)
    
Deprecated. setZoom(double,double)
void zoomRange(double start, double end)
    
Deprecated. zoomToRange(double,double)
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

 

See also: Constants

 

 

 

MARGIN_INTERVAL

 

public static final double MARGIN_INTERVAL

 

See also: Constants

 

 

 

MARGIN_POINT

 

public static final double MARGIN_POINT

 

See also: Constants

 

 

 

 

getMargin

 

public double getMargin( )

 

Gets value indicating whether axis' range will be calculated using margins.

 

Returns:
reserved margin space or MARGIN_NONE, MARGIN_INTERVAL, MARGIN_POINT - used constants for identifing margin specific behavior.

 

Since: 1.0
See also: setMargin(double)

 

 

 

setMargin

 

public void setMargin( double margin)

 

Sets value indicating whether axis' range will be calculated using margins.

 

Parameters:
margin-
margin value or MARGIN_NONE, MARGIN_INTERVAL, MARGIN_POINT.

 

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

 

 

 

getRealMinimum

 

public double getRealMinimum( )

 

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

 

Since: 1.0
See also: getRealMaximum()

 

 

 

getRealMaximum

 

public double getRealMaximum( )

 

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

 

Since: 1.0

 

 

 

getRealSize

 

public double getRealSize( )

 

Gets real scale size.

 

Returns:
resulting size as difference between real boundaries.

 

Since: 1.5

 

 

 

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

 

 

 

getVisibleSize

 

public double getVisibleSize( )

 

Gets the visible scale size.

 

Returns:
resulting size as difference between visible boundaries.

 

Since: 1.5.4

 

 

 

getVisibleInterval

 

public double getVisibleInterval( )

 

Gets the visible interval for superior axis.

 

Returns:
visible interval.

 

Since: 1.0

 

 

 

getVisibleIntervalType

 

public ChartAxisScale.IntervalType getVisibleIntervalType( )

 

Gets visible interval type used by this axis scale.

 

Returns:
currently applied interval type.

 

Since: 1.5

 

 

 

setDateRange

 

public void setDateRange( java.util.Date startDate,
java.util.Date endDate)

 

Limits axis displaying date range with a specified.

 

Parameters:
startDate-
starting date value.
endDate-
ending date value.

 

Since: 1.0

 

 

 

setDateRange

 

public void setDateRange( java.util.Calendar startDate,
java.util.Calendar endDate)

 

Limits axis displaying date range with a specified.

 

Parameters:
startDate-
starting date value.
endDate-
ending date value.

 

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( java.lang.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( java.lang.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( java.lang.Double interval)

 

Sets interval used by axis to represent its values.

 

Parameters:
interval-
value of desired interval.

 

Since: 1.0

 

 

 

setInterval

 

public void setInterval( java.lang.Double interval,
ChartAxisScale.IntervalType intervalType)

 

Sets interval used by axis to represent its values.

 

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

 

Since: 1.5

 

 

 

getInterval

 

public java.lang.Double getInterval( )

 

Gets interval used by axis to represent its values.

 

Returns:
value of axis interval.

 

Since: 1.5

 

 

 

setIntervalType

 

public void setIntervalType( ChartAxisScale.IntervalType intervalType)

 

Sets interval type that this scale should report to parent axis.

 

Parameters:
intervalType-
value of desired interval type.

 

Since: 1.5
See also: getIntervalType()

 

 

 

setDesiredIntervalCount

 

public void setDesiredIntervalCount( int count)

 

Sets amount of desired intervals.

 

Parameters:
count-
number of desired axis intervals.

 

Since: 1.5
See also: getDesiredIntervalCount()

 

 

 

getDesiredIntervalCount

 

public int getDesiredIntervalCount( )

 

Gets desired axis intervals count.

 

Returns:
number of desired intervals count.

 

 

 

getIntervalType

 

public ChartAxisScale.IntervalType getIntervalType( )

 

Gets currently applied interval type.

 

Returns:
value of axis interval.

 

Since: 1.5
See also: setInterval(Double,ChartAxisScale.IntervalType)setIntervalType(ChartAxisScale.IntervalType)

 

 

 

getZoomPosition

 

public java.lang.Double getZoomPosition( )

 

Gets current zoom position for parent axis.

 

Returns:
current zoom position value.

 

Since: 1.0
See also: getZoomSize()scroll(double)mulZoom(double)zoom(double)resetZoom()getZoomSize()

 

 

 

getZoomSize

 

public java.lang.Double getZoomSize( )

 

Gets current zoom size for parent axis.

 

Returns:
current zoom size value.

 

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

 

 

 

setZoomPosition

 

public void setZoomPosition( double position)

 

Scrolls superior axis to specified position.

 

Parameters:
position-
required position.

 

Since: 1.5
See also: getZoomPosition()mulZoom(double)zoom(double)resetZoom()getZoomSize()

 

 

 

setZoom

 

public void setZoom( double position,
double size)

 

Zooms superior axis to specified size on current position.

 

Parameters:
size-
zoom size.

 

Since: 1.0
See also: getZoomPosition()scroll(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)zoom(double)scroll(double)resetZoom()getZoomSize()

 

 

 

zoomToFactor

 

public void zoomToFactor( double factor)

 

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

 

Parameters:
factor-
zoom factor for axis.

 

Since: 1.0
See also: mulZoom(double)zoom(double)scroll(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()scroll(double)mulZoom(double)resetZoom()getZoomSize()

 

 

 

scroll

 

public void scroll( double position)

 

Deprecated. setZoomPosition(double)

Scrolls superior axis to specified position.

 

Parameters:
position-
required position.

 

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

 

 

 

zoom

 

public void zoom( double position,
double size)

 

Deprecated. setZoom(double,double)

Zooms and scrolls superior axis to specified size and position.

 

Parameters:
position-
value of required position for axis.
size-
value of zoom required position for axis.

 

Since: 1.0
See also: mulZoom(double)scroll(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: scroll(double)resetZoom()zoom(double)getZoomSize()

 

 

 

zoomRange

 

public void zoomRange( double start,
double end)

 

Deprecated. zoomToRange(double,double)

Zooms superior axis to specified range.

 

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

 

Since: 1.0
See also: mulZoom(double)zoom(double)scroll(double)resetZoom()getZoomSize()

 

 

 

zoom

 

public void zoom( double size)

 

Deprecated. zoomToSize(double)

Zooms superior axis to specified size on current position.

 

Parameters:
size-
zoom size.

 

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

 

 

 

resetZoom

 

public void resetZoom( )

 

Resets the zoom to initial value.

 

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

 

 

 

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.5

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.