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
-
DEFAULT_FIELD_STYLE
- The default rich text style for the text field.
-
TextField()
- Constructs a new text field.
-
TextField(int)
- Constructs a new TextField with the specified number of columns.
-
TextField(RichText)
- Constructs a new text field initialized with the specified rich text.
-
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.
-
TextField(String)
- Constructs a new text field initialized with the specified string.
-
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.
-
TextField(TextEditModel)
- Constructs a new text field with the specified model.
-
TextField(TextEditModel, int)
- Constructs a new text field with the specified model and wide enough
to hold the specified number of characters.
-
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.
-
addActionListener(ActionListener)
- Adds the specified action listener to recieve action events from
this text field.
-
echoCharIsSet()
- Indicates whether or not this text field has a character set
for echoing.
-
getEchoChar()
- Returns the character that is to be used for echoing.
-
getMinimumSize()
- Returns the minumum dimensions for this text field.
-
getMinimumSize(int)
- Returns the minumum dimensions for a text field with the specified
number of columns.
-
getPreferredSize()
- Returns the preferred size of this text field.
-
getPreferredSize(int)
- Returns the preferred size of this text field with the specified
number of columns.
-
getPreferredSize(int, int)
- Determines the preferred size of a text component with the specified
number of rows and columns.
-
getScrollbarThickness()
- Returns the thickness of the scroll bar.
-
getScrollbarVisibility()
- Returns an enumerated value that indicates which scroll bars
the text component uses.
-
minimumSize(int)
-
Deprecated.
-
preferredSize(int)
-
Deprecated.
-
removeActionListener(ActionListener)
- Removes the specified action listener so that it no longer receives
action events from this text field.
-
setBounds(int, int, int, int)
- Moves and resizes this component.
-
setEchoChar(char)
- Sets the echo character for this text field.
-
setEchoCharacter(char)
-
Deprecated.
-
setEditable(boolean)
- Sets the flag that determines whether or not this text component is
editable.
-
setScrollbarThickness(int)
- Sets the thickness of the scroll bar.
DEFAULT_FIELD_STYLE
public static final RichTextStyle DEFAULT_FIELD_STYLE
- The default rich text style for the text field.
TextField
public TextField()
- Constructs a new text field.
TextField
public TextField(String string)
- Constructs a new text field initialized with the specified string.
- Parameters:
- string - the string to be displayed.
TextField
public TextField(int columns)
- Constructs a new TextField with the specified number of columns.
- Parameters:
- columns - the number of columns
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.
TextField
public TextField(RichText richText)
- Constructs a new text field initialized with the specified rich text.
- Parameters:
- richText - the rich text to be displayed.
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.
TextField
public TextField(TextEditModel model)
- Constructs a new text field with the specified model.
- Parameters:
- model - the text edit model.
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.
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.
setBounds
public synchronized void setBounds(int x,
int y,
int width,
int height)
- Moves and resizes this component.
- Overrides:
- setBounds in class KContainer
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.
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.
setEditable
public void setEditable(boolean b)
- Sets the flag that determines whether or not this text component is
editable.
- Overrides:
- setEditable in class TextComponent
getScrollbarVisibility
public int getScrollbarVisibility()
- Returns an enumerated value that indicates which scroll bars
the text component uses.
- Overrides:
- getScrollbarVisibility in class TextComponent
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
getScrollbarThickness
public int getScrollbarThickness()
- Returns the thickness of the scroll bar.
- Overrides:
- getScrollbarThickness in class TextComponent
setScrollbarThickness
public synchronized void setScrollbarThickness(int thickness)
- Sets the thickness of the scroll bar.
- Overrides:
- setScrollbarThickness in class TextComponent
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
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
setEchoCharacter
public void setEchoCharacter(char c)
- Note: setEchoCharacter() is deprecated.
As of JDK version 1.1,
replaced by
setEchoChar(char)
.
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
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.
preferredSize
public Dimension preferredSize(int columns)
- Note: preferredSize() is deprecated.
As of JDK version 1.1,
replaced by
getPreferredSize(int)
.
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
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.
minimumSize
public Dimension minimumSize(int columns)
- Note: minimumSize() is deprecated.
As of JDK version 1.1,
replaced by
getMinimumSize(int)
.
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