Class
zebkit.draw.TextRender
mixed with <zebkit.util.Position.Metric> extends <zebkit.draw.BaseTextRender> |
<zebkit.draw> |
Text render that expects and draws a text model or a string as its target
zebkit.draw.TextRender
(text
)
Parameters:
-
text
<String | zebkit.data.TextModel>a text as string or text model object
public | <String> | getLine (r) |
public | <Integer> | getLines ( ) |
private
|
void | invalidate (start, size) |
public | <Integer> | lineWidth (line) |
public | void | paintLine (g, x, y, line, d) |
protected
|
void | paintSelection (g, x, y, w, h, line, d) |
public | void | recalc ( ) |
public | void | setValue (s) |
public | void | textUpdated (e) |
@Override
zebkit.util.Position.Metric
public <Integer> getLines ( )
Get number of lines of target text
Returns:
<Integer>
a number of line in the target text |
private
void
invalidate (start, size )
Invalidate metrics for the specified range of lines. Parameters:
|
public
<Integer>
lineWidth (line )
Get the given text line width in pixels Parameters:
Returns:
<Integer>
a text line width in pixels |
public
void
paintLine (g, x, y, line, d )
Paint the specified text line Parameters:
|
protected
void
paintSelection (g, x, y, w, h, line, d )
Paint the specified text selection of the given line. The area where selection has to be rendered is denoted with the given rectangular area. Parameters:
|
public
void
recalc ( )
Called every time the target text metrics has to be recalculated |
@Override
zebkit.draw.Render
public chainable setValue (s )
Set the text model content Parameters:
|
public
void
textUpdated (e )
Text model update listener handler Parameters:
|