|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The aim of this interface is to define functionality for the layout of strings and their rendering on the screen. The string to be rendered may contain besides its actual content also meta information e.g. about font, color, style and text formatting. It is out of scope of this interface though to force appropriate functionality for this. An implementing default text layout manager could implement just the render method as requested by this interface, while more sophisticated layout managers could add many methods in order to process meta information, e.g.
DefaultTextLayoutManager,
SophisticatedTextLayoutManager| Method Summary | |
void |
render(String text,
Graphics g,
ViewOnlyComponent component,
Insets insets)
Render a string. |
| Method Detail |
public void render(String text,
Graphics g,
ViewOnlyComponent component,
Insets insets)
ViewOnlyComponent can be used to determine any additional information
needed in order to render the string properly (e.g. Font, Color etc.),
if the TextLayoutManagerClass implementing this interface does not
provide additional information for that.
The ViewOnlyComponent also
defines the layout area by its bounds, while of course the provided
insets have also to be taken into account if not null. The clipping
rectangle of the Graphics object should not be subject
of change by the TextLayoutManager, though.
text - the string to be renderedg - the graphics context. This includes of course also a clipping
rectangle, which should be respected as borders within which the
rendering is permitted. An insets parameter not equal to null must be
additionally taken into account.component - the ViewOnlyComponent into which to render.insets - the insets to define the area in which the text should be
laid out. This parameter can also be null: in this case the
ViewOnlyComponent parameter
defines the borders by its bounds.
|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||