Crossfire JXClient, Trunk
|
Public Member Functions | |
void | addShortcutListener (@NotNull final ShortcutListener listener) |
boolean | displaysFace (@NotNull final Face face) |
void | dispose () |
String | getCommand () |
Spell | getSpell () |
String | getTooltipText () |
boolean | isImmediate () |
void | removeShortcutListener (@NotNull final ShortcutListener listener) |
Shortcut (@NotNull final String command, @Nullable final Spell spell) | |
void | toggleImmediate () |
Private Member Functions | |
void | fireModifiedEvent () |
Private Attributes | |
String | command |
final EventListenerList2< ShortcutListener > | listeners = new EventListenerList2<>() |
final Spell | spell |
Abstract base class for shortcut commands.
Definition at line 35 of file Shortcut.java.
com.realtime.crossfire.jxclient.shortcuts.Shortcut.Shortcut | ( | @NotNull final String | command, |
@Nullable final Spell | spell | ||
) |
Creates a new instance.
command | the command to execute |
spell | the spell associated with the command or null
|
Definition at line 62 of file Shortcut.java.
References com.realtime.crossfire.jxclient.spells.Spell.addSpellListener(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.command, and com.realtime.crossfire.jxclient.shortcuts.Shortcut.spell.
void com.realtime.crossfire.jxclient.shortcuts.Shortcut.addShortcutListener | ( | @NotNull final ShortcutListener | listener | ) |
Registers a shortcut listener.
listener | the listener to register |
Definition at line 103 of file Shortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.listeners.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.setShortcut().
boolean com.realtime.crossfire.jxclient.shortcuts.Shortcut.displaysFace | ( | @NotNull final Face | face | ) |
Returns whether this shortcut displays the given face.
face | the face to check for |
Definition at line 141 of file Shortcut.java.
References com.realtime.crossfire.jxclient.spells.Spell.getFaceNum(), and com.realtime.crossfire.jxclient.shortcuts.Shortcut.spell.
void com.realtime.crossfire.jxclient.shortcuts.Shortcut.dispose | ( | ) |
Releases all allocated resources.
Definition at line 93 of file Shortcut.java.
References com.realtime.crossfire.jxclient.spells.Spell.removeSpellListener(), and com.realtime.crossfire.jxclient.shortcuts.Shortcut.spell.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcuts.clearShortcuts(), and com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setShortcutString().
|
private |
Notifies all listeners about a modification.
Definition at line 118 of file Shortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.listeners.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcut.toggleImmediate().
String com.realtime.crossfire.jxclient.shortcuts.Shortcut.getCommand | ( | ) |
Returns the command to execute.
Definition at line 76 of file Shortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.command.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button1Clicked(), and com.realtime.crossfire.jxclient.commands.ShortcutCommand.listSlots().
Spell com.realtime.crossfire.jxclient.shortcuts.Shortcut.getSpell | ( | ) |
Returns the associated spell to cast.
Definition at line 86 of file Shortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.spell.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
String com.realtime.crossfire.jxclient.shortcuts.Shortcut.getTooltipText | ( | ) |
Returns the current tooltip text.
Definition at line 129 of file Shortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.command, com.realtime.crossfire.jxclient.spells.Spell.getTooltipText(), and com.realtime.crossfire.jxclient.shortcuts.Shortcut.spell.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.getTooltip().
boolean com.realtime.crossfire.jxclient.shortcuts.Shortcut.isImmediate | ( | ) |
Returns whether the command should be executed immediately.
Definition at line 150 of file Shortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.command.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.paintComponent().
void com.realtime.crossfire.jxclient.shortcuts.Shortcut.removeShortcutListener | ( | @NotNull final ShortcutListener | listener | ) |
Unregisters a shortcut listener.
listener | the listener to unregister |
Definition at line 111 of file Shortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.listeners.
void com.realtime.crossfire.jxclient.shortcuts.Shortcut.toggleImmediate | ( | ) |
Toggles between immediate execution and activation only. Does nothing for other commands.
Definition at line 158 of file Shortcut.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.command, and com.realtime.crossfire.jxclient.shortcuts.Shortcut.fireModifiedEvent().
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button1Clicked(), and com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.button2Clicked().
|
private |
The command to execute.
Definition at line 41 of file Shortcut.java.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcut.getCommand(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.getTooltipText(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.isImmediate(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.Shortcut(), and com.realtime.crossfire.jxclient.shortcuts.Shortcut.toggleImmediate().
|
private |
The listeners to be notified.
Definition at line 54 of file Shortcut.java.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcut.addShortcutListener(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.fireModifiedEvent(), and com.realtime.crossfire.jxclient.shortcuts.Shortcut.removeShortcutListener().
|
private |
The spell associated with the command or
if the command is not a spell related command or if the spell is unknown.
Definition at line 48 of file Shortcut.java.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcut.displaysFace(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.dispose(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.getSpell(), com.realtime.crossfire.jxclient.shortcuts.Shortcut.getTooltipText(), and com.realtime.crossfire.jxclient.shortcuts.Shortcut.Shortcut().