Component | +--Control | +--Editpublic class Edit
Creates a standard Windows edit control. This control supports multiline editing, password character masking, and so forth.
Constructors
Name | Description |
---|---|
Edit() | Creates a new Edit control, using parent control's current font and color settings. |
Methods
Name | Description |
---|---|
clear() | Clears the edit control. |
getAutoSize() | Retrieves a booolean value that indicates whether the control is configured to support auto-sizing. |
getBorderStyle() | Returns the border style of the Edit control. |
getCharacterCasing() | Retrieves a constant that indicates whether the control modifies the case of characters as they are typed into the control. |
getCreateParams() | Topic under construction. |
getHideSelection() | Retrieves a boolean value that indicates whether the control currently hides selected text when the control loses input focus. |
getInputKey(int keyData) | Topic under construction. |
getLines() | Retrieves the text in the Edit control, and returns the text in an array of String objects. |
getMaxLength() | Retrieves the maximum number of characters that can be typed into the Edit control. |
getMultiline() | Retrieves a boolean value that indicates whether this is a multiline edit control. |
getPasswordChar() | Retrieves the character used to display passwords for a single-line Edit control. |
getPreferredHeight() | Retrieves the preferred height of the Edit control. |
getReadOnly() | Retrieves a boolean value that indicates whether the Edit control is read-only. |
getReturnWanted() | Retrieves a boolean value that indicates whether a multiline Edit control allows RETURN keys to be processed as input. |
getScrollBars() | Retrieves the current scroll bar settings for a multiline Edit control. |
getSelectedText() | Retrieves the currently selected text, and returns it in a String object. |
getSelectionEnd() | Retrieves the zero-based index of the last character in the current selection. |
getSelectionStart() | Retrieves the zero-based index of the first character in the current selection. |
getTabWanted() | Retrieves a boolean value that indicates whether a multiline Edit control allows TAB keys to be processed as input. |
getTextAlign() | Retrieves a constant that indicates the current text-alignment settings on the control. |
getWordWrap() | Retrieves a boolean value that indicates whether word-wrapping is set on a multiline Edit control. |
onCreateHandle() | Overridden to update the newly created handle with the settings of the MaxLength and PasswordChar properties. |
select(int start, int end) | Selects the text within the specified range. |
selectAll() | Selects all characters in the Edit control. |
setAutoSize(boolean value) | Controls whether the height of a single-line Edit control is automatically adjusted when the control's font changes. |
setBorderStyle(int value) | Sets the border for the Edit control. |
setBoundsCore(int x, int y, int width, int height) | Overrides Control.setBoundsCore to enforce autoSize. |
setCharacterCasing(int value) | Specifies whether the case of characters should be modified as they are typed into the Edit control. |
setHideSelection(boolean value) | Controls whether the Edit control hides selected text when the control loses input focus. |
setLines(String[] lines) | Initializes a multiline Edit control to contain the contents of an array of String objects, where one string is displayed on each line. |
setMaxLength(int value) | Specifies the maximum number of characters that can be entered into an Edit control. |
setMultiline(boolean value) | Specifies whether the Edit control is multiline. |
setPasswordChar(char value) | Sets the password character for a single-line Edit control. |
setReadOnly(boolean value) | Specifies whether the edit control is read-only. |
setReturnWanted(boolean value) | Specifies whether a multiline Edit control processes the RETURN key as an input character. |
setScrollBars(int value) | Specifies how scroll bars will be displayed in multiline Edit controls. |
setSelectedText(String value) | Replaces the currently selected text with the specified text. |
setSelectionEnd(int value) | Specifies the zero-based index of the last character of a text selection in the Edit control. |
setSelectionStart(int value) | Specifies the zero-based index of the first character of a text selection in the Edit control. |
setTabWanted(boolean value) | Specifies whether a multiline Edit control processes the TAB key as an input character. |
setTextAlign(int value) | Specifies the alignment of the text in the Edit control. |
setWordWrap(boolean value) | Specifies whether word-wrapping is on in a multiline Edit control. |
Creates a new Edit control, using parent control's current font and color settings.
Clears the edit control.
Returns true if the control is currently set to auto-size; otherwise, returns false.
Retrieves a booolean value that indicates whether the control is configured to support auto-sizing. If auto-sizing is on, the size of the control is automatically adjusted when the font is changed.
Returns one of the constants defined in the BorderStyle class. The two possible values are BorderStyle.NONE and BorderStyle.FIXED_SINGLE.
Returns the border style of the Edit control.
Returns one of the values defined in the CharacterCasing enumeration.
Retrieves a constant that indicates whether the control modifies the case of characters as they are typed into the control. Characters can be converted to uppercase, lowercase, or not converted.
Topic under construction.
getCreateParams() in Control.
Returns true if the control hides the text; otherwise, returns false.
Retrieves a boolean value that indicates whether the control currently hides selected text when the control loses input focus.
Topic under construction.
getInputKey(int) in Control.
Returns an arry of strings that contains the contents of the Edit control.
Retrieves the text in the Edit control, and returns the text in an array of String objects. Each line of the text box is returned as a new element in the array. For single-line Edit controls, this array consists of a single element.
Returns zero or an integer that indicates the maximum character capacity of the control.
Retrieves the maximum number of characters that can be typed into the Edit control. A return value of zero indicates that the maximum capacity of the Edit control is limited only to available memory.
Returns true if this is a multiline control; otherwise, returns false.
Retrieves a boolean value that indicates whether this is a multiline edit control. By default, the Edit control is a single-line control.
Returns zero or the text of the character used to mask passwords.
Retrieves the character used to display passwords for a single-line Edit control. A return value of zero indicates that the Edit control is not currently being used to enter passwords.
Returns an integer indicating the preferred height of the control. To adjust the preferred height, use the adjustHeight method.
Retrieves the preferred height of the Edit control. This calculation is based on the assumption that a single line of text will be displayed in the control.
Returns true if the control is read-only; otherwise, returns false.
Retrieves a boolean value that indicates whether the Edit control is read-only. If the control is read-only,the system beeps when a user attempts to type text into the control.
Returns true if the RETURN key can be processed as input; otherwise, returns false.
Retrieves a boolean value that indicates whether a multiline Edit control allows RETURN keys to be processed as input.
Returns one of the ScrollBars enumeration constants.
Retrieves the current scroll bar settings for a multiline Edit control. These settings are defined in the ScrollBars enumeration.
Returns the currently selected text if text is selected; otherwise, returns null.
Retrieves the currently selected text, and returns it in a String object.
Returns the zero-based index of the last character in the selection
Retrieves the zero-based index of the last character in the current selection.
Retrieves the zero-based index of the first character in the current selection.
Returns true if TAB keys can be processed as input; otherwise, returns false.
Retrieves a boolean value that indicates whether a multiline Edit control allows TAB keys to be processed as input.
Returns one of the constants defined in the HorizontalAlignment enumeration.
Retrieves a constant that indicates the current text-alignment settings on the control. This setting applies only to multiline Edit controls.
Returns true if word-wrapping is on; otherwise, returns false.
Retrieves a boolean value that indicates whether word-wrapping is set on a multiline Edit control.
Overridden to update the newly created handle with the settings of the MaxLength and PasswordChar properties.
onCreateHandle() in Control.
Selects the text within the specified range.
Selects all characters in the Edit control.
Controls whether the height of a single-line Edit control is automatically adjusted when the control's font changes.
Sets the border for the Edit control.
Overrides Control.setBoundsCore to enforce autoSize.
setBoundsCore(int,int,int,int) in Control.
Specifies whether the case of characters should be modified as they are typed into the Edit control.
IllegalArgumentException thrown if the specified value is less than CharacterCasing.MIN or greater than CharacterCasing.MAX.
Controls whether the Edit control hides selected text when the control loses input focus.
Initializes a multiline Edit control to contain the contents of an array of String objects, where one string is displayed on each line. A carriage return/newline within a single element of the array results in the creation of a new line in the control.
Specifies the maximum number of characters that can be entered into an Edit control. A value of zero indicates that the Edit control's capacity should be limited only by available memory.
Specifies whether the Edit control is multiline. By default, the Edit control is a single-line control that ignores ENTER characters.
Sets the password character for a single-line Edit control.
Specifies whether the edit control is read-only.
Specifies whether a multiline Edit control processes the RETURN key as an input character.
Specifies how scroll bars will be displayed in multiline Edit controls.
Replaces the currently selected text with the specified text.
Specifies the zero-based index of the last character of a text selection in the Edit control.
Specifies the zero-based index of the first character of a text selection in the Edit control.
Specifies whether a multiline Edit control processes the TAB key as an input character.
Specifies the alignment of the text in the Edit control. This method applies only to multiline Edit controls.
Specifies whether word-wrapping is on in a multiline Edit control.