All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.TextField

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----jp.kyasu.awt.KContainer
                           |
                           +----jp.kyasu.awt.EventProxyContainer
                                   |
                                   +----jp.kyasu.awt.TextComponent
                                           |
                                           +----jp.kyasu.awt.TextField

public class TextField
extends TextComponent
TextField is a component that allows the editing of a single line of text.

Version:
31 Aug 1998
Author:
Kazuki YASUMATSU

Variable Index

 o DEFAULT_FIELD_STYLE
The default rich text style for the text field.

Constructor Index

 o TextField()
Constructs a new text field.
 o TextField(int)
Constructs a new TextField with the specified number of columns.
 o TextField(RichText)
Constructs a new text field initialized with the specified rich text.
 o TextField(RichText, int)
Constructs a new text field initialized with the specified rich text to be displayed, and wide enough to hold the specified number of characters.
 o TextField(String)
Constructs a new text field initialized with the specified string.
 o TextField(String, int)
Constructs a new text field initialized with the specified string to be displayed, and wide enough to hold the specified number of characters.
 o TextField(TextEditModel)
Constructs a new text field with the specified model.
 o TextField(TextEditModel, int)
Constructs a new text field with the specified model and wide enough to hold the specified number of characters.
 o TextField(TextEditModel, int, VBorder)
Constructs a new text field with the specified model, wide enough to hold the specified number of characters, and border visual.

Method Index

 o addActionListener(ActionListener)
Adds the specified action listener to recieve action events from this text field.
 o echoCharIsSet()
Indicates whether or not this text field has a character set for echoing.
 o getEchoChar()
Returns the character that is to be used for echoing.
 o getMinimumSize()
Returns the minumum dimensions for this text field.
 o getMinimumSize(int)
Returns the minumum dimensions for a text field with the specified number of columns.
 o getPreferredSize()
Returns the preferred size of this text field.
 o getPreferredSize(int)
Returns the preferred size of this text field with the specified number of columns.
 o getPreferredSize(int, int)
Determines the preferred size of a text component with the specified number of rows and columns.
 o getScrollbarThickness()
Returns the thickness of the scroll bar.
 o getScrollbarVisibility()
Returns an enumerated value that indicates which scroll bars the text component uses.
 o minimumSize(int)
Deprecated.
 o preferredSize(int)
Deprecated.
 o removeActionListener(ActionListener)
Removes the specified action listener so that it no longer receives action events from this text field.
 o setBounds(int, int, int, int)
Moves and resizes this component.
 o setEchoChar(char)
Sets the echo character for this text field.
 o setEchoCharacter(char)
Deprecated.
 o setEditable(boolean)
Sets the flag that determines whether or not this text component is editable.
 o setScrollbarThickness(int)
Sets the thickness of the scroll bar.

Variables

 o DEFAULT_FIELD_STYLE
 public static final RichTextStyle DEFAULT_FIELD_STYLE
The default rich text style for the text field.

Constructors

 o TextField
 public TextField()
Constructs a new text field.

 o TextField
 public TextField(String string)
Constructs a new text field initialized with the specified string.

Parameters:
string - the string to be displayed.
 o TextField
 public TextField(int columns)
Constructs a new TextField with the specified number of columns.

Parameters:
columns - the number of columns
 o TextField
 public TextField(String string,
                  int columns)
Constructs a new text field initialized with the specified string to be displayed, and wide enough to hold the specified number of characters.

Parameters:
string - the string to be displayed.
columns - the number of characters.
 o TextField
 public TextField(RichText richText)
Constructs a new text field initialized with the specified rich text.

Parameters:
richText - the rich text to be displayed.
 o TextField
 public TextField(RichText richText,
                  int columns)
Constructs a new text field initialized with the specified rich text to be displayed, and wide enough to hold the specified number of characters.

Parameters:
richText - the rich text to be displayed.
columns - the number of characters.
 o TextField
 public TextField(TextEditModel model)
Constructs a new text field with the specified model.

Parameters:
model - the text edit model.
 o TextField
 public TextField(TextEditModel model,
                  int columns)
Constructs a new text field with the specified model and wide enough to hold the specified number of characters.

Parameters:
model - the text edit model.
columns - the number of characters.
 o TextField
 public TextField(TextEditModel model,
                  int columns,
                  VBorder border)
Constructs a new text field with the specified model, wide enough to hold the specified number of characters, and border visual.

Parameters:
model - the text edit model.
columns - the number of characters.
border - the border visual of the text field.

Methods

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

Overrides:
setBounds in class KContainer
 o addActionListener
 public synchronized void addActionListener(ActionListener l)
Adds the specified action listener to recieve action events from this text field.

Parameters:
l - the action listener.
 o removeActionListener
 public synchronized void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this text field.

Parameters:
l - the action listener.
 o setEditable
 public void setEditable(boolean b)
Sets the flag that determines whether or not this text component is editable.

Overrides:
setEditable in class TextComponent
 o getScrollbarVisibility
 public int getScrollbarVisibility()
Returns an enumerated value that indicates which scroll bars the text component uses.

Overrides:
getScrollbarVisibility in class TextComponent
 o getPreferredSize
 public Dimension getPreferredSize(int rows,
                                   int columns)
Determines the preferred size of a text component with the specified number of rows and columns.

Parameters:
rows - the number of rows.
columns - the number of columns, ignored.
Returns:
the preferred dimensions required to display the text component with the specified number of rows and columns.
Overrides:
getPreferredSize in class TextComponent
 o getScrollbarThickness
 public int getScrollbarThickness()
Returns the thickness of the scroll bar.

Overrides:
getScrollbarThickness in class TextComponent
 o setScrollbarThickness
 public synchronized void setScrollbarThickness(int thickness)
Sets the thickness of the scroll bar.

Overrides:
setScrollbarThickness in class TextComponent
 o getEchoChar
 public char getEchoChar()
Returns the character that is to be used for echoing.

Returns:
the echo character for this text field.
See Also:
setEchoChar, echoCharIsSet
 o setEchoChar
 public synchronized void setEchoChar(char c)
Sets the echo character for this text field.

Parameters:
c - the echo character for this text field.
See Also:
getEchoChar, echoCharIsSet
 o setEchoCharacter
 public void setEchoCharacter(char c)
Note: setEchoCharacter() is deprecated. As of JDK version 1.1, replaced by setEchoChar(char).

 o echoCharIsSet
 public boolean echoCharIsSet()
Indicates whether or not this text field has a character set for echoing.

Returns:
true if this text field has a character set for echoing; false otherwise.
See Also:
getEchoChar, setEchoChar
 o getPreferredSize
 public Dimension getPreferredSize(int columns)
Returns the preferred size of this text field with the specified number of columns.

Parameters:
columns - the number of columns.
Returns:
the preferred dimensions for displaying this text field.
 o preferredSize
 public Dimension preferredSize(int columns)
Note: preferredSize() is deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).

 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this text field.

Returns:
the preferred dimensions for displaying this text field.
Overrides:
getPreferredSize in class TextComponent
 o getMinimumSize
 public Dimension getMinimumSize(int columns)
Returns the minumum dimensions for a text field with the specified number of columns.

Parameters:
columns - the number of columns in this text field.
 o minimumSize
 public Dimension minimumSize(int columns)
Note: minimumSize() is deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).

 o getMinimumSize
 public Dimension getMinimumSize()
Returns the minumum dimensions for this text field.

Returns:
the minimum dimensions for displaying this text field.
Overrides:
getMinimumSize in class TextComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index