Crossfire JXClient, Trunk
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.textinput.GUITextField Class Reference
Inheritance diagram for com.realtime.crossfire.jxclient.gui.textinput.GUITextField:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.gui.textinput.GUITextField:
Collaboration graph

Public Member Functions

void execute ()
 
TooltipText getTooltip ()
 
 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)
 
void notifyOpen ()
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.textinput.GUIText
Dimension getMaximumSize ()
 
Dimension getMinimumSize ()
 
Dimension getPreferredSize ()
 
String getText ()
 
boolean keyPressed (@NotNull final KeyEvent2 e)
 
void mouseClicked (@NotNull final MouseEvent e)
 
void paintComponent (@NotNull final Graphics g)
 
void setHideInput (final boolean hideInput)
 
void setText (@NotNull final String text)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement
void activateNextElement ()
 
void activatePrevElement ()
 
boolean isActive ()
 
void mousePressed (@NotNull final MouseEvent e)
 
void setActive (final boolean active)
 
void setNextActive (@NotNull final ActivatableGUIElement next)
 
void setPrevActive (@NotNull final ActivatableGUIElement prev)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
void dispose ()
 
int getDialogBorderBottom ()
 
int getDialogBorderLeft ()
 
int getDialogBorderRight ()
 
int getDialogBorderTop ()
 
String getName ()
 
void inhibitListeners ()
 
boolean isDefault ()
 
boolean isIgnore ()
 
void mouseDragged (@NotNull final MouseEvent e)
 
void mouseEntered (@NotNull final MouseEvent e)
 
void mouseExited (@NotNull final MouseEvent e)
 
void mouseMoved (@NotNull final MouseEvent e)
 
void mouseReleased (@NotNull final MouseEvent e)
 
void mouseWheelMoved (final int wheelRotation)
 
void setChanged ()
 
void setChangedListener (@Nullable final GUIElementChangedListener changedListener)
 
void setDefault (final boolean isDefault)
 
void setIgnore ()
 
String toString ()
 

Protected Member Functions

void execute (@NotNull final String command)
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.textinput.GUIText
void activeChanged ()
 
 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)
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement
 ActivatableGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory)
 
void markInactivePending ()
 
void setInactiveIfPending ()
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
 AbstractGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory)
 
TooltipText newTooltipText (@Nullable final String tooltipText)
 
void tooltipChanged ()
 

Private Attributes

final CommandList commandList
 

Static Private Attributes

static final long serialVersionUID = 1
 

Detailed Description

A text input field which executes a CommandList when ENTER is pressed.

Author
Andreas Kirschbaum

Definition at line 43 of file GUITextField.java.

Constructor & Destructor Documentation

◆ GUITextField()

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.

Parameters
commandCallbackthe command callback to use
commandHistorythe command history to use or
null
to disable command history access
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe name of this element
newCharModelthe new char model to show
activeImagethe element's background image when it is active
inactiveImagethe element's background image when it is inactive
fontthe font for rendering displayed text
inactiveColorthe color for rendering displayed text when the element is active; also cursor color
activeColorthe color for rendering displayed text when the element is active
marginthe left margin in pixels
textthe initially entered text
commandListthe command list for executing commands
guiFactorythe 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.

Member Function Documentation

◆ execute() [1/2]

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.

◆ execute() [2/2]

void com.realtime.crossfire.jxclient.gui.textinput.GUITextField.execute ( @NotNull final String  command)
protected

Will be called to execute the entered command.

Parameters
commandthe 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().

Here is the call graph for this function:

◆ getTooltip()

TooltipText com.realtime.crossfire.jxclient.gui.textinput.GUITextField.getTooltip ( )

Returns the current tooltip text.

Returns
the tooltip text or
null
to not show a tooltip

Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.

Definition at line 93 of file GUITextField.java.

◆ notifyOpen()

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.

Member Data Documentation

◆ commandList

final CommandList com.realtime.crossfire.jxclient.gui.textinput.GUITextField.commandList
private

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.textinput.GUITextField.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 48 of file GUITextField.java.


The documentation for this class was generated from the following file: