| 
 
 | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.TextComponent
              |
              +--java.awt.TextField
Unsafe:
| Field Summary | |
(package private)  ActionListener | 
actionListener
 | 
private static String | 
base
 | 
(package private)  int | 
columns
The number of columns in the text field.  | 
(package private)  char | 
echoChar
The echo character, which is used when the user wishes to disguise the characters typed into the text field.  | 
private static int | 
nameCounter
 | 
private static long | 
serialVersionUID
 | 
private  int | 
textFieldSerializedDataVersion
The textField Serialized Data Version.  | 
| Fields inherited from class java.awt.TextComponent | 
backgroundSetByClientCode, editable, selectionEnd, selectionStart, text, textListener | 
| Constructor Summary | |
TextField()
Suppressed: Constructs a new text field.  | 
|
TextField(int columns)
Suppressed: Constructs a new empty text field with the specified number of columns.  | 
|
TextField(String text)
Suppressed: Constructs a new text field initialized with the specified text.  | 
|
TextField(String text,
          int columns)
Suppressed: Constructs a new text field initialized with the specified text to be displayed, and wide enough to hold the specified number of columns.  | 
|
| Method Summary | |
 void | 
addActionListener(ActionListener l)
Suppressed: Adds the specified action listener to receive action events from this text field.  | 
 void | 
addNotify()
Suppressed: Creates the TextField's peer.  | 
(package private)  String | 
constructComponentName()
Construct a name for this component.  | 
 boolean | 
echoCharIsSet()
Suppressed: Indicates whether or not this text field has a character set for echoing.  | 
(package private)  boolean | 
eventEnabled(AWTEvent e)
 | 
 AccessibleContext | 
getAccessibleContext()
Suppressed: Gets the AccessibleContext associated with this TextField.  | 
 ActionListener[] | 
getActionListeners()
Suppressed: Returns an array of all the action listeners registered on this textfield.  | 
 int | 
getColumns()
Suppressed: Gets the number of columns in this text field.  | 
 char | 
getEchoChar()
Suppressed: Gets the character that is to be used for echoing.  | 
 EventListener[] | 
getListeners(Class listenerType)
Suppressed: Returns an array of all the objects currently registered as FooListeners
 upon this TextField. | 
 Dimension | 
getMinimumSize()
Suppressed: Gets the minumum dimensions for this text field.  | 
 Dimension | 
getMinimumSize(int columns)
Suppressed: Gets the minumum dimensions for a text field with the specified number of columns.  | 
 Dimension | 
getPreferredSize()
Suppressed: Gets the preferred size of this text field.  | 
 Dimension | 
getPreferredSize(int columns)
Suppressed: Gets the preferred size of this text field with the specified number of columns.  | 
private static void | 
initIDs()
Initialize JNI field and method ids  | 
 Dimension | 
minimumSize()
Suppressed: @deprecated As of JDK version 1.1, replaced by getMinimumSize(). | 
 Dimension | 
minimumSize(int columns)
Suppressed: @deprecated As of JDK version 1.1, replaced by getMinimumSize(int). | 
protected  String | 
paramString()
Returns a string representing the state of this TextField. | 
 Dimension | 
preferredSize()
Suppressed: @deprecated As of JDK version 1.1, replaced by getPreferredSize(). | 
 Dimension | 
preferredSize(int columns)
Suppressed: @deprecated As of JDK version 1.1, replaced by getPreferredSize(int). | 
protected  void | 
processActionEvent(ActionEvent e)
Processes action events occurring on this text field by dispatching them to any registered ActionListener objects. | 
protected  void | 
processEvent(AWTEvent e)
Processes events on this text field.  | 
private  void | 
readObject(ObjectInputStream s)
Read the ObjectInputStream and if it isn't null, add a listener to receive action events fired by the TextField.  | 
 void | 
removeActionListener(ActionListener l)
Suppressed: Removes the specified action listener so that it no longer receives action events from this text field.  | 
 void | 
setColumns(int columns)
Suppressed: Sets the number of columns in this text field.  | 
 void | 
setEchoChar(char c)
Suppressed: Sets the echo character for this text field.  | 
 void | 
setEchoCharacter(char c)
Suppressed: @deprecated As of JDK version 1.1, replaced by setEchoChar(char). | 
 void | 
setText(String t)
Suppressed: Sets the text that is presented by this text component to be the specified text.  | 
private  void | 
writeObject(ObjectOutputStream s)
Writes default serializable fields to stream.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
int columns
setColumns(), 
getColumns()char echoChar
0.
getEchoChar(), 
setEchoChar(), 
echoCharIsSet()transient ActionListener actionListener
private static final String base
private static int nameCounter
private static final long serialVersionUID
private int textFieldSerializedDataVersion
| Constructor Detail | 
public TextField()
          throws HeadlessException
java.awt.GraphicsEnvironment#isHeadless
public TextField(String text)
          throws HeadlessException
text - the text to be displayed. If
             text is null, the empty
             string "" will be displayed.java.awt.GraphicsEnvironment#isHeadless
public TextField(int columns)
          throws HeadlessException
columns - the number of columns.  If 
             columns is less than 0, 
             columns is set to 0.java.awt.GraphicsEnvironment#isHeadless
public TextField(String text,
                 int columns)
          throws HeadlessException
