com.softsynth.jmsl.score
Class ScoreCommandCenter
java.lang.Object
com.softsynth.jmsl.score.ScoreCommandCenter
public class ScoreCommandCenter
- extends java.lang.Object
Static repository of ScoreCommand classes
Provides clones of ScoreCommands that were added
Maintains hashtable with KeyCode ints hashed to Score Command Classes
- Author:
- Nick Didkovsky, (c) 2004 All rights reserved, Email: didkovn@mail.rockefeller.edu
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScoreCommandCenter
public ScoreCommandCenter()
addScoreCommandAddedListener
public static void addScoreCommandAddedListener(ScoreCommandAddedListener listener)
removeScoreCommandAddedListener
public static void removeScoreCommandAddedListener(ScoreCommandAddedListener listener)
addScoreCommand
public static void addScoreCommand(ScoreCommand cmd,
int keyCode)
- Add a ScoreCommand and associate it with a keyCode hotkey. Prints a warning if a ScoreCommand
is added which has a duplicate name to one already registered with the ScoreCommandCenter
addScoreCommand
public static void addScoreCommand(ScoreCommand cmd)
- Add a ScoreCommand with no hot key.
Same as addScoreCommand(klass, -1)
getScoreCommand
public static ScoreCommand getScoreCommand(Score score,
int keyCode)
throws java.lang.CloneNotSupportedException
- Returns:
- a clone of the command that hashes to the keyCode. null if no match
- Throws:
java.lang.CloneNotSupportedException
getScoreCommand
public static ScoreCommand getScoreCommand(Score score,
java.lang.String commandName)
throws java.lang.CloneNotSupportedException
- Returns:
- a clone of the command with matching name. null if no match
- Throws:
java.lang.CloneNotSupportedException
getCommandNames
public static java.util.Enumeration getCommandNames()
- Returns:
- Enumeration of command names