java.lang.Object | +--java.awt.Component | +--java.awt.TextComponent | +--java.awt.TextField
Unsafe:
(package private) char
echoChar
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, bufferStrategy, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, focusTraversalKeys, font, foreground, graphicsConfig, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, ignoreRepaint, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, mouseWheelListener, mouseWheelListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowFocusListenerK, windowListenerK, windowStateListenerK, x, y
TextField()
TextField(int columns)
TextField(String text,
int columns)
void
addActionListener(ActionListener l)
boolean
echoCharIsSet()
AccessibleContext
getAccessibleContext()
ActionListener[]
getActionListeners()
EventListener[]
getListeners(Class listenerType)
FooListeners
upon this TextField.
Dimension
getMinimumSize(int columns)
Dimension
getPreferredSize(int columns)
Dimension
minimumSize()
getMinimumSize().
Dimension
minimumSize(int columns)
getMinimumSize(int).
Dimension
preferredSize()
getPreferredSize().
Dimension
preferredSize(int columns)
getPreferredSize(int).
protected void
processActionEvent(ActionEvent e)
ActionListener objects.
private void
readObject(ObjectInputStream s)
void
removeActionListener(ActionListener l)
void
setEchoCharacter(char c)
setEchoChar(char).
void
setText(String t)
addTextListener, areInputMethodsEnabled, enableInputMethods, getBackground, getCaretPosition, getCharacterBounds, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, getText, getTextListeners, isEditable, processTextEvent, removeNotify, removeTextListener, select, selectAll, setBackground, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, adjustListeningChildrenOnParent, applyComponentOrientation, areFocusTraversalKeysSet, autoProcessMouseWheel, autoTransferFocus, bounds, checkGD, checkImage, checkImage, checkWindowClosingException, clearCurrentFocusCycleRootOnHide, clearMostRecentFocusOwnerOnHide, coalesceEvents, contains, contains, containsFocus, countHierarchyMembers, createBufferStrategy, createBufferStrategy, createChildHierarchyEvents, createHierarchyEvents, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, dispatchMouseWheelToAncestor, doLayout, enable, enable, enableEvents, eventTypeEnabled, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getAlignmentX, getAlignmentY, getBackBuffer, getBounds, getBounds, getBufferStrategy, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys_NoIDCheck, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initializeFocusTraversalKeys, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFocusTraversableOverridden, isFontSet, isForegroundSet, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, iterate, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, nextFocusHelper, numListening, paint, paintAll, paintHeavyweightComponents, postEvent, postsOldMouseEvents, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusHelper, requestFocusInWindow, requestFocusInWindow, resetGC, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys_NoIDCheck, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setGCFromPeer, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocus, transferFocusBackward, transferFocusUpCycle, update, updateCursorImmediately, validate
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
public TextField() throws HeadlessException
java.awt.GraphicsEnvironment#isHeadlesspublic TextField(String text) throws HeadlessException
text - the text to be displayed. If
text is null, the empty
string "" will be displayed.java.awt.GraphicsEnvironment#isHeadlesspublic TextField(int columns) throws HeadlessException
columns - the number of columns. If
columns is less than 0,
columns is set to 0.java.awt.GraphicsEnvironment#isHeadlesspublic 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#isHeadlessprivate 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 TextComponentprivate void writeObject(ObjectOutputStream s) throws IOException
IOExceptionAWTEventMulticaster.save(ObjectOutputStream, String, EventListener),
java.awt.Component.actionListenerKprivate 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