DESY ACOP Beans Home

com.cosylab.gui.components.range2
Class LinearTickCalculator

java.lang.Object
  extended by com.cosylab.gui.components.range2.LinearTickCalculator
All Implemented Interfaces:
TickCalculator

public class LinearTickCalculator
extends java.lang.Object
implements TickCalculator

Uses Range to find optimal tick distribution for LinearRange.

Version:
$id$
Author:
Nejc Kosnik

Constructor Summary
LinearTickCalculator(int tickSpacing, boolean boundTicksVisible)
          Creates a new LinearTickCollector object.
 
Method Summary
 Tick[] calculateTicks(int length, Range range, RangedValue rangedValue)
          Calculates ticks using some default TickParameters.
 Tick[] calculateTicks(int length, TickParameters measurer, Range range, RangedValue rangedValue)
          Calculates ticks using the given TickParameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearTickCalculator

public LinearTickCalculator(int tickSpacing,
                            boolean boundTicksVisible)
Creates a new LinearTickCollector object.

Parameters:
tickSpacing - Minimum space between minor ticks.
boundTicksVisible - a flag indicating whether the range's bounds should be visible
Method Detail

calculateTicks

public Tick[] calculateTicks(int length,
                             Range range,
                             RangedValue rangedValue)
Description copied from interface: TickCalculator
Calculates ticks using some default TickParameters.

Specified by:
calculateTicks in interface TickCalculator
Parameters:
length - the available space for ticks in the displayer
range - range which provides transformation to absolute/relative values
rangedValue - the value bounds
Returns:

calculateTicks

public Tick[] calculateTicks(int length,
                             TickParameters measurer,
                             Range range,
                             RangedValue rangedValue)
Description copied from interface: TickCalculator
Calculates ticks using the given TickParameters.

Specified by:
calculateTicks in interface TickCalculator
Parameters:
length - the available space for ticks in the displayer
measurer - TickParameters used to measure ticks
range - range which provides transformation to absolute/relative values
rangedValue - the value bounds
Returns:


Copyright © 2010. All Rights Reserved.