All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.graphics.TextList

java.lang.Object
   |
   +----jp.kyasu.graphics.TextLines
           |
           +----jp.kyasu.graphics.TextLayout
                   |
                   +----jp.kyasu.graphics.TextList

public class TextList
extends TextLayout
The TextList class implements the layout of the RichText object that represents a text list.

Version:
10 Jun 1998
Author:
Kazuki YASUMATSU

Constructor Index

 o TextList(RichText, int[])
Constructs a text list with the specified rich text and column widths.
 o TextList(RichText, int[], Locale)
Constructs a text list with the specified rich text, line wrapping style, column widths, and locale.

Method Index

 o clone()
Returns a clone of this object.
 o draw(Graphics, Point, TextPositionInfo, TextPositionInfo, Color, Color, Color, Color, int, int[])
Draws the specified range of this layout to the specified graphics at the specified location, with the specified colors, width for drawing and selected indices.
 o draw(Graphics, Point, TextPositionInfo, TextPositionInfo, Color, Color, Color, Color, int, int[], boolean)
Draws the specified range of this layout to the specified graphics at the specified location, with the specified colors, width for drawing, selected indices and redraw flag.
 o getColumnWidths()
Returns the column widths.
 o setColumnWidths(int[])
Sets the column widths to be the specified widths.

Constructors

 o TextList
 public TextList(RichText richText,
                 int colWidths[])
Constructs a text list with the specified rich text and column widths.

Parameters:
richText - the rich text to be laid out.
colWidths - the column widths.
 o TextList
 public TextList(RichText richText,
                 int colWidths[],
                 Locale locale)
Constructs a text list with the specified rich text, line wrapping style, column widths, and locale.

Parameters:
richText - the rich text to be laid out.
locale - the locale.
colWidths - the column widths.

Methods

 o getColumnWidths
 public int[] getColumnWidths()
Returns the column widths.

 o setColumnWidths
 public void setColumnWidths(int colWidths[])
Sets the column widths to be the specified widths.

 o clone
 public Object clone()
Returns a clone of this object.

Overrides:
clone in class TextLayout
 o draw
 public void draw(Graphics g,
                  Point offset,
                  TextPositionInfo begin,
                  TextPositionInfo end,
                  Color fgColor,
                  Color bgColor,
                  Color selFgColor,
                  Color selBgColor,
                  int width,
                  int selected[])
Draws the specified range of this layout to the specified graphics at the specified location, with the specified colors, width for drawing and selected indices.

This method is used for drawing the list items.

Parameters:
g - the graphics.
offset - the offset position to draw
begin - the beginning index of this layout to draw, inclusive.
end - the ending index of this layout to draw, exclusive.
fgColor - the foreground color.
bgColor - the background color.
selFgColor - the selection foreground color.
selBgColor - the selection background color.
width - the width for drawing.
selected - the selected indices of the list items.
See Also:
TextListView
 o draw
 public void draw(Graphics g,
                  Point offset,
                  TextPositionInfo begin,
                  TextPositionInfo end,
                  Color fgColor,
                  Color bgColor,
                  Color selFgColor,
                  Color selBgColor,
                  int width,
                  int selected[],
                  boolean redrawBg)
Draws the specified range of this layout to the specified graphics at the specified location, with the specified colors, width for drawing, selected indices and redraw flag.

This method is used for drawing the list items.

Parameters:
g - the graphics.
offset - the offset position to draw
begin - the beginning index of this layout to draw, inclusive.
end - the ending index of this layout to draw, exclusive.
fgColor - the foreground color.
bgColor - the background color.
selFgColor - the selection foreground color.
selBgColor - the selection background color.
width - the width for drawing.
selected - the selected indices of the list items.
redrawBg - if true, fills the background even if the list item is not selected.
See Also:
TextListView

All Packages  Class Hierarchy  This Package  Previous  Next  Index