All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.text.TextView

java.lang.Object
   |
   +----java.awt.Component
           |
           +----jp.kyasu.awt.KComponent
                   |
                   +----jp.kyasu.awt.text.TextView

public abstract class TextView
extends KComponent
implements Scrollable
The TextView class is an abstract base class that views the TextLayout object.

Version:
20 Nov 1999
Author:
Kazuki YASUMATSU

Variable Index

 o DEFAULT_BACKGROUND
The default background color.
 o DEFAULT_FOREGROUND
The default foreground color.
 o DEFAULT_SELECTION_BACKGROUND
The default selection background color.
 o DEFAULT_SELECTION_FOREGROUND
The default selection foreground color.

Constructor Index

 o TextView(int)
Constructs a text view with the specified line wrapping style.

Method Index

 o addScrollListener(ScrollListener)
Add a listener to recieve scroll events when the value of the scroll component changes.
 o getColumns()
Returns the number of columns.
 o getHBlockIncrement()
Gets the horizontal block value increment for the scrollable object.
 o getHMaximum()
Gets the horizontal maximum value of the scrollable object.
 o getHMinimum()
Gets the horizontal minimum value of the scrollable object.
 o getHUnitIncrement()
Gets the horizontal unit value increment for the scrollable object.
 o getHValue()
Gets the horizontal current value of the scrollable object.
 o getHVisibleAmount()
Gets the horizontal length of the propertional indicator.
 o getLineWrap()
Returns the line wrapping style.
 o getLocationOfText()
Returns the location of the TextLayout object.
 o getMinimumSize()
Returns the minimum size of this view.
 o getPreferredHeight(int)
Returns the preferred height of this view with the specified number of rows.
 o getPreferredSize()
Returns the preferred size of this view.
 o getPreferredSize(int, int)
Returns the preferred size of this view with the specified number of rows and columns.
 o getPreferredWidth(int)
Returns the preferred width of this view with the specified number of columns.
 o getRichText()
Returns the RichText object being viewed.
 o getRows()
Returns the number of rows.
 o getSelectionBackground()
Returns the selection background color.
 o getSelectionForeground()
Returns the selection foreground color.
 o getVBlockIncrement()
Gets the vertical block value increment for the scrollable object.
 o getVMaximum()
Gets the vertical maximum value of the scrollable object.
 o getVMinimum()
Gets the vertical minimum value of the scrollable object.
 o getVUnitIncrement()
Gets the vertical unit value increment for the scrollable object.
 o getVValue()
Gets the vertical current value of the scrollable object.
 o getVVisibleAmount()
Gets the vertical length of the propertional indicator.
 o isFocusTraversable()
Tests if the view can be traversed using Tab or Shift-Tab keyboard focus traversal.
 o isSelectionVisible()
Tests if the selection is visible.
 o removeScrollListener(ScrollListener)
Removes an scroll listener.
 o setBounds(int, int, int, int)
Moves and resizes this view.
 o setHValue(int)
Sets the horizontal current value of the scrollable object.
 o setLineWrap(int)
Sets the line wrapping style.
 o setLocale(Locale)
Sets the locale of this view.
 o setLocationOfText(Point)
Sets the location of the TextLayout object.
 o setSelectionBackground(Color)
Sets the selection background color.
 o setSelectionForeground(Color)
Sets the selection foreground color.
 o setSelectionVisible(boolean)
Makes the selection visible.
 o setVValue(int)
Sets the vertical current value of the scrollable object.

Variables

 o DEFAULT_FOREGROUND
 public static final Color DEFAULT_FOREGROUND
The default foreground color.

 o DEFAULT_BACKGROUND
 public static final Color DEFAULT_BACKGROUND
The default background color.

 o DEFAULT_SELECTION_FOREGROUND
 public static final Color DEFAULT_SELECTION_FOREGROUND
The default selection foreground color.

 o DEFAULT_SELECTION_BACKGROUND
 public static final Color DEFAULT_SELECTION_BACKGROUND
The default selection background color.

Constructors

 o TextView
 public TextView(int lineWrap)
Constructs a text view with the specified line wrapping style.

Parameters:
lineWrap - the line wrapping style.
See Also:
CHAR_WRAP, WORD_WRAP, NO_WRAP

Methods

 o getRichText
 public abstract RichText getRichText()
Returns the RichText object being viewed.

 o getLineWrap
 public int getLineWrap()
Returns the line wrapping style.

See Also:
setLineWrap
 o setLineWrap
 public synchronized void setLineWrap(int lineWrap)
Sets the line wrapping style.

Parameters:
lineWrap - the line wrapping style.
See Also:
getLineWrap, CHAR_WRAP, WORD_WRAP, NO_WRAP
 o setLocale
 public synchronized void setLocale(Locale l)
Sets the locale of this view.

Overrides:
setLocale in class Component
 o isFocusTraversable
 public boolean isFocusTraversable()