text - the text to be displayed. If
             text is null, the empty
             string "" will be displayed.columns - the number of columns.  If 
             columns is less than 0, 
             columns is set to 0.java.awt.GraphicsEnvironment#isHeadless| Method Detail | 
private static void initIDs()
String constructComponentName()
constructComponentName in class Componentpublic void addNotify()
addNotify in class TextComponentjava.awt.TextComponent#removeNotifypublic char getEchoChar()
 An echo character is useful for text fields where
 user input should not be echoed to the screen, as in
 the case of a text field for entering a password.
 If echoChar = 0, user 
 input is echoed to the screen unchanged.
java.awt.TextField#echoCharIsSet, 
java.awt.TextField#setEchoCharpublic void setEchoChar(char c)
 An echo character is useful for text fields where
 user input should not be echoed to the screen, as in
 the case of a text field for entering a password.
 Setting echoChar = 0 allows 
 user input to be echoed to the screen again.
c - the echo character for this text field.java.awt.TextField#echoCharIsSet, 
java.awt.TextField#getEchoCharpublic void setEchoCharacter(char c)
setEchoChar(char).
public void setText(String t)
setText in class TextComponentt - the new text.java.awt.TextComponent#getTextpublic boolean echoCharIsSet()
An echo character is useful for text fields where user input should not be echoed to the screen, as in the case of a text field for entering a password.
true if this text field has
                 a character set for echoing;
                 false otherwise.java.awt.TextField#setEchoChar, 
java.awt.TextField#getEchoCharpublic int getColumns()
java.awt.TextField#setColumnspublic void setColumns(int columns)
columns - the number of columns.java.awt.TextField#getColumnspublic Dimension getPreferredSize(int columns)
columns - the number of columns
                 in this text field.
public Dimension preferredSize(int columns)
getPreferredSize(int).
public Dimension getPreferredSize()
getPreferredSize in class ComponentComponent.getMinimumSize(), 
LayoutManagerpublic Dimension preferredSize()
getPreferredSize().
preferredSize in class Componentpublic Dimension getMinimumSize(int columns)
columns - the number of columns in
                          this text field.public Dimension minimumSize(int columns)
getMinimumSize(int).
public Dimension getMinimumSize()
getMinimumSize in class ComponentComponent.getPreferredSize(), 
LayoutManagerpublic Dimension minimumSize()
getMinimumSize().
minimumSize in class Componentpublic void addActionListener(ActionListener l)
l - the action listener.removeActionListener(java.awt.event.ActionListener), 
getActionListeners(), 
java.awt.event.ActionListenerpublic void removeActionListener(ActionListener l)
l - the action listener.addActionListener(java.awt.event.ActionListener), 
getActionListeners(), 
java.awt.event.ActionListenerpublic ActionListener[] getActionListeners()
ActionListeners
         or an empty array if no action 
         listeners are currently registeredaddActionListener(java.awt.event.ActionListener), 
removeActionListener(java.awt.event.ActionListener), 
java.awt.event#ActionListenerpublic EventListener[] getListeners(Class listenerType)
FooListeners
 upon this TextField.
 FooListeners are registered using the
 addFooListener method.
 
 You can specify the listenerType argument
 with a class literal, such as
 FooListener.class.
 For example, you can query a
 TextField t
 for its action listeners with the following code:
 
ActionListener[] als = (ActionListener[])(t.getListeners(ActionListener.class));If no such listeners exist, this method returns an empty array.
getListeners in class TextComponentlistenerType - the type of listeners requested; this parameter
          should specify an interface that descends from
          java.util.EventListener
FooListeners on this textfield,
          or an empty array if no such
          listeners have been addedgetActionListeners()boolean eventEnabled(AWTEvent e)
eventEnabled in class TextComponentprotected void processEvent(AWTEvent e)
ActionEvent,
 it invokes the processActionEvent
 method. Otherwise, it invokes processEvent
 on the superclass.
 Note that if the event parameter is null
 the behavior is unspecified and may result in an
 exception.
processEvent in class TextComponente - the eventjava.awt.event.ActionEvent, 
java.awt.TextField#processActionEventprotected void processActionEvent(ActionEvent e)
ActionListener objects.
 This method is not called unless action events are enabled for this component. Action events are enabled when one of the following occurs:
ActionListener object is registered
 via addActionListener.
 enableEvents.
 Note that if the event parameter is null
 the behavior is unspecified and may result in an
 exception.
e - the action eventjava.awt.event.ActionListener, 
java.awt.TextField#addActionListener, 
java.awt.Component#enableEventsprotected String paramString()
TextField.
 This method is intended to be used only for debugging purposes, and the 
 content and format of the returned string may vary between 
 implementations. The returned string may be empty but may not be 
 null.
paramString in class TextComponent
private void writeObject(ObjectOutputStream s)
                  throws IOException
IOExceptionAWTEventMulticaster.save(ObjectOutputStream, String, EventListener), 
java.awt.Component.actionListenerK
private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException,
                        HeadlessException
ClassNotFoundException
IOException
HeadlessExceptionremoveActionListener(), 
addActionListener(), 
java.awt.GraphicsEnvironment#isHeadlesspublic AccessibleContext getAccessibleContext()
getAccessibleContext in interface AccessiblegetAccessibleContext in class TextComponent
  | 
 
 | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||