|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.shortcut.ShortcutSchema
public class ShortcutSchema
A data structure for ShortcutSchema.
| Field Summary | |
|---|---|
protected EventListenerList |
_listenerList
List of listeners |
| Constructor Summary | |
|---|---|
ShortcutSchema()
Creates a ShortcutSchema without name. |
|
ShortcutSchema(ShortcutSchema shortcutSchema)
Copy constructor for ShortcutSchema. |
|
ShortcutSchema(String name)
Creates a ShortcutSchema with a specified name. |
|
| Method Summary | |
|---|---|
void |
addShortcut(String command,
Shortcut shortcut)
Adds a new shortcut for a command. |
void |
addShortcut(String command,
Shortcut shortcut,
boolean replace)
Adds a new shortcut for a command. |
void |
addShortcutListener(ShortcutListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
void |
clearAllCommandDescriptions()
Clears all command descriptions. |
void |
clearAllCommandIcons()
Clears all command icons. |
void |
clearAllShortcuts()
Clears all shortcuts for all commands from this ShortcutSchema. |
void |
clearCommandDescription(String command)
Clears the description for a command. |
void |
clearCommandIcon(String command)
Clears the icon for a command. |
void |
clearShortcuts(String command)
Clears all shortcuts for a command. |
boolean |
equals(Object o)
|
List<String> |
findConflicts(String command,
Shortcut shortcut)
|
List<String> |
findUsages(Shortcut shortcut)
|
void |
fireShortcutAdded(String command,
Shortcut shortcut)
|
void |
fireShortcutChanged(ShortcutEvent e)
Forwards the given notification event to all SchemaListeners that registered themselves as listeners
for this table model. |
void |
fireShortcutRemoved(String command,
Shortcut shortcut)
|
String |
getCommandDescription(String command)
Gets the description for a command. |
Icon |
getCommandIcon(String command)
Gets the icon for a command. |
Iterator<String> |
getCommands()
Gets an iterator of all commands. |
List<String> |
getLocalShortcutKeys()
|
Shortcut[] |
getLocalShortcuts(String command)
Gets the shortcuts for a particular command that are defined in this ShortcutSchema only. |
String |
getName()
Gets the name of the ShortcutSchema. |
ShortcutSchema |
getParent()
Gets the parent ShortcutSchema. |
List<String> |
getShortcutKeys()
|
ShortcutListener[] |
getShortcutListeners()
Returns an array of all the table model listeners registered on this model. |
Shortcut[] |
getShortcuts(String command)
Gets the shortcuts for a particular command. |
int |
hashCode()
|
boolean |
isActive()
Checks if this ShortcutSchema is active. |
boolean |
isEditable()
Checks if the ShortcutSchema is editable. |
boolean |
isOverridden(String command)
Checks if a command is overridden. |
void |
removeConflicts(String command,
Shortcut shortcut)
|
void |
removeShortcut(String command,
Shortcut shortcut)
Removes a shortcut from a command. |
void |
removeShortcutListener(ShortcutListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
void |
setCommandDescription(String command,
String description)
Assigned an description for a command. |
void |
setCommandIcon(String command,
Icon icon)
Assigned an icon for a command. |
void |
setEditable(boolean editable)
Made ShortcutSchema editable or not editable. |
void |
setName(String name)
Sets the name of the ShortcutSchema. |
void |
setParent(ShortcutSchema parent)
Sets the parent ShortcutSchema. |
void |
setShortcuts(String command,
List<Shortcut> shortcuts)
Sets shortcuts for a command. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected EventListenerList _listenerList
| Constructor Detail |
|---|
public ShortcutSchema()
public ShortcutSchema(String name)
name - the schema namepublic ShortcutSchema(ShortcutSchema shortcutSchema)
shortcutSchema - the source schema| Method Detail |
|---|
public String getName()
public void setName(String name)
name - the new name of the ShortcutSchema.public boolean isEditable()
public void setEditable(boolean editable)
editable - the flagpublic Shortcut[] getShortcuts(String command)
command - the action command
public Shortcut[] getLocalShortcuts(String command)
getShortcuts(String) will return a combined list of shortcuts defined in this ShortcutSchema as well
as parent ShortcutSchema if any.
command - the action command
getShortcuts(String)
public void setShortcuts(String command,
List<Shortcut> shortcuts)
command - the action commandshortcuts - the shortcut listpublic void clearAllShortcuts()
public void clearShortcuts(String command)
command - the action command
public void addShortcut(String command,
Shortcut shortcut)
command - the action commandshortcut - the shortcut
public void addShortcut(String command,
Shortcut shortcut,
boolean replace)
command - the action commandshortcut - the shortcutreplace - true to replace all previous defined shortcuts.
public void removeShortcut(String command,
Shortcut shortcut)
command - the action commandshortcut - the shortcutpublic ShortcutSchema getParent()
public void setParent(ShortcutSchema parent)
parent - the parent ShortcutSchema.public boolean isActive()
ShortcutSchemaManager.setActiveShortcutSchemaName(String) to guarantee only one
ShortcutSchema is active at one time.
public List<String> getShortcutKeys()
public List<String> getLocalShortcutKeys()
public String toString()
toString in class Objectpublic List<String> findUsages(Shortcut shortcut)
public List<String> findConflicts(String command,
Shortcut shortcut)
public void removeConflicts(String command,
Shortcut shortcut)
public boolean equals(Object o)
equals in class Objectpublic boolean isOverridden(String command)
command - the action command
public Icon getCommandIcon(String command)
command - the action command
public void setCommandIcon(String command,
Icon icon)
command - the action commandicon - the iconpublic void clearCommandIcon(String command)
command - the action commandpublic void clearAllCommandIcons()
public String getCommandDescription(String command)
command - the action command
public void setCommandDescription(String command,
String description)
command - the action commanddescription - the command descriptionpublic void clearCommandDescription(String command)
command - the action commandpublic void clearAllCommandDescriptions()
public void addShortcutListener(ShortcutListener l)
l - the ShortcutListenerpublic void removeShortcutListener(ShortcutListener l)
l - the ShortcutListenerpublic ShortcutListener[] getShortcutListeners()
SchemaListeners or an empty array if no table model listeners are
currently registeredaddShortcutListener(ShortcutListener),
removeShortcutListener(ShortcutListener)
public void fireShortcutAdded(String command,
Shortcut shortcut)
public void fireShortcutRemoved(String command,
Shortcut shortcut)
public void fireShortcutChanged(ShortcutEvent e)
SchemaListeners that registered themselves as listeners
for this table model.
e - the event to be forwardedaddShortcutListener(ShortcutListener),
ShortcutEvent,
EventListenerListpublic Iterator<String> getCommands()
public int hashCode()
hashCode in class Object
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||