java.lang.Object com.realtime.crossfire.jxclient.shortcuts.Shortcut
public abstract class Shortcut
Abstract base class for shortcut commands.
Field Summary | |
---|---|
private javax.swing.event.EventListenerList |
listeners
The listeners to be notified. |
Constructor Summary | |
---|---|
Shortcut()
|
Method Summary | |
---|---|
void |
addShortcutListener(ShortcutListener listener)
Register a shortcut listener. |
abstract boolean |
displaysFace(Face face)
Returns whether this shortcut displays the given face. |
abstract void |
dispose()
Releases all allocated resources. |
abstract void |
execute()
Execute the shortcut. |
protected void |
fireModifiedEvent()
Notify all listeners about a modification. |
abstract java.lang.String |
getTooltipText()
Returns the current tooltip text. |
void |
removeShortcutListener(ShortcutListener listener)
Unregister a shortcut listener. |
abstract void |
visit(ShortcutVisitor visitor)
Calls a ShortcutVisitor 's visit() function for this
instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@NotNull private final javax.swing.event.EventListenerList listeners
Constructor Detail |
---|
public Shortcut()
Method Detail |
---|
public void addShortcutListener(@NotNull ShortcutListener listener)
listener
- The listener to register.public abstract boolean displaysFace(Face face)
face
- the face to check for
public abstract void dispose()
public abstract void execute()
protected void fireModifiedEvent()
@NotNull public abstract java.lang.String getTooltipText()
public void removeShortcutListener(@NotNull ShortcutListener listener)
listener
- The listener to unregister.public abstract void visit(@NotNull ShortcutVisitor visitor)
ShortcutVisitor
's visit()
function for this
instance.
visitor
- the visitor to call