Java DTV API 1.0
12-Dec-2008

com.sun.dtv.ui
Interface TextLayoutManager

All Known Implementing Classes:
DefaultTextLayoutManager, SophisticatedTextLayoutManager

public interface TextLayoutManager

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.

See Also:
DefaultTextLayoutManager, SophisticatedTextLayoutManager

Method Summary
 void render(String text, Graphics g, ViewOnlyComponent component, Insets insets)
          Render a string.
 

Method Detail

render

public void render(String text,
                   Graphics g,
                   ViewOnlyComponent component,
                   Insets insets)
Render a string. The passed 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.

Parameters:
text - the string to be rendered
g - 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

Copyright © 2008 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.