addActionListener
addActionListener: (JTextField, any) -> ()Adds an ActionListener (a table with actionPerformed, or a function of the event): Enter in the field runs it, the last added first.
JTextField.new(…)
FlatTextField.new():getTextField()| Method | Returns | Description |
|---|---|---|
addActionListener(any) | () | Adds an ActionListener (a table with actionPerformed, or a function of the event): Enter in the field runs it, the last added first. |
removeActionListener(any) | () | Removes an ActionListener, by identity. |
getActionListeners() | {any} | A copy of the ActionListeners, in registration order. |
setActionCommand(string?) | () | The command its ActionEvents carry (the text, when none is set). |
getColumns() | number | The width in columns (0: as wide as the text). |
setColumns(number) | () | Sets the width in columns; the field is laid out again. |
getHorizontalAlignment() | number | The text's horizontal alignment. |
setHorizontalAlignment(number) | () | Aligns the text (JTextField.LEFT, CENTER, RIGHT, LEADING, TRAILING). |
new(string?) | JTextField | () -> JTextField: An empty field. |
new(number) | JTextField | |
new(string?, number) | JTextField | |
init(JTextField, string?) | () | (JTextField) -> (): An empty field. |
init(JTextField, number) | () | |
init(JTextField, string?, number) | () | |
isInstance(any) | boolean | Whether obj is a JTextField object, a class(JTextField) subclass's included. |
| Field | Type | Description |
|---|---|---|
super | JTextComponentClass | JTextComponent's class table: the base class. |
| Method | Returns | Description |
|---|---|---|
FlatTextField.getTextField | JTextField | The JTextField inside. |
JTextFieldClass.new | JTextField | () -> JTextField: An empty field. |
addActionListeneraddActionListener: (JTextField, any) -> ()Adds an ActionListener (a table with actionPerformed, or a function of the event): Enter in the field runs it, the last added first.
removeActionListenerremoveActionListener: (JTextField, any) -> ()Removes an ActionListener, by identity.
getActionListenersgetActionListeners: (JTextField) -> {any}A copy of the ActionListeners, in registration order.
setActionCommandsetActionCommand: (JTextField, string?) -> ()The command its ActionEvents carry (the text, when none is set).
getColumnsgetColumns: (JTextField) -> numberThe width in columns (0: as wide as the text).
setColumnssetColumns: (JTextField, number) -> ()Sets the width in columns; the field is laid out again.
getHorizontalAlignmentgetHorizontalAlignment: (JTextField) -> numberThe text's horizontal alignment.
setHorizontalAlignmentsetHorizontalAlignment: (JTextField, number) -> ()Aligns the text (JTextField.LEFT, CENTER, RIGHT, LEADING, TRAILING).
newnew: ((string?) -> JTextField) & ((number) -> JTextField) & ((string?, number) -> JTextField)() -> JTextField: An empty field.
(string?) -> JTextField: A field showing text.
(number) -> JTextField: An empty field columns wide.
(string?, number) -> JTextField: A field showing text, columns wide.
initinit: ((JTextField, string?) -> ()) & ((JTextField, number) -> ()) & ((JTextField, string?, number) -> ())(JTextField) -> (): An empty field.
(JTextField, string?) -> (): A field showing text.
(JTextField, number) -> (): An empty field columns wide.
(JTextField, string?, number) -> (): A field showing text, columns wide.
isInstanceisInstance: (any) -> booleanWhether obj is a JTextField object, a class(JTextField) subclass's included.