net.sourceforge.eclipsetrader.charts
Class Scaler

java.lang.Object
  extended bynet.sourceforge.eclipsetrader.charts.Scaler

public class Scaler
extends java.lang.Object


Constructor Summary
Scaler()
           
 
Method Summary
 double convertToRoundedValue(int y)
           
 double convertToValue(int y)
           
 int convertToY(double val)
           
 int getExtendRange()
           
 int getHeight()
           
 double getHigh()
           
 boolean getLogFlag()
           
 double getLogRange()
           
 double getLogScaleHigh()
           
 double getLow()
           
static double getPriceTick(double value)
          Get the price tick related to the passed as argument.
 java.util.List getScaleArray()
           
static double roundToTick(double value)
          Rounds the given price to the nearest tick.
static double roundToTick(java.lang.Double price)
          Rounds the given price to the nearest tick.
 void set(double scaleHigh, double scaleLow)
           
 void set(int height)
           
 void set(int height, double scaleHigh, double scaleLow, double logScaleHigh, double logRange, boolean logScale)
           
 void setExtendRange(int extendRange)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scaler

public Scaler()
Method Detail

set

public void set(int height,
                double scaleHigh,
                double scaleLow,
                double logScaleHigh,
                double logRange,
                boolean logScale)

set

public void set(int height)

set

public void set(double scaleHigh,
                double scaleLow)

convertToY

public int convertToY(double val)

convertToValue

public double convertToValue(int y)

convertToRoundedValue

public double convertToRoundedValue(int y)

getLogScaleHigh

public double getLogScaleHigh()

getLogRange

public double getLogRange()

getHeight

public int getHeight()

getLogFlag

public boolean getLogFlag()

getHigh

public double getHigh()

getLow

public double getLow()

getScaleArray

public java.util.List getScaleArray()

setExtendRange

public void setExtendRange(int extendRange)

getExtendRange

public int getExtendRange()

roundToTick

public static double roundToTick(java.lang.Double price)
Rounds the given price to the nearest tick.

Parameters:
price - The price value
Returns:
The rounded price

roundToTick

public static double roundToTick(double value)
Rounds the given price to the nearest tick.

Parameters:
value - The price value
Returns:
The rounded price

getPriceTick

public static double getPriceTick(double value)
Get the price tick related to the passed as argument.

Parameters:
value - The price value
Returns:
The price tick