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.
-
TextField()
- Constructs a new TextField.
-
TextField(String)
- Constructs a new TextField initialized with the specified text.
-
TextField(String, int)
- Constructs a new TextField initialized with the specified text.
-
addActionListener(ActionListener)
-
-
copyToClipBoard()
-
-
cutFromClipBoard()
-
-
ensureCapacity(int)
-
-
getCaretPosition()
- Returns the position of the text insertion caret for the
text component.
-
getEchoCharacter()
- Sets the echo character for this TextField
-
getMinimumSize()
- Gets the minimum size of this component.
-
getNumLines()
-
-
getSelectedText()
- Returns the current selected text value this TextField
-
getSelectionEnd()
- Returns the selected text's end position.
-
getSelectionStart()
- Returns the selected text's end position.
-
getText()
- Returns the current text value this TextField
-
insertChar(char)
-
-
isEditable()
- Returns the boolean indicating whether this TextComponent is
editable or not.
-
moveChars(int)
-
-
paint(Graphics)
-
Paints the component.
-
pasteFromClipBoard(String)
-
-
processFocusEvent(FocusEvent)
-
Processes focus events occurring on this component by
dispatching them to any registered FocusListener objects.
-
processKeyEvent(KeyEvent)
-
Processes key events occurring on this component by
dispatching them to any registered KeyListener objects.
-
processMouseEvent(MouseEvent)
-
Processes mouse events occurring on this component by
dispatching them to any registered MouseListener objects.
-
removeActionListener(ActionListener)
-
-
select(int, int)
- Sets the new selected text value this TextField
-
selectAll()
- Select all the text in the textfield.
-
setCaretPosition(int)
- Sets the position of the text insertion caret for the TextComponent
-
setEchoCharacter(char)
- Sets the echo character for this TextField
-
setEditable(boolean)
- Sets the specified boolean to indicate whether or not this
TextComponent should be editable.
-
setText(String)
- Sets the new text value this TextField
-
setTextNoRepaint(String)
- Sets the new text value this TextField
-
update(Graphics)
-
Updates the component.
TextField
public TextField()
- Constructs a new TextField.
TextField
public TextField(String text)
- Constructs a new TextField initialized with the specified text.
- Parameters:
- text - the text to be displayed
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
addActionListener
public void addActionListener(ActionListener al)
removeActionListener
public void removeActionListener(ActionListener al)
setEchoCharacter
public void setEchoCharacter(char echo)
- Sets the echo character for this TextField
- Parameters:
- echo - the echo character for this textfield
getEchoCharacter
public char getEchoCharacter()
- Sets the echo character for this TextField
- Parameters:
- echo - the echo character for this textfield
getText
public String getText()
- Returns the current text value this TextField
- Returns:
- the current text value this TextField
setTextNoRepaint
public void setTextNoRepaint(String s)
- Sets the new text value this TextField
- Parameters:
- the - new text value this TextField
setText
public void setText(String s)
- Sets the new text value this TextField
- Parameters:
- the - new text value this TextField
getSelectedText
public String getSelectedText()
- Returns the current selected text value this TextField
- Returns:
- the current selected text value this TextField
getSelectionStart
public int getSelectionStart()
- Returns the selected text's end position.
getSelectionEnd
public int getSelectionEnd()
- Returns the selected text's end position.
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.
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.
selectAll
public void selectAll()
- Select all the text in the textfield.
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
isEditable
public boolean isEditable()
- Returns the boolean indicating whether this TextComponent is
editable or not.
- See Also:
- setEditable
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
update
public void update(Graphics g)
- Updates the component.
- Overrides:
- update in class Component
paint
public synchronized void paint(Graphics g)
- Paints the component.
- Overrides:
- paint in class Component
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
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
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
ensureCapacity
public void ensureCapacity(int newChars)
moveChars
public void moveChars(int newChars)
insertChar
public void insertChar(char c)
copyToClipBoard
public void copyToClipBoard()
cutFromClipBoard
public void cutFromClipBoard()
pasteFromClipBoard
public void pasteFromClipBoard(String thisClip)
getNumLines
public int getNumLines()
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