Class
zebkit.ui.RulerPan
extends <zebkit.ui.Panel> |
<zebkit.ui> |
Simple ruler panel class. The ruler can render minimal and maximal values of the specified range.
zebkit.ui.RulerPan
([o]
)
Parameters:
-
[o]
<String>ruler orientation. Use "horizontal" or "vertical" as the argument value
protected
|
<Integer> | $getRulerSize ( ) |
public | <Number> | getMax ( ) |
public | <Number> | getMin ( ) |
public | void | recalcMetrics ( ) |
public | void | setColor (c) |
public | void | setGap (gap) |
public | void | setLabelsAlignment (a) |
public | void | setLabelsColor (color) |
public | void | setLabelsFont (font) |
public | void | setLabelsRender (r) |
public | void | setOrientation (o) |
public | void | setRange (min, max) |
public | void | setShowLabels (b) |
public | void | setShowStrokes (b) |
public | void | setStrokeSize (strokeSize) |
public | void | showNumbers ([precision]) |
public | void | showPercentage ([precision]) |
public | <Integer> | toLocation (v) |
public | <Number> | toValue (xy) |
protected
<Integer>
$getRulerSize ( )
Get the ruler effective size. The size includes only pixels that are used to be transformed into range values.
Returns:
<Integer>
a ruler size |
public
void
recalcMetrics ( )
Called when the ruler requires its metric recalculation |
public
chainable
setGap (gap )
Set the ruler gap between stroke and labels. Parameters:
|
public
chainable
setLabelsAlignment (a )
Set the ruler labels alignment. Label alignment specifies a side the labels has to be placed relatively stroke. Parameters:
|
public
chainable
setLabelsColor (color )
Set the labels color Parameters:
|
public
chainable
setLabelsFont (font )
Set the labels font Parameters:
|
public
chainable
setLabelsRender (r )
Set the labels render Parameters:
|
public
chainable
setOrientation (o )
Set the ruler orientation Parameters:
|
public
chainable
setShowLabels (b )
Set visibility of labels Parameters:
|
public
chainable
setShowStrokes (b )
Set visibility of strokes Parameters:
|
public
chainable
setStrokeSize (strokeSize )
Set the stroke size. Parameters:
|
public
chainable
showNumbers ([precision] )
Show ruler labels with number. Parameters:
|
public
chainable
showPercentage ([precision] )
Show ruler labels with percentage. Parameters:
|
public
<Integer>
toLocation (v )
Project the given range value to appropriate ruler component coordinate Parameters:
Returns:
<Integer>
coordinate |












public
![]() gap
Gap between stroke and labels |
public
![]() lineWidth
Stroke line width |
public
![]() strokeSize
Stroke line size |