Tests if the view can be traversed using Tab or Shift-Tab keyboard focus traversal.

Overrides:
isFocusTraversable in class KComponent
 o getLocationOfText
 public Point getLocationOfText()
Returns the location of the TextLayout object.

See Also:
setLocationOfText
 o setLocationOfText
 public void setLocationOfText(Point p)
Sets the location of the TextLayout object.

See Also:
getLocationOfText
 o isSelectionVisible
 public boolean isSelectionVisible()
Tests if the selection is visible.

See Also:
setSelectionVisible
 o setSelectionVisible
 public synchronized void setSelectionVisible(boolean b)
Makes the selection visible.

See Also:
isSelectionVisible
 o getSelectionForeground
 public Color getSelectionForeground()
Returns the selection foreground color.

See Also:
setSelectionForeground
 o setSelectionForeground
 public synchronized void setSelectionForeground(Color c)
Sets the selection foreground color.

See Also:
getSelectionForeground
 o getSelectionBackground
 public Color getSelectionBackground()
Returns the selection background color.

See Also:
setSelectionBackground
 o setSelectionBackground
 public synchronized void setSelectionBackground(Color c)
Sets the selection background color.

See Also:
getSelectionBackground
 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this view.

Overrides:
getPreferredSize in class KComponent
 o getMinimumSize
 public Dimension getMinimumSize()
Returns the minimum size of this view.

Overrides:
getMinimumSize in class KComponent
 o getPreferredSize
 public Dimension getPreferredSize(int rows,
                                   int columns)
Returns the preferred size of this view with the specified number of rows and columns.

Parameters:
rows - the number of rows.
columns - the number of columns.
Returns:
the preferred size with the specified number of rows and columns.
 o getPreferredWidth
 public int getPreferredWidth(int columns)
Returns the preferred width of this view with the specified number of columns.

Parameters:
columns - the number of columns.
Returns:
the preferred width with the specified number of columns.
 o getPreferredHeight
 public int getPreferredHeight(int rows)
Returns the preferred height of this view with the specified number of rows.

Parameters:
rows - the number of rows.
Returns:
the preferred height with the specified number of rows.
 o getRows
 public int getRows()
Returns the number of rows.

 o getColumns
 public int getColumns()
Returns the number of columns.

 o setBounds
 public synchronized void setBounds(int x,
                                    int y,
                                    int width,
                                    int height)
Moves and resizes this view.

Parameters:
x - The new x-coordinate of this view.
y - The new y-coordinate of this view.
width - The new width of this view.
height - The new height of this view.
Overrides:
setBounds in class KComponent
 o getVMinimum
 public int getVMinimum()
Gets the vertical minimum value of the scrollable object.

See Also:
Scrollable
 o getHMinimum
 public int getHMinimum()
Gets the horizontal minimum value of the scrollable object.

See Also:
Scrollable
 o getVMaximum
 public int getVMaximum()
Gets the vertical maximum value of the scrollable object.

See Also:
Scrollable
 o getHMaximum
 public int getHMaximum()
Gets the horizontal maximum value of the scrollable object.

See Also:
Scrollable
 o getVUnitIncrement
 public int getVUnitIncrement()
Gets the vertical unit value increment for the scrollable object.

See Also:
Scrollable
 o getHUnitIncrement
 public int getHUnitIncrement()
Gets the horizontal unit value increment for the scrollable object.

See Also:
Scrollable
 o getVBlockIncrement
 public int getVBlockIncrement()
Gets the vertical block value increment for the scrollable object.

See Also:
Scrollable
 o getHBlockIncrement
 public int getHBlockIncrement()
Gets the horizontal block value increment for the scrollable object.

See Also:
Scrollable
 o getVVisibleAmount
 public int getVVisibleAmount()
Gets the vertical length of the propertional indicator.

See Also:
Scrollable
 o getHVisibleAmount
 public int getHVisibleAmount()
Gets the horizontal length of the propertional indicator.

See Also:
Scrollable
 o getVValue
 public int getVValue()
Gets the vertical current value of the scrollable object.

See Also:
Scrollable
 o getHValue
 public int getHValue()
Gets the horizontal current value of the scrollable object.

See Also:
Scrollable
 o setVValue
 public void setVValue(int v)
Sets the vertical current value of the scrollable object.

Parameters:
v - the current value.
See Also:
Scrollable
 o setHValue
 public void setHValue(int v)
Sets the horizontal current value of the scrollable object.

Parameters:
v - the current value.
See Also:
Scrollable
 o addScrollListener
 public void addScrollListener(ScrollListener l)
Add a listener to recieve scroll events when the value of the scroll component changes.

Parameters:
l - the listener to recieve events.
See Also:
Scrollable
 o removeScrollListener
 public void removeScrollListener(ScrollListener l)
Removes an scroll listener.

Parameters:
l - the listener being removed.
See Also:
Scrollable

All Packages  Class Hierarchy  This Package  Previous  Next  Index