Crossfire JXClient, Trunk
|
Public Member Functions | |
void | dispose () |
void | execute () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
boolean | keyPressed (@NotNull final KeyEvent2 e) |
void | mouseClicked (@NotNull final MouseEvent e) |
void | mouseExited (@NotNull final MouseEvent e) |
void | mousePressed (@NotNull final MouseEvent e) |
void | mouseReleased (@NotNull final MouseEvent e) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement | |
void | activateNextElement () |
void | activatePrevElement () |
boolean | isActive () |
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 | |
int | getDialogBorderBottom () |
int | getDialogBorderLeft () |
int | getDialogBorderRight () |
int | getDialogBorderTop () |
String | getName () |
abstract TooltipText | getTooltip () |
void | inhibitListeners () |
boolean | isDefault () |
boolean | isIgnore () |
void | mouseDragged (@NotNull final MouseEvent e) |
void | mouseEntered (@NotNull final MouseEvent e) |
void | mouseMoved (@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 () |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.GUIElement | |
void | notifyOpen () |
Private Member Functions | |
void | updateEnabled () |
Private Attributes | |
final boolean | autoRepeat |
final CommandList | commandList |
final NewCharModelListener | listener = this::updateEnabled |
final NewCharModel | newCharModel |
final ActionListener | timeoutEvent = e -> execute() |
final Timer | timer = new Timer(TIMEOUT_FIRST, timeoutEvent) |
Static Private Attributes | |
static final long | serialVersionUID = 1 |
static final int | TIMEOUT_FIRST = 350 |
static final int | TIMEOUT_SECOND = 80 |
Abstract base class for button classes.
Definition at line 47 of file AbstractButton.java.
|
protected |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
opaque | whether this element is opaque |
autoRepeat | whether the button should autorepeat while being pressed |
commandList | the commands to execute when the button is elected |
guiFactory | the global GUI factory instance |
newCharModel | the global new char model instance |
Definition at line 111 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.label.NewCharModel.addListener(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.autoRepeat, com.realtime.crossfire.jxclient.gui.button.AbstractButton.commandList, com.realtime.crossfire.jxclient.gui.commandlist.CommandList.containsCommand(), com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.button.AbstractButton.listener, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.button.AbstractButton.newCharModel, com.realtime.crossfire.jxclient.gui.button.AbstractButton.TIMEOUT_SECOND, com.realtime.crossfire.jxclient.gui.button.AbstractButton.timer, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager, and com.realtime.crossfire.jxclient.gui.button.AbstractButton.updateEnabled().
void com.realtime.crossfire.jxclient.gui.button.AbstractButton.dispose | ( | ) |
Releases all allocated resources.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 125 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.commandList, com.realtime.crossfire.jxclient.gui.commandlist.CommandList.containsCommand(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.listener, com.realtime.crossfire.jxclient.gui.button.AbstractButton.newCharModel, and com.realtime.crossfire.jxclient.gui.label.NewCharModel.removeListener().
void com.realtime.crossfire.jxclient.gui.button.AbstractButton.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 223 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.commandList, and com.realtime.crossfire.jxclient.gui.commandlist.CommandList.execute().
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.keyPressed(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseClicked(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.mousePressed().
Dimension com.realtime.crossfire.jxclient.gui.button.AbstractButton.getMinimumSize | ( | ) |
Definition at line 239 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.getMinimumSizeInt().
|
abstractprotected |
Returns the minimal size needed to display this component.
Reimplemented in com.realtime.crossfire.jxclient.gui.button.GUITextButton, and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.getMinimumSize(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.getPreferredSize().
Dimension com.realtime.crossfire.jxclient.gui.button.AbstractButton.getPreferredSize | ( | ) |
Definition at line 232 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.getMinimumSizeInt().
boolean com.realtime.crossfire.jxclient.gui.button.AbstractButton.keyPressed | ( | @NotNull final KeyEvent2 | e | ) |
Invoked when a key has been pressed.
e | the key event for the key |
Implements com.realtime.crossfire.jxclient.gui.gui.KeyPressedHandler.
Definition at line 251 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.execute().
void com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseClicked | ( | @NotNull final MouseEvent | e | ) |
Will be called when the user has clicked (pressed+released) this element. This event will be delivered after mouseReleased(MouseEvent).
e | the mouse event relative to this element |
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 134 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.autoRepeat, com.realtime.crossfire.jxclient.gui.button.AbstractButton.execute(), and com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.setActive().
void com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseExited | ( | @NotNull final MouseEvent | e | ) |
Will be called when the mouse has left the bounding box of this element. This function will not be called unless mouseEntered(MouseEvent) has been called before.
e | the mouse event relative to this element |
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 209 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.autoRepeat, com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.setActive(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.timer.
void com.realtime.crossfire.jxclient.gui.button.AbstractButton.mousePressed | ( | @NotNull final MouseEvent | e | ) |
Will be called when the user has pressed the mouse inside this element.
e | the mouse event relative to this element |
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.
Definition at line 184 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.autoRepeat, com.realtime.crossfire.jxclient.gui.button.AbstractButton.execute(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.timer.
void com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseReleased | ( | @NotNull final MouseEvent | e | ) |
Will be called when the user has released the mouse. This event may be delivered even if no previous mousePressed(MouseEvent) has been delivered before.
e | the mouse event relative to this element |
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 159 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.autoRepeat, com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.setActive(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.timer.
|
private |
Updates the enabled state.
Definition at line 269 of file AbstractButton.java.
References com.realtime.crossfire.jxclient.gui.label.NewCharModel.hasNonServerFailureErrorText(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.newCharModel.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.AbstractButton().
|
private |
Whether this button should autorepeat.
Definition at line 67 of file AbstractButton.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.AbstractButton(), com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), com.realtime.crossfire.jxclient.gui.button.GUISelectableButton.GUISelectableButton(), com.realtime.crossfire.jxclient.gui.button.GUITextButton.GUITextButton(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseClicked(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseExited(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.mousePressed(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseReleased().
|
private |
The commands to execute when the button is elected.
Definition at line 73 of file AbstractButton.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.AbstractButton(), com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.dispose(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.execute(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), com.realtime.crossfire.jxclient.gui.button.GUISelectableButton.GUISelectableButton(), and com.realtime.crossfire.jxclient.gui.button.GUITextButton.GUITextButton().
|
private |
The listener attached to newCharModel.
Definition at line 97 of file AbstractButton.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.AbstractButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.dispose().
|
private |
The global NewCharModel instance.
Definition at line 79 of file AbstractButton.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.AbstractButton(), com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.dispose(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), com.realtime.crossfire.jxclient.gui.button.GUISelectableButton.GUISelectableButton(), com.realtime.crossfire.jxclient.gui.button.GUITextButton.GUITextButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.updateEnabled().
|
staticprivate |
The serial version UID.
Definition at line 52 of file AbstractButton.java.
|
staticprivate |
The autorepeat delay initially.
Definition at line 57 of file AbstractButton.java.
|
staticprivate |
The autorepeat delay for further repeats.
Definition at line 62 of file AbstractButton.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.AbstractButton().
|
private |
The ActionListener for generating autorepeat events.
Definition at line 85 of file AbstractButton.java.
|
private |
The Timer for auto-repeating buttons.
Definition at line 91 of file AbstractButton.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.AbstractButton(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseExited(), com.realtime.crossfire.jxclient.gui.button.AbstractButton.mousePressed(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.mouseReleased().