![]() |
Crossfire JXClient, Trunk
|
A text input field which executes a CommandList when ENTER is pressed. More...
Public Member Functions | |
void | execute () |
Executes the actions associated with this GUI element. More... | |
TooltipText | getTooltip () |
Returns the current tooltip text. More... | |
GUITextField (@NotNull final CommandCallback commandCallback, @Nullable final CommandHistory commandHistory, @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final NewCharModel newCharModel, @NotNull final Image activeImage, @NotNull final Image inactiveImage, @NotNull final Font font, @NotNull final Color inactiveColor, @NotNull final Color activeColor, final int margin, @NotNull final String text, @NotNull final CommandList commandList, @NotNull final GuiFactory guiFactory) | |
Creates a new instance. More... | |
void | notifyOpen () |
Called each time the enclosing dialog is opened (or raised). More... | |
![]() | |
Dimension | getMaximumSize () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
String | getText () |
Returns the entered text. More... | |
boolean | keyPressed (@NotNull final KeyEvent2 e) |
Invoked when a key has been pressed. More... | |
void | mouseClicked (@NotNull final MouseEvent e) |
Will be called when the user has clicked (pressed+released) this element. More... | |
void | paintComponent (@NotNull final Graphics g) |
void | setHideInput (final boolean hideInput) |
Enables or disables hidden text. More... | |
void | setText (@NotNull final String text) |
Sets the entered text. More... | |
![]() | |
void | activateNextElement () |
Activates the following element. More... | |
void | activatePrevElement () |
Activates the previous element. More... | |
boolean | isActive () |
Returns whether a GUI element is active. More... | |
void | mousePressed (@NotNull final MouseEvent e) |
Will be called when the user has pressed the mouse inside this element. More... | |
void | setActive (final boolean active) |
Sets the active state of a GUI element. More... | |
void | setNextActive (@NotNull final ActivatableGUIElement next) |
Sets the next activatable GUI element in the same dialog. More... | |
void | setPrevActive (@NotNull final ActivatableGUIElement prev) |
Sets the previous activatable GUI element in the same dialog. More... | |
![]() | |
void | dispose () |
Releases all allocated resources. More... | |
int | getDialogBorderBottom () |
Returns the size of the dialog's bottom border. More... | |
int | getDialogBorderLeft () |
Returns the size of the dialog's left border. More... | |
int | getDialogBorderRight () |
Returns the size of the dialog's right border. More... | |
int | getDialogBorderTop () |
Returns the size of the dialog's top border. More... | |
String | getName () |
Returns the internal name of this gui element. More... | |
void | inhibitListeners () |
Prevents change listeners to be notified. More... | |
boolean | isDefault () |
Returns whether this element is the default element. More... | |
boolean | isIgnore () |
Returns whether this gui element is to be ignored for user interaction. More... | |
void | mouseDragged (@NotNull final MouseEvent e) |
Will be called when the mouse moves within this component while the button is pressed. More... | |
void | mouseEntered (@NotNull final MouseEvent e) |
Will be called when the mouse has entered the bounding box of this element. More... | |
void | mouseExited (@NotNull final MouseEvent e) |
Will be called when the mouse has left the bounding box of this element. More... | |
void | mouseMoved (@NotNull final MouseEvent e) |
Will be called when the mouse moves within this component. More... | |
void | mouseReleased (@NotNull final MouseEvent e) |
Will be called when the user has released the mouse. More... | |
void | mouseWheelMoved (final int wheelRotation) |
Will be called when the mouse wheel has been moved. More... | |
void | setChanged () |
Records that the contents have changed and must be repainted. More... | |
void | setChangedListener (@Nullable final GUIElementChangedListener changedListener) |
Sets the GUIElementChangedListener to be notified. More... | |
void | setDefault (final boolean isDefault) |
Sets whether this element is the default element. More... | |
void | setIgnore () |
Marks this gui element to be ignored for user interaction. More... | |
String | toString () |
Protected Member Functions | |
void | execute (@NotNull final String command) |
Will be called to execute the entered command. More... | |
![]() | |
void | activeChanged () |
Will be called whenever the active state has changed. More... | |
GUIText (@NotNull final CommandCallback commandCallback, @Nullable final CommandHistory commandHistory, @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final NewCharModel newCharModel, @NotNull final Image activeImage, @NotNull final Image inactiveImage, @NotNull final Font font, @NotNull final Color inactiveColor, @NotNull final Color activeColor, final int margin, @NotNull final String text, @NotNull final GuiFactory guiFactory) | |
Creates a new instance. More... | |
![]() | |
ActivatableGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory) | |
Creates a new instance. More... | |
void | markInactivePending () |
Marks this GUI element as pending inactive. More... | |
void | setInactiveIfPending () |
Unsets the active state of this GUI element if it is pending. More... | |
![]() | |
AbstractGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory) | |
Creates a new instance. More... | |
TooltipText | newTooltipText (@Nullable final String tooltipText) |
Creates a TooltipText instance relative to this instance. More... | |
void | tooltipChanged () |
Must be called whenever the tooltip may have changed. More... | |
Private Attributes | |
final CommandList | commandList |
The CommandList for executing commands. More... | |
Static Private Attributes | |
static final long | serialVersionUID = 1 |
The serial version UID. More... | |
A text input field which executes a CommandList when ENTER is pressed.
Definition at line 43 of file GUITextField.java.
com.realtime.crossfire.jxclient.gui.textinput.GUITextField.GUITextField | ( | @NotNull final CommandCallback | commandCallback, |
@Nullable final CommandHistory | commandHistory, | ||
@NotNull final TooltipManager | tooltipManager, | ||
@NotNull final GUIElementListener | elementListener, | ||
@NotNull final String | name, | ||
@NotNull final NewCharModel | newCharModel, | ||
@NotNull final Image | activeImage, | ||
@NotNull final Image | inactiveImage, | ||
@NotNull final Font | font, | ||
@NotNull final Color | inactiveColor, | ||
@NotNull final Color | activeColor, | ||
final int | margin, | ||
@NotNull final String | text, | ||
@NotNull final CommandList | commandList, | ||
@NotNull final GuiFactory | guiFactory | ||
) |
Creates a new instance.
commandCallback | the command callback to use |
commandHistory | the command history to use or null
|
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
newCharModel | the new char model to show |
activeImage | the element's background image when it is active |
inactiveImage | the element's background image when it is inactive |
font | the font for rendering displayed text |
inactiveColor | the color for rendering displayed text when the element is active; also cursor color |
activeColor | the color for rendering displayed text when the element is active |
margin | the left margin in pixels |
text | the initially entered text |
commandList | the command list for executing commands |
guiFactory | the global GUI factory instance |
Definition at line 77 of file GUITextField.java.
References com.realtime.crossfire.jxclient.gui.textinput.GUIText.activeColor, com.realtime.crossfire.jxclient.gui.textinput.GUIText.activeImage, com.realtime.crossfire.jxclient.gui.textinput.GUIText.commandCallback, com.realtime.crossfire.jxclient.gui.textinput.GUIText.commandHistory, com.realtime.crossfire.jxclient.gui.textinput.GUITextField.commandList, com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.textinput.GUIText.font, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.textinput.GUIText.inactiveColor, com.realtime.crossfire.jxclient.gui.textinput.GUIText.inactiveImage, com.realtime.crossfire.jxclient.gui.textinput.GUIText.margin, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.textinput.GUIText.newCharModel, com.realtime.crossfire.jxclient.gui.textinput.GUIText.text, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager.
void com.realtime.crossfire.jxclient.gui.textinput.GUITextField.execute | ( | ) |
Executes the actions associated with this GUI element.
Does nothing if this element has no associated actions.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.
Definition at line 98 of file GUITextField.java.
|
protected |
Will be called to execute the entered command.
command | the entered command |
Reimplemented from com.realtime.crossfire.jxclient.gui.textinput.GUIText.
Definition at line 83 of file GUITextField.java.
References com.realtime.crossfire.jxclient.gui.textinput.GUITextField.commandList, and com.realtime.crossfire.jxclient.gui.commandlist.CommandList.execute().
TooltipText com.realtime.crossfire.jxclient.gui.textinput.GUITextField.getTooltip | ( | ) |
Returns the current tooltip text.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 93 of file GUITextField.java.
void com.realtime.crossfire.jxclient.gui.textinput.GUITextField.notifyOpen | ( | ) |
Called each time the enclosing dialog is opened (or raised).
Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.
Definition at line 88 of file GUITextField.java.
|
private |
The CommandList for executing commands.
Definition at line 54 of file GUITextField.java.
Referenced by com.realtime.crossfire.jxclient.gui.textinput.GUITextField.execute(), and com.realtime.crossfire.jxclient.gui.textinput.GUITextField.GUITextField().
|
staticprivate |
The serial version UID.
Definition at line 48 of file GUITextField.java.