All Packages Class Hierarchy This Package Previous Next Index
Class dtai.gwt.TextFieldGadget
java.lang.Object
|
+----dtai.gwt.Gadget
|
+----dtai.gwt.ContainerGadget
|
+----dtai.gwt.PanelGadget
|
+----dtai.gwt.BorderGadget
|
+----dtai.gwt.TextFieldGadget
- public class TextFieldGadget
- extends BorderGadget
- implements TextGadget, Runnable
TextFieldGadget
-
HORIZ_ALIGN_CENTER
-
-
HORIZ_ALIGN_LEFT
-
-
HORIZ_ALIGN_RIGHT
-
-
VERT_ALIGN_BOTTOM
-
-
VERT_ALIGN_MIDDLE
-
-
VERT_ALIGN_TOP
-
-
TextFieldGadget()
- Constructs a Text with no text.
-
TextFieldGadget(int)
- Constructs a Text with the specified number of columns.
-
TextFieldGadget(String)
- Constructs a Text with the specified text.
-
TextFieldGadget(String, int)
- Constructs a Text with the specified text and number of columns.
-
TextFieldGadget(String, int, TextLine)
- TextFieldGadget
-
addActionListener(ActionListener)
- Adds the specified listener to be notified when component
events occur on this component.
-
appendText(char)
- Appends the given character to the end.
-
appendText(String)
- Appends the given text to the end.
-
blackAndWhite(GadgetGraphics)
- blackAndWhite
-
clear(GadgetGraphics)
- clear
-
echoCharIsSet()
- Returns true if this TextField has a character set for echoing.
-
getCaretPosition()
- Returns the cursor position.
-
getColumns()
- getColumns
-
getCursorPos()
- Returns the cursor position.
-
getEchoChar()
- Returns the character to be used for echoing.
-
getFocusOffset()
- Returns the offset used to calculate the next focus gadget, usually
the value of getOffset(), but might be an ancestors offset in some
cases (like combo box).
-
getHorizAlign()
- gets the horizontal alignment
-
getIgnoreDefaultAction()
- getIgnoreDefaultAction
-
getLine()
- getLine
-
getMinimumSize()
- Returns the minimum size Dimensions needed for this TextField.
-
getMinimumSize(int)
- Returns the minimum size Dimensions needed for this TextField with the specified amount of columns.
-
getPreferredSize()
- Returns the preferred size Dimensions needed for this TextField.
-
getPreferredSize(int)
- Returns the preferred size Dimensions needed for this TextField with the specified amount of columns.
-
getSelectedText()
- Returns the selected text contained in this TextComponent.
-
getSelectionEnd()
- Returns the selected text's end position.
-
getSelectionStart()
- Returns the selected text's start position.
-
getText()
- Gets the text of the button.
-
getVertAlign()
- gets the vertical alignment
-
insertText(char, int)
- Inserts the specified character at the specified position.
-
insertText(String, int)
- Inserts the specified text at the specified position.
-
invokeAction(AWTEvent)
- invokeAction
-
isAllowedToShrink()
- Returns the boolean indicating whether this TextComponent is allowedToShrink or not.
-
isEditable()
- Returns the boolean indicating whether this TextComponent is editable or not.
-
isFocusTraversable()
- isFocusTraversable
-
paint(GadgetGraphics)
- paint
-
processActionEvent(ActionEvent)
-
-
processEvent(AWTEvent)
- processEvent
-
processFocusEvent(FocusEvent)
- processFocusEvent
-
processKeyEvent(KeyEvent)
- processKeyEvent
-
processMouseEvent(MouseEvent)
- processMouseEvent
-
processMouseMotionEvent(MouseEvent)
- processMouseMotionEvent
-
removeActionListener(ActionListener)
- Removes the specified listener so it no longer receives
action events on this action.
-
replaceText(char, int, int)
- Replaces text from the indicated start to end position with the
new character specified.
-
replaceText(String, int, int)
- Replaces text from the indicated start to end position with the
new text specified.
-
run()
- run
-
select(int)
- select
-
select(int, int)
- Selects the text found between the specified start and end locations.
-
selectAll()
- Selects all the text in the TextComponent.
-
setAllowedToShrink(boolean)
- Sets the specified boolean to indicate whether or not this TextComponent should be allowedToShrink.
-
setCaretPosition(int)
- Returns the cursor position.
-
setColumns(int)
- setColumns
-
setEchoChar(char)
- Sets the echo character for this TextField.
-
setEditable(boolean)
- Sets the specified boolean to indicate whether or not this TextComponent should be editable.
-
setHorizAlign(int)
- sets the horizontal alignment
-
setIgnoreDefaultAction(boolean)
- setIgnoreDefaultAction
-
setSelectionEnd(int)
- Sets the selection end to the specified position.
-
setSelectionStart(int)
- Sets the selection start to the specified position.
-
setText(String)
- Sets the button with the specified text.
-
setVertAlign(int)
- sets the vertical alignment
-
toString()
- toString
-
update(GadgetGraphics)
- update
HORIZ_ALIGN_LEFT
public static final int HORIZ_ALIGN_LEFT
HORIZ_ALIGN_CENTER
public static final int HORIZ_ALIGN_CENTER
HORIZ_ALIGN_RIGHT
public static final int HORIZ_ALIGN_RIGHT
VERT_ALIGN_TOP
public static final int VERT_ALIGN_TOP
VERT_ALIGN_MIDDLE
public static final int VERT_ALIGN_MIDDLE
VERT_ALIGN_BOTTOM
public static final int VERT_ALIGN_BOTTOM
TextFieldGadget
public TextFieldGadget()
- Constructs a Text with no text.
TextFieldGadget
public TextFieldGadget(String text)
- Constructs a Text with the specified text.
- Parameters:
- text - - the text of the button
TextFieldGadget
public TextFieldGadget(int columns)
- Constructs a Text with the specified number of columns.
- Parameters:
- columns - - the text of the button
TextFieldGadget
public TextFieldGadget(String text,
int columns)
- Constructs a Text with the specified text and number of columns.
- Parameters:
- text - - the text of the button
- columns - - the number of columns
TextFieldGadget
protected TextFieldGadget(String text,
int columns,
TextLine line)
- TextFieldGadget
- Parameters:
- text - - TBD
- columns - - TBD
- line - - TBD
getLine
protected TextLine getLine()
- getLine
- Returns:
- TextLine
blackAndWhite
protected boolean blackAndWhite(GadgetGraphics g)
- blackAndWhite
- Parameters:
- g - - TBD
- Returns:
- boolean
clear
public void clear(GadgetGraphics g)
- clear
- Parameters:
- g - - TBD
- Overrides:
- clear in class Gadget
update
public void update(GadgetGraphics g)
- update
- Parameters:
- g - - TBD
- Overrides:
- update in class BorderGadget
paint
public void paint(GadgetGraphics g)
- paint
- Parameters:
- g - - TBD
- Overrides:
- paint in class BorderGadget
setHorizAlign
public void setHorizAlign(int horizAlign)
- sets the horizontal alignment
- Parameters:
- horizAlign - - TBD
getHorizAlign
public int getHorizAlign()
- gets the horizontal alignment
- Returns:
- int - TBD
setVertAlign
public void setVertAlign(int vertAlign)
- sets the vertical alignment
- Parameters:
- vertAlign - - TBD
getVertAlign
public int getVertAlign()
- gets the vertical alignment
- Returns:
- int
getText
public String getText()
- Gets the text of the button.
- Returns:
- String
- See Also:
- setText
toString
public String toString()
- toString
- Returns:
- String
- Overrides:
- toString in class Object
setText
public void setText(String text)
- Sets the button with the specified text.
- Parameters:
- text - - the text to set the button with
- See Also:
- getText
insertText
public void insertText(String str,
int pos)
- Inserts the specified text at the specified position.
- Parameters:
- str - the text to insert.
- pos - the position at which to insert.
- See Also:
- setText, replaceText
insertText
public void insertText(char c,
int pos)
- Inserts the specified character at the specified position.
- Parameters:
- c - the character to insert.
- pos - the position at which to insert.
- See Also:
- setText, replaceText
appendText
public void appendText(String str)
- Appends the given text to the end.
- Parameters:
- str - the text to insert
- See Also:
- insertText
appendText
public void appendText(char c)
- Appends the given character to the end.
- Parameters:
- c - the character to insert
- See Also:
- insertText
replaceText
public void replaceText(String str,
int start,
int end)
- Replaces text from the indicated start to end position with the
new text specified.
- Parameters:
- str - the text to use as the replacement.
- start - the start position.
- end - the end position.
- See Also:
- insertText, replaceText
replaceText
public void replaceText(char c,
int start,
int end)
- Replaces text from the indicated start to end position with the
new character specified.
- Parameters:
- c - the character to use as the replacement.
- start - the start position.
- end - the end position.
- See Also:
- insertText, replaceText
getIgnoreDefaultAction
public boolean getIgnoreDefaultAction()
- getIgnoreDefaultAction
- Returns:
- boolean
setIgnoreDefaultAction
public void setIgnoreDefaultAction(boolean ignoreDefaultAction)
- setIgnoreDefaultAction
- Parameters:
- ignoreDefaultAction - - TBD
getColumns
public int getColumns()
- getColumns
- Returns:
- int
setColumns
public void setColumns(int columns)
- setColumns
- Parameters:
- columns - - TBD
run
public void run()
- run
addActionListener
public synchronized void addActionListener(ActionListener l)
- Adds the specified listener to be notified when component
events occur on this component.
- Parameters:
- l - the listener to receive the events
removeActionListener
public synchronized void removeActionListener(ActionListener l)
- Removes the specified listener so it no longer receives
action events on this action.
- Parameters:
- l - the listener to remove
processEvent
protected void processEvent(AWTEvent e)
- processEvent
- Parameters:
- e - a ActionEvent
- Returns:
- boolean result
- Overrides:
- processEvent in class ContainerGadget
processActionEvent
protected void processActionEvent(ActionEvent e)
isFocusTraversable
public boolean isFocusTraversable()
- isFocusTraversable
- Returns:
- boolean
- Overrides:
- isFocusTraversable in class Gadget
getFocusOffset
public Point getFocusOffset()
- Returns the offset used to calculate the next focus gadget, usually
the value of getOffset(), but might be an ancestors offset in some
cases (like combo box).
- Returns:
- Point
- Overrides:
- getFocusOffset in class Gadget
- See Also:
- getOffset
invokeAction
public void invokeAction(AWTEvent e)
- invokeAction
- Parameters:
- e - - TBD
processKeyEvent
protected void processKeyEvent(KeyEvent e)
- processKeyEvent
- Parameters:
- e - the KeyEvent
- Overrides:
- processKeyEvent in class Gadget
processFocusEvent
protected void processFocusEvent(FocusEvent e)
- processFocusEvent
- Parameters:
- e - the firing FocusEvent
- Overrides:
- processFocusEvent in class Gadget
processMouseEvent
public void processMouseEvent(MouseEvent e)
- processMouseEvent
- Parameters:
- mouse - the MouseEvent
- Overrides:
- processMouseEvent in class Gadget
processMouseMotionEvent
public void processMouseMotionEvent(MouseEvent e)
- processMouseMotionEvent
- Parameters:
- mouse - the MouseEvent
- Overrides:
- processMouseMotionEvent in class Gadget
getSelectedText
public String getSelectedText()
- Returns the selected text contained in this TextComponent.
- Returns:
- String
- See Also:
- setText
isAllowedToShrink
public boolean isAllowedToShrink()
- Returns the boolean indicating whether this TextComponent is allowedToShrink or not.
- Returns:
- boolean
- See Also:
- setEditable
setAllowedToShrink
public void setAllowedToShrink(boolean b)
- Sets the specified boolean to indicate whether or not this TextComponent should be allowedToShrink.
- Parameters:
- b - - the boolean to be set
- See Also:
- isEditable
isEditable
public final boolean isEditable()
- Returns the boolean indicating whether this TextComponent is editable or not.
- Returns:
- boolean
- See Also:
- setEditable
setEditable
public final void setEditable(boolean editable)
- Sets the specified boolean to indicate whether or not this TextComponent should be editable.
- Parameters:
- editable - - the boolean to be set
- See Also:
- isEditable
getCursorPos
public int getCursorPos()
- Returns the cursor position.
- Returns:
- int
getCaretPosition
public int getCaretPosition()
- Returns the cursor position.
- Returns:
- int
setCaretPosition
public void setCaretPosition(int caretPosition)
- Returns the cursor position.
- Parameters:
- caretPosition - - TBD
getSelectionStart
public int getSelectionStart()
- Returns the selected text's start position.
- Parameters:
- int - - TBD
- Returns:
- int
setSelectionStart
public void setSelectionStart(int selectionStart)
- Sets the selection start to the specified position. The new starting point is constrained to be before or at the current selection end.
- Parameters:
- selectionStart - - the start position of the text
getSelectionEnd
public int getSelectionEnd()
- Returns the selected text's end position.
- Returns:
- int
setSelectionEnd
public void setSelectionEnd(int selectionEnd)
- Sets the selection end to the specified position. The new end point is constrained to be at or after the current selection start.
- Parameters:
- selectionEnd - - the start position of the text
select
public void select(int selectionStart,
int selectionEnd)
- Selects the text found between the specified start and end locations.
- Parameters:
- selectionStart - - the start position of the text
- selectionEnd - - the end position of the text
select
public void select(int pos)
- select
- Parameters:
- pos - - TBD
selectAll
public void selectAll()
- Selects all the text in the TextComponent.
getEchoChar
public char getEchoChar()
- Returns the character to be used for echoing.
- Returns:
- char
- See Also:
- setEchoChar, echoCharIsSet
setEchoChar
public void setEchoChar(char c)
- Sets the echo character for this TextField. This is
useful for fields where the user input shouldn't
be echoed to the screen, as in the case of a TextField that
represents a password.
- Parameters:
- c - - the echo character for this TextField
- See Also:
- echoCharIsSet, getEchoChar
echoCharIsSet
public boolean echoCharIsSet()
- Returns true if this TextField has a character set for echoing.
- Returns:
- boolean
- See Also:
- setEchoChar, getEchoChar
getPreferredSize
public Dimension getPreferredSize(int columns)
- Returns the preferred size Dimensions needed for this TextField with the specified amount of columns.
- Parameters:
- columns - - the number of columns in this TextField
- Returns:
- Dimension
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size Dimensions needed for this TextField.
Overrides:
getPreferredSize in class Component
- Returns:
- Dimension
- Overrides:
- getPreferredSize in class ContainerGadget
getMinimumSize
public Dimension getMinimumSize(int columns)
- Returns the minimum size Dimensions needed for this TextField with the specified amount of columns.
- Parameters:
- columns - - the number of columns in this TextField
- Returns:
- Dimension
getMinimumSize
public Dimension getMinimumSize()
- Returns the minimum size Dimensions needed for this TextField.
- Returns:
- Dimensions
- Overrides:
- getMinimumSize in class ContainerGadget
All Packages Class Hierarchy This Package Previous Next Index