Class Shortcut
- java.lang.Object
-
- com.realtime.crossfire.jxclient.shortcuts.Shortcut
-
- Direct Known Subclasses:
ShortcutCommand,ShortcutSpell
public abstract class Shortcut extends java.lang.ObjectAbstract base class for shortcut commands.
-
-
Constructor Summary
Constructors Constructor Description Shortcut()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddShortcutListener(@NotNull ShortcutListener listener)Registers a shortcut listener.abstract booleandisplaysFace(Face face)Returns whether this shortcut displays the given face.abstract voiddispose()Releases all allocated resources.abstract voidexecute()Executes the shortcut.protected voidfireModifiedEvent()Notifies all listeners about a modification.abstract @NotNull java.lang.StringgetTooltipText()Returns the current tooltip text.voidremoveShortcutListener(@NotNull ShortcutListener listener)Unregisters a shortcut listener.abstract voidvisit(@NotNull ShortcutVisitor visitor)Calls aShortcutVisitor'svisit()function for this instance.
-
-
-
Method Detail
-
dispose
public abstract void dispose()
Releases all allocated resources.
-
execute
public abstract void execute()
Executes the shortcut.
-
addShortcutListener
public void addShortcutListener(@NotNull @NotNull ShortcutListener listener)Registers a shortcut listener.- Parameters:
listener- the listener to register
-
removeShortcutListener
public void removeShortcutListener(@NotNull @NotNull ShortcutListener listener)Unregisters a shortcut listener.- Parameters:
listener- the listener to unregister
-
fireModifiedEvent
protected void fireModifiedEvent()
Notifies all listeners about a modification.
-
getTooltipText
@NotNull public abstract @NotNull java.lang.String getTooltipText()
Returns the current tooltip text.- Returns:
- the tooltip text
-
visit
public abstract void visit(@NotNull @NotNull ShortcutVisitor visitor)Calls aShortcutVisitor'svisit()function for this instance.- Parameters:
visitor- the visitor to call
-
displaysFace
public abstract boolean displaysFace(Face face)
Returns whether this shortcut displays the given face.- Parameters:
face- the face to check for- Returns:
- whether the face is displayed
-
-