| |
|
| com.javujavu.javux.wings.WingComponent com.javujavu.javux.wings.WingTextField
WingTextField | public class WingTextField extends WingComponent (Code) | | WingTextField is a component that allows the editing
of a single line of text.
This class is thread safe.
|
Constructor Summary | |
public | WingTextField() Constructs a new text field. | public | WingTextField(int cols) Constructs a new empty text field with the specified number
of columns. | public | WingTextField(String text, int cols) Constructs a new text field with the specified custom style ID
initialized with the specified text
and wide enough to hold the specified
number of columns.
Parameters: styleId - custom style ID Parameters: text - the text to be displayed. |
caretWidth | protected int caretWidth(Code) | | |
focused | protected boolean focused(Code) | | |
readonly | protected boolean readonly(Code) | | |
WingTextField | public WingTextField()(Code) | | Constructs a new text field.
|
WingTextField | public WingTextField(int cols)(Code) | | Constructs a new empty text field with the specified number
of columns.
Parameters: cols - the number of columns |
WingTextField | public WingTextField(String text, int cols)(Code) | | Constructs a new text field with the specified custom style ID
initialized with the specified text
and wide enough to hold the specified
number of columns.
Parameters: styleId - custom style ID Parameters: text - the text to be displayed. Iftext is null , the emptystring "" will be displayed. Parameters: cols - the number of columns. |
addTextListener | public void addTextListener(TextListener l)(Code) | | Adds the specified text event listener to receive text events
from this text component.
If l is null , no exception is
thrown and no action is performed.
Parameters: l - the text event listener |
copy | public void copy()(Code) | | Transfers the currently selected range in the
text field to the system clipboard, leaving the contents
in the text field.
|
cut | public void cut()(Code) | | Transfers the currently selected range in the
text field to the system clipboard, removing the contents
from the text field.
|
doLayout | public void doLayout()(Code) | | |
getSelectedText | public synchronized String getSelectedText()(Code) | | Returns the selected text from the text that is
presented by this text field.
the selected text of this text field |
getText | public String getText()(Code) | | Returns the text that is presented by this text field.
By default, this is an empty string.
the value of this WingTextComponent |
insert | public synchronized void insert(int pos, String text)(Code) | | Inserts the specified text at the specified position
in this text area.
This method allows negative position values.
The text with negative position is inserted at getText().length()+pos+1
which means at the end of the field for pos = -1
Parameters: text - the text to insert Parameters: pos - the position at which to insert |
loadSkin | public void loadSkin()(Code) | | Loads skin resources.
styles:
[optional styleID.]textfield.doc.normal
[optional styleID.]textfield.doc.selected
[optional styleID.]textfield.doc.focused
[optional styleID.]textfield.doc.disabled
[optional styleID.]textfield.doc.readonly
extra properties:
[optional styleID.]textfield.caret.color
[optional styleID.]textfield.caret.width
See Also: Style See Also: WingSkin |
paste | public void paste()(Code) | | Transfers the contents of the system clipboard into the
text field.
|
remove | public synchronized void remove(int start, int end)(Code) | | Removes text between the specified start and end positions
Parameters: start - the start position Parameters: end - the end position |
replaceSelection | public synchronized void replaceSelection(String text)(Code) | | Replaces the currently selected content with new content
represented by the given string. If there is no selection
this amounts to an insert of the given text. If there
is no replacement text this amounts to a removal of the
current selection.
Parameters: text - the content to replace the selection with |
selectAll | public synchronized void selectAll()(Code) | | Selects all the text in this text component.
|
setColumns | public void setColumns(int columns)(Code) | | Sets the number of columns in this text field.
Parameters: columns - the number of columns. |
setEcho | public synchronized void setEcho(String echo)(Code) | | Sets the echo characters for this text field.
An echo 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 echo = null allows
user input to be echoed to the screen again.
Parameters: echo - the echo characters for this text field. |
setEditable | public void setEditable(boolean b)(Code) | | Sets the flag that determines whether or not this
text field is editable.
Parameters: b - a flag indicating whether this text fieldis user editable. |
setHorizontalAlignment | public synchronized void setHorizontalAlignment(int alignment)(Code) | | Sets the horizontal alignment of the text.
Valid keys are:
WingTextField.LEFT
WingTextField.RIGHT
Parameters: alignment - the alignment since: WingS 1.1.1 |
setText | public synchronized void setText(String text)(Code) | | Sets the text that is presented by this
text filed to be the specified text.
Parameters: text - the new text. |
Methods inherited from com.javujavu.javux.wings.WingComponent | public void addActionListener(ActionListener l)(Code)(Java Doc) public void addItemListener(ItemListener l)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public void addShortcut(Shortcut s)(Code)(Java Doc) public void addShortcuts(WingComponent source)(Code)(Java Doc) protected void cancelPopup(WingComponent src)(Code)(Java Doc) protected static void clrPopup(WingComponent popup)(Code)(Java Doc) protected void dispatchEventOET(AWTEvent e)(Code)(Java Doc) protected boolean dispatchEventsOET()(Code)(Java Doc) protected void dispatchShortcuts(KeyEvent e)(Code)(Java Doc) protected void doScrollRectToVisible(Rectangle r)(Code)(Java Doc) public static void enablePopups(boolean enableLightweightPopups, boolean enableHeavyweightPopups)(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public String getClipboardText()(Code)(Java Doc) public Font getFont()(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public Frame getParentFrame()(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) public ItemRenderer getRenderer()(Code)(Java Doc) public WingRootPane getRootPane()(Code)(Java Doc) public void getScrollIncrements(Point unit, Point block)(Code)(Java Doc) public Style getStyle()(Code)(Java Doc) public Object getTooltipAt(int x, int y)(Code)(Java Doc) public Dimension getViewOrSize()(Code)(Java Doc) public Dimension getViewSize()(Code)(Java Doc) protected Dimension getViewSize(WingComponent child)(Code)(Java Doc) public WingFont getWingFont()(Code)(Java Doc) protected void hideTooltip()(Code)(Java Doc) public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h)(Code)(Java Doc) public void invalidate()(Code)(Java Doc) public boolean isFocusTraversable()(Code)(Java Doc) public void loadSkin()(Code)(Java Doc) public void mouseWheelMoved(Object source, int wheelRotation)(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintBackground(Graphics g)(Code)(Java Doc) public void paintComponent(Graphics g)(Code)(Java Doc) public void postOnEventThread(AWTEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) protected void processKeyEvent(KeyEvent e)(Code)(Java Doc) protected void processMouseEvent(MouseEvent e)(Code)(Java Doc) protected void processMouseMotionEvent(MouseEvent e)(Code)(Java Doc) public void removeActionListener(ActionListener l)(Code)(Java Doc) public void removeItemListener(ItemListener l)(Code)(Java Doc) public void removeShortcut(Shortcut s)(Code)(Java Doc) public void removeShortcuts(WingComponent source)(Code)(Java Doc) public void repaintVisible()(Code)(Java Doc) public boolean repaintVisible(int x, int y, int width, int height)(Code)(Java Doc) public void revalidateAndRepaint()(Code)(Java Doc) public void scrollRectToVisible(Rectangle r)(Code)(Java Doc) public void setClipboardText(String text)(Code)(Java Doc) public static void setDebugDelay(int debugDelay)(Code)(Java Doc) public static void setDoubleBuffering(boolean doubleBuffering)(Code)(Java Doc) public void setEnabled(boolean b)(Code)(Java Doc) protected static void setPopup(WingComponent popup)(Code)(Java Doc) public void setPreferredSize(Dimension prefSize)(Code)(Java Doc) public void setRenderer(ItemRenderer renderer)(Code)(Java Doc) public void setStyleId(String styleId)(Code)(Java Doc) public void setTooltip(Object tooltip)(Code)(Java Doc) public void setTopStyle(Style topStyle)(Code)(Java Doc) public void setWingFocusable(boolean focusable)(Code)(Java Doc) protected void showTooltip(Point point)(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) protected void updateShortcuts(WingComponent target, boolean add)(Code)(Java Doc) public static void updateSkin(Container c)(Code)(Java Doc) protected void validateTree()(Code)(Java Doc) public void wingHierarchyChanged(boolean showing)(Code)(Java Doc) public void wingPaint(Graphics g)(Code)(Java Doc) protected void wingProcessActionEvent(ActionEvent e)(Code)(Java Doc) protected void wingProcessItemEvent(ItemEvent e)(Code)(Java Doc) protected void wingProcessKeyEvent(KeyEvent e, WingComponent redirecting)(Code)(Java Doc) protected void wingProcessMouseEvent(MouseEvent e)(Code)(Java Doc) public void wingRequestFocusInWindow()(Code)(Java Doc) protected void wingValidate()(Code)(Java Doc)
|
|
|
|