|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--dog.gui.DContainer
|
+--dog.gui.DTextComponent
|
+--dog.gui.DTextField
A component that allows the editing of a single line of text.
You can specify an alignment (LEFT, CENTER, or RIGHT) for the text within the component.
You can also choose to have the text echoed with a specified character for password fields.
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected java.awt.event.ActionListener |
actionListener
|
protected int |
align
The alignment of the text in the field. |
static int |
CENTER
The center alignment. |
protected int |
columns
The number of columns in the DTextField. |
protected char |
echoChar
The echo character. |
protected boolean |
filled
Is this component filled? |
protected boolean |
focus
Do we currently have the focus? |
static int |
LEFT
The left alignment. |
static int |
RIGHT
The right alignment. |
| Fields inherited from class dog.gui.DTextComponent |
editable, position, selectionEnd, selectionStart, text, textListener |
| Fields inherited from class dog.gui.DContainer |
cancelButton, defaultButton, EAST, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, tooltip, WEST |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DTextField()
Constructs a new text field. |
|
DTextField(java.lang.String text)
Constructs a new text field initialized with the specified text. |
|
DTextField(java.lang.String text,
int align)
Constructs a new text field with the specified text and alignment. |
|
| Method Summary | |
void |
addActionListener(java.awt.event.ActionListener listener)
Adds the specified action listener to receive action events from this component. |
boolean |
echoCharIsSet()
Returns true if this text field has a character set for echoing. |
int |
getAlign()
Returns the alignment of the text in this text field. |
int |
getColumns()
Returns the number of columns in this text field. |
char |
getEchoChar()
Returns the character to be used for echoing. |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size for this component. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size for this component. |
boolean |
isFilled()
Indicates whether this component is filled. |
boolean |
isFocusTraversable()
This component is focus-traversable if it is not disabled. |
void |
paint(java.awt.Graphics g)
Paints this choice. |
protected java.lang.String |
paramString()
Returns a parameter string for this component. |
protected void |
processActionEvent(java.awt.event.ActionEvent event)
Processes action events occurring on this component by dispatching them to any registered ActionListener objects. |
protected void |
processEvent(java.awt.AWTEvent event)
Processes events on this component. |
protected void |
processFocusEvent(java.awt.event.FocusEvent event)
Process focus events. |
protected void |
processKeyEvent(java.awt.event.KeyEvent event)
Process key events. |
protected void |
processMouseEvent(java.awt.event.MouseEvent event)
Process mouse events. |
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent event)
Process mouse motion events. |
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes the specified action listener so that it no longer receives action events from this component. |
void |
setAlign(int align)
Sets the alignment of the text in this text field. |
void |
setColumns(int columns)
Sets the number of columns for this text field. |
void |
setEchoChar(char echoChar)
Sets the echo character for this text field. |
void |
setFilled(boolean filled)
Sets whether to fill this component with the fill colour. |
void |
setText(java.lang.String text)
Sets the text in this component, up to the first newline character in the specified input. |
void |
timerFired(TimerEvent event)
The timer fired, blink the caret. |
void |
update(java.awt.Graphics g)
Updates this component's graphics context. |
| Methods inherited from class dog.gui.DTextComponent |
addTextListener, copySelection, cutSelection, deleteLeft, deleteRight, deleteSelection, getCaretPosition, getSelectedText, getSelectionEnd, getSelectionStart, getText, insert, insert, isEditable, lostOwnership, moveLeft, moveLineEnd, moveLineStart, moveRight, moveWordLeft, moveWordRight, pasteSelection, processTextEvent, removeTextListener, select, selectAll, setEditable, setSelectionEnd, setSelectionStart |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int CENTER
public static final int LEFT
public static final int RIGHT
protected int align
protected boolean filled
protected char echoChar
protected int columns
protected transient boolean focus
protected transient java.awt.event.ActionListener actionListener
| Constructor Detail |
public DTextField()
public DTextField(java.lang.String text)
text - the text to be displayed
public DTextField(java.lang.String text,
int align)
text - the text to be displayedalign - LEFT, CENTER, or RIGHT| Method Detail |
public void setText(java.lang.String text)
setText in class DTextComponenttext - the new text to be setpublic int getAlign()
setAlign(int)public void setAlign(int align)
align - LEFT, CENTER, or RIGHTjava.lang.IllegalArgumentException - if the alignment is not one of the above.getAlign()public char getEchoChar()
setEchoChar(char),
echoCharIsSet()public void setEchoChar(char echoChar)
c - the echo character for this fieldechoCharIsSet(),
getEchoChar()public boolean echoCharIsSet()
setEchoChar(char),
getEchoChar()public boolean isFilled()
public void setFilled(boolean filled)
public int getColumns()
setColumns(int)public void setColumns(int columns)
columns - the number of columns.java.lang.IllegalArgumentException - if the value supplied for columns is less than zero.getColumns()public java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Containerpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Containerpublic void update(java.awt.Graphics g)
update in class java.awt.Containerpublic void paint(java.awt.Graphics g)
paint in class java.awt.Containerpublic boolean isFocusTraversable()
isFocusTraversable in class java.awt.Componentpublic void addActionListener(java.awt.event.ActionListener listener)
listener - the action listenerpublic void removeActionListener(java.awt.event.ActionListener listener)
listener - the action listenerprotected void processEvent(java.awt.AWTEvent event)
processEvent in class DTextComponentevent - the eventprotected void processActionEvent(java.awt.event.ActionEvent event)
event - the action eventprotected void processFocusEvent(java.awt.event.FocusEvent event)
processFocusEvent in class java.awt.Componentprotected void processKeyEvent(java.awt.event.KeyEvent event)
processKeyEvent in class java.awt.Componentprotected void processMouseEvent(java.awt.event.MouseEvent event)
processMouseEvent in class DContainerprotected void processMouseMotionEvent(java.awt.event.MouseEvent event)
processMouseMotionEvent in class DContainerpublic void timerFired(TimerEvent event)
timerFired in interface TimerListenerprotected java.lang.String paramString()
paramString in class DTextComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||