Crossfire JXClient, Trunk
|
Public Member Functions | |
void | button1Clicked (final int modifiers) |
void | button2Clicked (final int modifiers) |
void | button3Clicked (final int modifiers) |
boolean | canScroll (final int distance) |
void | dispose () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
TooltipText | getTooltip () |
GUIItemShortcut (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final Color activateColor, @Nullable final Image activateImage, @Nullable final Color immediateColor, @Nullable final Image immediateImage, @NotNull final ShortcutSlot shortcutSlot, @NotNull final FacesManager facesManager, @NotNull final CommandExecutor commandExecutor, @NotNull final Shortcuts shortcuts, @NotNull final Font font, @NotNull final GuiFactory guiFactory) | |
void | notifyOpen () |
void | paintComponent (@NotNull final Graphics g) |
void | resetScroll () |
void | scroll (final int distance) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.item.GUIItem | |
void | activeChanged () |
void | execute () |
void | mouseClicked (@NotNull final MouseEvent e) |
void | setVisible (final boolean aFlag) |
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 | |
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 () |
Private Member Functions | |
Shortcut | getShortcut () |
void | setShortcut (@Nullable final Shortcut shortcut) |
Static Private Member Functions | |
static Dimension | getMinimumSizeInt () |
Private Attributes | |
final Color | activateColor |
final Image | activateImage |
final CommandExecutor | commandExecutor |
final FacesManager | facesManager |
final FacesManagerListener | facesManagerListener |
final Font | font |
final Color | immediateColor |
final Image | immediateImage |
Shortcut | shortcut |
final ShortcutListener | shortcutListener |
final Shortcuts | shortcuts |
final ShortcutsListener | shortcutsListener |
final ShortcutSlot | shortcutSlot |
final Object | sync = new Object() |
Static Private Attributes | |
static final Color | BACKGROUND_COLOR = new Color(0, 0, 0, 0.0f) |
static final String | DEFAULT_TOOLTIP_TEXT = "(empty)" |
static final long | serialVersionUID = 1 |
Displays a shortcut command.
Definition at line 52 of file GUIItemShortcut.java.
com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut | ( | @NotNull final TooltipManager | tooltipManager, |
@NotNull final GUIElementListener | elementListener, | ||
@NotNull final String | name, | ||
@Nullable final Color | activateColor, | ||
@Nullable final Image | activateImage, | ||
@Nullable final Color | immediateColor, | ||
@Nullable final Image | immediateImage, | ||
@NotNull final ShortcutSlot | shortcutSlot, | ||
@NotNull final FacesManager | facesManager, | ||
@NotNull final CommandExecutor | commandExecutor, | ||
@NotNull final Shortcuts | shortcuts, | ||
@NotNull final Font | font, | ||
@NotNull final GuiFactory | guiFactory | ||
) |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
activateColor | the background color for shortcuts that activate the command |
activateImage | the overlay image for shortcuts that activate the command |
immediateColor | the background color for shortcuts that immediately execute the command |
immediateImage | the overlay image for shortcuts that immediately execute the command |
shortcutSlot | the shortcut slot |
facesManager | the faces manager instance for looking up faces |
commandExecutor | the command executor for executing commands |
shortcuts | the shortcuts instance for looking up shortcuts |
font | the font for displaying the key that activates the shortcut |
guiFactory | the global GUI factory instance |
Definition at line 204 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.activateColor, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.activateImage, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.commandExecutor, com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.facesManager, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.facesManagerListener, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.font, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.immediateColor, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.immediateImage, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcuts, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcutsListener, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcutSlot, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager.
void com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button1Clicked | ( | final int | modifiers | ) |
Called when the left mouse button was pressed.
modifiers | the input event modifiers |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItem.
Definition at line 273 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.commandExecutor, com.realtime.crossfire.jxclient.gui.misc.Modifiers.CTRL, com.realtime.crossfire.jxclient.gui.textinput.CommandExecutor.executeCommand(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.getCommand(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getShortcut(), com.realtime.crossfire.jxclient.gui.misc.Modifiers.MASK, com.realtime.crossfire.jxclient.gui.misc.Modifiers.NONE, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcut, and com.realtime.crossfire.jxclient.shortcuts.Shortcut.toggleImmediate().
void com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button2Clicked | ( | final int | modifiers | ) |
Called when the middle mouse button was pressed.
modifiers | the input event modifiers |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItem.
Definition at line 291 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getShortcut(), com.realtime.crossfire.jxclient.gui.misc.Modifiers.MASK, com.realtime.crossfire.jxclient.gui.misc.Modifiers.NONE, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcut, and com.realtime.crossfire.jxclient.shortcuts.Shortcut.toggleImmediate().
void com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button3Clicked | ( | final int | modifiers | ) |
Called when the right mouse button was pressed.
modifiers | the input event modifiers |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItem.
Definition at line 304 of file GUIItemShortcut.java.
boolean com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.canScroll | ( | final int | distance | ) |
Returns whether scrolling is possible.
distance | the distance to scroll |
Implements com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable.
Definition at line 361 of file GUIItemShortcut.java.
void com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.dispose | ( | ) |
Releases all allocated resources.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 220 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.facesManager, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.facesManagerListener, com.realtime.crossfire.jxclient.faces.FacesManager.removeFacesManagerListener(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.removeShortcutsListener(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.setShortcut(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcuts, and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcutsListener.
Dimension com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getMinimumSize | ( | ) |
Definition at line 347 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getMinimumSizeInt().
|
staticprivate |
Returns the minimal size to display this component.
Definition at line 356 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getMinimumSize(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getPreferredSize().
Dimension com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getPreferredSize | ( | ) |
Definition at line 340 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getMinimumSizeInt().
|
private |
Returns shortcut.
Definition at line 232 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcut, and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.sync.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button1Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button2Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getTooltip(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
TooltipText com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getTooltip | ( | ) |
Returns the current tooltip text.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 240 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.DEFAULT_TOOLTIP_TEXT, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getShortcut(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.getTooltipText(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.newTooltipText(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcut, and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcutSlot.
void com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.notifyOpen | ( | ) |
Called each time the enclosing dialog is opened (or raised).
Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.
Definition at line 246 of file GUIItemShortcut.java.
void com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent | ( | @NotNull final Graphics | g | ) |
Definition at line 308 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.activateColor, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.activateImage, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.BACKGROUND_COLOR, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.facesManager, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.font, com.realtime.crossfire.jxclient.spells.Spell.getFaceNum(), com.realtime.crossfire.jxclient.faces.FacesManager.getOriginalImageIcon(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getShortcut(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.getSpell(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.immediateColor, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.immediateImage, com.realtime.crossfire.jxclient.shortcuts.Shortcut.isImmediate(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcut, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcutSlot, and com.realtime.crossfire.jxclient.shortcuts.ShortcutSlot.toString().
void com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.resetScroll | ( | ) |
Resets the scroll index to the default value.
Implements com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable.
Definition at line 370 of file GUIItemShortcut.java.
void com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.scroll | ( | final int | distance | ) |
Scrolls the element.
distance | the distance to scroll |
Implements com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable.
Definition at line 366 of file GUIItemShortcut.java.
|
private |
Updates shortcut and registers/de-registers shortcutListener.
shortcut | the new shortcut |
Definition at line 254 of file GUIItemShortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.addShortcutListener(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcut, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.shortcutListener, com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.sync, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipChanged().
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.dispose().
|
private |
The background color for shortcuts that activate the command.
Definition at line 94 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
|
private |
The overlay image for shortcuts that activate the command.
Definition at line 100 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
|
staticprivate |
The background color of this item.
Definition at line 63 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
|
private |
The CommandExecutor for executing commands.
Definition at line 88 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button1Clicked(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut().
|
staticprivate |
The default tooltip text for empty slots.
Definition at line 69 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getTooltip().
|
private |
The FacesManager instance for looking up faces.
Definition at line 82 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.dispose(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
|
private |
The FacesManagerListener registered to detect updated faces.
Definition at line 173 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut().
|
private |
The Font for displaying the key that activates the shortcut.
Definition at line 118 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
|
private |
The background color for shortcuts that immediately execute the command.
Definition at line 106 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
|
private |
The overlay image for shortcuts that immediately execute the command.
Definition at line 112 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
|
staticprivate |
The serial version UID.
Definition at line 57 of file GUIItemShortcut.java.
|
private |
The currently monitored Shortcut instance. Set to
if not active.
Definition at line 137 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button1Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button2Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getShortcut(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getTooltip(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.setShortcut().
|
private |
The ShortcutListener attached to shortcut.
Definition at line 164 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.setShortcut().
|
private |
The Shortcuts instance for looking up Shortcuts.
Definition at line 76 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut().
|
private |
The ShortcutsListener attached to shortcuts.
Definition at line 143 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut().
|
private |
The shortcut slot.
Definition at line 124 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getTooltip(), com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.GUIItemShortcut(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
|
private |
The synchronization object for accesses to shortcut.
Definition at line 130 of file GUIItemShortcut.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getShortcut(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.setShortcut().