Crossfire JXClient, Trunk
|
Public Member Functions | |
void | addShortcutsListener (@NotNull final ShortcutsListener listener) |
void | clearShortcuts () |
Path | getFile () |
Shortcut | getShortcut (@NotNull final ShortcutSlot shortcutSlot) |
Iterator< Shortcut > | iterator () |
void | removeShortcutsListener (@NotNull final ShortcutsListener listener) |
void | setFile (@Nullable final Path file) |
void | setShortcutString (@NotNull final ShortcutSlot shortcutSlot, @NotNull final String command, final boolean saveChanges) |
Shortcuts (@NotNull final SpellsManager spellsManager) | |
Private Attributes | |
Path | file |
final EventListenerList2< ShortcutsListener > | listeners = new EventListenerList2<>() |
final Map< ShortcutSlot, Shortcut > | shortcuts = new EnumMap<>(ShortcutSlot.class) |
final SpellsManager | spellsManager |
final SpellsManagerListener | spellsManagerListener |
Manages a list of Shortcuts.
Definition at line 43 of file Shortcuts.java.
com.realtime.crossfire.jxclient.shortcuts.Shortcuts.Shortcuts | ( | @NotNull final SpellsManager | spellsManager | ) |
Creates a new instance.
spellsManager | the instance to watch |
Definition at line 103 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcuts.shortcuts, com.realtime.crossfire.jxclient.shortcuts.Shortcuts.spellsManager, and com.realtime.crossfire.jxclient.shortcuts.Shortcuts.spellsManagerListener.
void com.realtime.crossfire.jxclient.shortcuts.Shortcuts.addShortcutsListener | ( | @NotNull final ShortcutsListener | listener | ) |
Adds a ShortcutsListener.
listener | the listener to add |
Definition at line 180 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcuts.listeners.
void com.realtime.crossfire.jxclient.shortcuts.Shortcuts.clearShortcuts | ( | ) |
Clears all defined shortcuts.
Definition at line 114 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.dispose(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.listeners, and com.realtime.crossfire.jxclient.shortcuts.Shortcuts.shortcuts.
Path com.realtime.crossfire.jxclient.shortcuts.Shortcuts.getFile | ( | ) |
Returns the backing file.
Definition at line 197 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcuts.file.
Shortcut com.realtime.crossfire.jxclient.shortcuts.Shortcuts.getShortcut | ( | @NotNull final ShortcutSlot | shortcutSlot | ) |
Returns a shortcut.
shortcutSlot | the shortcut slot |
Definition at line 133 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcuts.shortcuts.
Referenced by com.realtime.crossfire.jxclient.commands.ShortcutCommand.listSlots().
Iterator<Shortcut> com.realtime.crossfire.jxclient.shortcuts.Shortcuts.iterator | ( | ) |
Definition at line 211 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcuts.shortcuts.
void com.realtime.crossfire.jxclient.shortcuts.Shortcuts.removeShortcutsListener | ( | @NotNull final ShortcutsListener | listener | ) |
Removes a ShortcutsListener.
listener | the listener to remove |
Definition at line 188 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcuts.listeners.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemShortcut.dispose().
void com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setFile | ( | @Nullable final Path | file | ) |
Sets the backing file.
file | the backing file or null
|
Definition at line 205 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcuts.file.
void com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setShortcutString | ( | @NotNull final ShortcutSlot | shortcutSlot, |
@NotNull final String | command, | ||
final boolean | saveChanges | ||
) |
Sets a slot.
shortcutSlot | the shortcut slot to update |
command | the new command to set or an empty string to clear the slot |
saveChanges | whether to save the change to the save file |
Definition at line 143 of file Shortcuts.java.
References com.realtime.crossfire.jxclient.shortcuts.Shortcut.dispose(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.file, com.realtime.crossfire.jxclient.spells.SpellsManager.getSpell(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.listeners, com.realtime.crossfire.jxclient.window.ShortcutsLoader.saveShortcuts(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.shortcuts, and com.realtime.crossfire.jxclient.shortcuts.Shortcuts.spellsManager.
Referenced by com.realtime.crossfire.jxclient.commands.ShortcutCommand.deleteSlot(), and com.realtime.crossfire.jxclient.commands.ShortcutCommand.updateSlot().
|
private |
The backing file.
Definition at line 56 of file Shortcuts.java.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcuts.getFile(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setFile(), and com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setShortcutString().
|
private |
The listeners to be notified.
Definition at line 62 of file Shortcuts.java.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcuts.addShortcutsListener(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.clearShortcuts(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.removeShortcutsListener(), and com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setShortcutString().
|
private |
The shortcuts. Maps shortcut slot to Shortcut. Unset entries are set to
.
Definition at line 50 of file Shortcuts.java.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcuts.clearShortcuts(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.getShortcut(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.iterator(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setShortcutString(), and com.realtime.crossfire.jxclient.shortcuts.Shortcuts.Shortcuts().
|
private |
The SpellsManager instance to watch.
Definition at line 68 of file Shortcuts.java.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setShortcutString(), and com.realtime.crossfire.jxclient.shortcuts.Shortcuts.Shortcuts().
|
private |
The SpellsManagerListener used to detect spell changes.
Definition at line 75 of file Shortcuts.java.
Referenced by com.realtime.crossfire.jxclient.shortcuts.Shortcuts.Shortcuts().