org.zaval.lw
Class LwAdvTextRender
java.lang.Object
|
+--org.zaval.util.ValidationObject
|
+--org.zaval.lw.LwView
|
+--org.zaval.lw.LwRender
|
+--org.zaval.lw.LwTextRender
|
+--org.zaval.lw.LwAdvTextRender
- All Implemented Interfaces:
- java.util.EventListener, TextListener, Validationable
- public class LwAdvTextRender
- extends LwTextRender
The class extends LwTextRender to support text block painting. The render checks if the
owner drawable object implements TxtSelectionInfo interface and use the interface to
render text block, otherwise the render functionality is the same to LwTextRender.
Method Summary |
protected void |
paintLine(java.awt.Graphics g,
int x,
int y,
int line,
Drawable d)
Invoked to render a line with the specified index, at the given location, graphics context and
owner component. |
protected void |
paintSelection(java.awt.Graphics g,
int x,
int y,
int line,
Drawable d)
Invoked by paintLine method to render selection block. |
Methods inherited from class org.zaval.lw.LwTextRender |
calcPreferredSize, getAscent, getFont, getFontMetrics, getForeground, getLine, getLineHeight, getLineIndent, getText, getTextModel, invalidate, invalidate, lineWidth, ownerChanged, paint, recalc, setFont, setForeground, stringWidth, substrWidth, targetWasChanged, textInserted, textRemoved, textUpdated |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LwAdvTextRender
public LwAdvTextRender(TextModel text)
- Constructs the render with the specified target text model.
- Parameters:
text
- the specified target text model.
paintLine
protected void paintLine(java.awt.Graphics g,
int x,
int y,
int line,
Drawable d)
- Description copied from class:
LwTextRender
- Invoked to render a line with the specified index, at the given location, graphics context and
owner component. The method can be overrided to provide another line painting algorithm.
- Overrides:
paintLine
in class LwTextRender
- Following copied from class:
org.zaval.lw.LwTextRender
- Parameters:
g
- the graphics context.x
- the x coordinate of the text line location.y
- the y coordinate of the text line location.line
- the specified line index.d
- the specified owner component that uses the render.
paintSelection
protected void paintSelection(java.awt.Graphics g,
int x,
int y,
int line,
Drawable d)
- Invoked by
paintLine
method to render selection block.
- Parameters:
g
- the graphics context.x
- the x coordinate of the text line location.y
- the y coordinate of the text line location.line
- the specified line index.d
- the specified owner component that uses the render.
Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org