All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.gui.TextField

java.lang.Object
   |
   +----com.bulletproof.gui.Component
           |
           +----com.bulletproof.gui.TextField

public class TextField
extends Component
TextField is a component that allows the editing of a single line of text.


Constructor Index

 o TextField()
Constructs a new TextField.
 o TextField(String)
Constructs a new TextField initialized with the specified text.
 o TextField(String, int)
Constructs a new TextField initialized with the specified text.

Method Index

 o addActionListener(ActionListener)
 o copyToClipBoard()
 o cutFromClipBoard()
 o ensureCapacity(int)
 o getCaretPosition()
Returns the position of the text insertion caret for the text component.
 o getEchoCharacter()
Sets the echo character for this TextField
 o getMinimumSize()
Gets the minimum size of this component.
 o getNumLines()
 o getSelectedText()
Returns the current selected text value this TextField
 o getSelectionEnd()
Returns the selected text's end position.
 o getSelectionStart()
Returns the selected text's end position.
 o getText()
Returns the current text value this TextField
 o insertChar(char)
 o isEditable()
Returns the boolean indicating whether this TextComponent is editable or not.
 o moveChars(int)
 o paint(Graphics)
Paints the component.
 o pasteFromClipBoard(String)
 o processFocusEvent(FocusEvent)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
 o processKeyEvent(KeyEvent)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
 o processMouseEvent(MouseEvent)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
 o removeActionListener(ActionListener)
 o select(int, int)
Sets the new selected text value this TextField
 o selectAll()
Select all the text in the textfield.
 o setCaretPosition(int)
Sets the position of the text insertion caret for the TextComponent
 o setEchoCharacter(char)
Sets the echo character for this TextField
 o setEditable(boolean)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.
 o setText(String)
Sets the new text value this TextField
 o setTextNoRepaint(String)
Sets the new text value this TextField
 o update(Graphics)
Updates the component.

Constructors

 o TextField
 public TextField()
Constructs a new TextField.

 o TextField
 public TextField(String text)
Constructs a new TextField initialized with the specified text.

Parameters:
text - the text to be displayed
 o TextField
 public TextField(String text,
                  int minWidth)
Constructs a new TextField initialized with the specified text.

Parameters:
text - the text to be displayed
minWidth - the minimum width in pixels of this textfield

Methods

 o addActionListener
 public void addActionListener(ActionListener al)
 o removeActionListener
 public void removeActionListener(ActionListener al)
 o setEchoCharacter
 public void setEchoCharacter(char echo)
Sets the echo character for this TextField

Parameters:
echo - the echo character for this textfield
 o getEchoCharacter
 public char getEchoCharacter()
Sets the echo character for this TextField

Parameters:
echo - the echo character for this textfield
 o getText
 public String getText()
Returns the current text value this TextField

Returns:
the current text value this TextField
 o setTextNoRepaint
 public void setTextNoRepaint(String s)
Sets the new text value this TextField

Parameters:
the - new text value this TextField
 o setText
 public void setText(String s)
Sets the new text value this TextField

Parameters:
the - new text value this TextField
 o getSelectedText
 public String getSelectedText()
Returns the current selected text value this TextField

Returns:
the current selected text value this TextField
 o getSelectionStart
 public int getSelectionStart()
Returns the selected text's end position.

 o getSelectionEnd
 public int getSelectionEnd()
Returns the selected text's end position.

 o setCaretPosition
 public void setCaretPosition(int position)
Sets the position of the text insertion caret for the TextComponent

Parameters:
position - the position
Throws: IllegalArgumentException
If position is less than 0.
 o getCaretPosition
 public int getCaretPosition()
Returns the position of the text insertion caret for the text component.

Returns:
the position of the text insertion caret for the text component.
 o selectAll
 public void selectAll()
Select all the text in the textfield.

 o select
 public void select(int s0,
                    int s1)
Sets the new selected text value this TextField

Parameters:
the - new selected text from value this TextField
the - new selected text to value this TextField
 o isEditable
 public boolean isEditable()
Returns the boolean indicating whether this TextComponent is editable or not.

See Also:
setEditable
 o setEditable
 public synchronized void setEditable(boolean b)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.

Parameters:
b - the boolean to be set
See Also:
isEditable
 o update
 public void update(Graphics g)
Updates the component.

Overrides:
update in class Component
 o paint
 public synchronized void paint(Graphics g)
Paints the component.

Overrides:
paint in class Component
 o processMouseEvent
 public synchronized void processMouseEvent(MouseEvent me)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

Overrides:
processMouseEvent in class Component
 o processFocusEvent
 public synchronized void processFocusEvent(FocusEvent fe)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.

Overrides:
processFocusEvent in class Component
 o processKeyEvent
 public synchronized void processKeyEvent(KeyEvent ke)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.

Overrides:
processKeyEvent in class Component
 o ensureCapacity
 public void ensureCapacity(int newChars)
 o moveChars
 public void moveChars(int newChars)
 o insertChar
 public void insertChar(char c)
 o copyToClipBoard
 public void copyToClipBoard()
 o cutFromClipBoard
 public void cutFromClipBoard()
 o pasteFromClipBoard
 public void pasteFromClipBoard(String thisClip)
 o getNumLines
 public int getNumLines()
 o getMinimumSize
 public Dimension getMinimumSize()
Gets the minimum size of this component.

Overrides:
getMinimumSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index