DESY ACOP Beans Home

com.cosylab.gui.components.range2
Interface TickParameters

All Known Implementing Classes:
AcopSlider, DefaultTickParameters, DialKnob.Renderer, Gauger, SimpleDemoDisplayer, Slider, SliderDisplayer, SliderDisplayerSetter

public interface TickParameters

Defines callback interface that is called when determining optimal tick position.

Version:
$id$
Author:
Ales Pucelj

Method Summary
 java.lang.String formatNumber(double value)
          Formats the input value to a specific print format.
 int measureTick(double position, java.lang.String text)
          Returns size of tick label in pixels.
 

Method Detail

measureTick

int measureTick(double position,
                java.lang.String text)
Returns size of tick label in pixels. Size is determined as distance between maximum extent of the label along the tick axis.

Parameters:
position - relative position of the tick on 0..1.
text - label to display, may be empty string or null.
Returns:
size of tick in pixels.

formatNumber

java.lang.String formatNumber(double value)
Formats the input value to a specific print format. If return value is null use internal format specified by the caller of this method.

Parameters:
value - double to be formatted
Returns:
formatted value


Copyright © 2010. All Rights Reserved.