All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.text.TextCaret

java.lang.Object
   |
   +----jp.kyasu.awt.text.TextCaret

public class TextCaret
extends Object
implements ActionListener, Serializable
The TextCaret class implements a caret showing in the TextEditView object.

Version:
16 Dec 1998
Author:
Kazuki YASUMATSU
See Also:
TextEditView

Variable Index

 o BAR_CARET
The caret style constant for the bar caret.
 o BLINK_INTERVAL
The default interval of blinking.
 o DEFAULT_CARET_COLOR
The default caret color.
 o DEFAULT_CARET_STYLE
The default caret style.
 o DEFAULT_DO_BLINK
The default flag that determines to blink the caret.
 o HAT_CARET
The caret style constant for the hat caret.

Constructor Index

 o TextCaret()
Constructs a text caret with the default style and the default flag determining to do blink.
 o TextCaret(boolean)
Constructs a text caret with the default style and the specified flag determining to do blink.
 o TextCaret(int)
Constructs a text caret with the specified style and the default flag determining to do blink.
 o TextCaret(int, boolean)
Constructs a text caret with the specified style and flag determining to do blink.

Method Index

 o actionPerformed(ActionEvent)
Invoked when a timer action occurs.
 o doBlink()
Tests if this caret does blinking.
 o getStyle()
Returns the style of this caret.
 o hideCaret(Graphics, Point, TextPositionInfo, Color)
Hides this caret with the specified graphics, offset, text position, and color.
 o isBlinking()
Tests if this caret is blinking.
 o showCaret(Graphics, Point, TextPositionInfo, Color)
Shows this caret with the specified graphics, offset, text position, and color.
 o start()
Starts the blinking.
 o stop()
Stops the blinking.

Variables

 o BAR_CARET
 public static final int BAR_CARET
The caret style constant for the bar caret.

 o HAT_CARET
 public static final int HAT_CARET
The caret style constant for the hat caret.

 o DEFAULT_CARET_STYLE
 public static final int DEFAULT_CARET_STYLE
The default caret style.

 o DEFAULT_CARET_COLOR
 public static final Color DEFAULT_CARET_COLOR
The default caret color.

 o DEFAULT_DO_BLINK
 public static final boolean DEFAULT_DO_BLINK
The default flag that determines to blink the caret.

 o BLINK_INTERVAL
 public static final int BLINK_INTERVAL
The default interval of blinking.

Constructors

 o TextCaret
 public TextCaret()
Constructs a text caret with the default style and the default flag determining to do blink.

 o TextCaret
 public TextCaret(int style)
Constructs a text caret with the specified style and the default flag determining to do blink.

Parameters:
style - the caret style.
 o TextCaret
 public TextCaret(boolean doBlink)
Constructs a text caret with the default style and the specified flag determining to do blink.

Parameters:
doBlink - the flag determining to do blink.
 o TextCaret
 public TextCaret(int style,
                  boolean doBlink)
Constructs a text caret with the specified style and flag determining to do blink.

Parameters:
style - the caret style.
doBlink - the flag determining to do blink.

Methods

 o doBlink
 public boolean doBlink()
Tests if this caret does blinking.

 o getStyle
 public int getStyle()
Returns the style of this caret.

 o actionPerformed
 public void actionPerformed(ActionEvent e)
Invoked when a timer action occurs.

 o start
 public synchronized void start()
Starts the blinking.

 o stop
 public synchronized void stop()
Stops the blinking.

 o isBlinking
 public synchronized boolean isBlinking()
Tests if this caret is blinking.

 o showCaret
 public synchronized void showCaret(Graphics g,
                                    Point offset,
                                    TextPositionInfo posInfo,
                                    Color caretColor)
Shows this caret with the specified graphics, offset, text position, and color.

Parameters:
g - the graphics object.
offset - the offset of the graphics object.
posInfo - the text position to show the caret.
caretColor - the caret color.
 o hideCaret
 public synchronized void hideCaret(Graphics g,
                                    Point offset,
                                    TextPositionInfo posInfo,
                                    Color caretColor)
Hides this caret with the specified graphics, offset, text position, and color.

Parameters:
g - the graphics object.
offset - the offset of the graphics object.
posInfo - the text position to hide the caret.
caretColor - the caret color.

All Packages  Class Hierarchy  This Package  Previous  Next  Index