JIDE 3.5.15

com.jidesoft.shortcut
Class ShortcutSchemaManager

java.lang.Object
  extended by com.jidesoft.shortcut.ShortcutSchemaManager

public class ShortcutSchemaManager
extends Object

ShortcutSchemaManager is a manager for ShortcutSchema.


Field Summary
protected  EventListenerList _listenerList
          List of listeners
 
Constructor Summary
ShortcutSchemaManager()
          Creates an empty ShortcutSchemaManager.
ShortcutSchemaManager(ShortcutSchemaManager manager)
          This is a copy constructor for ShortcutSchemaManager.
 
Method Summary
 void addShortcutSchema(ShortcutSchema shortcutSchema)
          Adds a ShortcutSchema to ShortcutSchemaManager.
 void addShortcutSchemaListener(ShortcutSchemaListener l)
          Adds a listener to the list that's notified each time a change to the shortcut schema occurs.
 void clear()
          Removes all shortcut schema.
 void fireShortcutSchemaChanged(ShortcutSchemaEvent e)
          Forwards the given notification event to all ShortcutSchemaListener that registered themselves as listeners for this shortcut schema manager.
 ShortcutSchema getActiveShortcutSchema()
          Gets active shortcut schema.
 String getActiveShortcutSchemaName()
          Gets active shortcut schema name.
 ShortcutSchema getShortcutSchema(String schemaName)
          Gets the ShortcutSchema by its name.
 ShortcutSchemaListener[] getShortcutSchemaListeners()
          Returns an array of all the shortcut schema listeners registered on this shortcut schema manager.
 ShortcutSchema[] getShortcutSchemas()
          Gets an array of ShortcutSchema that are managed by this ShortcutSchemaManager.
 String getVersion()
          Gets an optional version string.
 void removeShortcutSchema(String shortcutSchemaName)
          Removes the shortcut schema with the specified name.
 void removeShortcutSchemaListener(ShortcutSchemaListener l)
          Removes a listener from the list that's notified each time a change to the shortcut schema occurs.
 void renameSchema(String oldName, String newName)
          Renames the schema.
 void setActiveShortcutSchemaName(String schemaName)
          Sets active shortcut schema.
 void setVersion(String version)
          Sets version string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_listenerList

protected EventListenerList _listenerList
List of listeners

Constructor Detail

ShortcutSchemaManager

public ShortcutSchemaManager()
Creates an empty ShortcutSchemaManager.


ShortcutSchemaManager

public ShortcutSchemaManager(ShortcutSchemaManager manager)
This is a copy constructor for ShortcutSchemaManager.

Parameters:
manager -
Method Detail

getShortcutSchemas

public ShortcutSchema[] getShortcutSchemas()
Gets an array of ShortcutSchema that are managed by this ShortcutSchemaManager.

Returns:
an array of ShortcutSchema.

addShortcutSchema

public void addShortcutSchema(ShortcutSchema shortcutSchema)
Adds a ShortcutSchema to ShortcutSchemaManager. It will fire SHORTCUT_SCHEMA_ADDED event.

Parameters:
shortcutSchema -
Throws:
IllegalArgumentException - if input shortcut schema is null or the name already exists in ShortcutSchemaManager.

getActiveShortcutSchemaName

public String getActiveShortcutSchemaName()
Gets active shortcut schema name.

Returns:
active shortcut schema name.

getActiveShortcutSchema

public ShortcutSchema getActiveShortcutSchema()
Gets active shortcut schema.

Returns:
active shortcut schema.

getShortcutSchema

public ShortcutSchema getShortcutSchema(String schemaName)
Gets the ShortcutSchema by its name.

Parameters:
schemaName -
Returns:
ShortcutSchema with specified name.

setActiveShortcutSchemaName

public void setActiveShortcutSchemaName(String schemaName)
Sets active shortcut schema. SHORTCUT_SCHEMA_ACTIVATED and SHORTCUT_SCHEMA_DEACTIVATED event will be fired by this method.

Parameters:
schemaName -

renameSchema

public void renameSchema(String oldName,
                         String newName)
Renames the schema. SHORTCUT_SCHEMA_RENAMED event will be fired if renaming is successful.

Parameters:
oldName - the old name
newName - the new name

removeShortcutSchema

public void removeShortcutSchema(String shortcutSchemaName)
Removes the shortcut schema with the specified name.

Parameters:
shortcutSchemaName -

clear

public void clear()
Removes all shortcut schema.


addShortcutSchemaListener

public void addShortcutSchemaListener(ShortcutSchemaListener l)
Adds a listener to the list that's notified each time a change to the shortcut schema occurs.

Parameters:
l - the SchemaListener

removeShortcutSchemaListener

public void removeShortcutSchemaListener(ShortcutSchemaListener l)
Removes a listener from the list that's notified each time a change to the shortcut schema occurs.

Parameters:
l - the SchemaListener

getShortcutSchemaListeners

public ShortcutSchemaListener[] getShortcutSchemaListeners()
Returns an array of all the shortcut schema listeners registered on this shortcut schema manager.

Returns:
all of this model's SchemaListeners or an empty array if no shortcut schema listeners are currently registered
See Also:
addShortcutSchemaListener(com.jidesoft.shortcut.ShortcutSchemaListener), removeShortcutSchemaListener(com.jidesoft.shortcut.ShortcutSchemaListener)

fireShortcutSchemaChanged

public void fireShortcutSchemaChanged(ShortcutSchemaEvent e)
Forwards the given notification event to all ShortcutSchemaListener that registered themselves as listeners for this shortcut schema manager.

Parameters:
e - the event to be forwarded
See Also:
addShortcutSchemaListener(com.jidesoft.shortcut.ShortcutSchemaListener), ShortcutSchemaEvent

getVersion

public String getVersion()
Gets an optional version string.

Returns:
version string.

setVersion

public void setVersion(String version)
Sets version string.

Parameters:
version -

JIDE 3.5.15