|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmesquite.lib.MesquiteCommand
Each MesquiteCommand object stores a single sort of command that can be made, including its name (e.g. "setEdgeWidth") and the Commandable object to which the command is to be sent (e.g., an instantiation of a module). To be commandable, objects must claim to implement the Commandable interface. These MesquiteCommands are currently used mostly with Menus and Buttons, and with scripting. For instance, to each menu item is attached a command, and when the menu item is selected, the command is executed. By "executing" the command, we mean that the command's doIt method is called, which in turn calls the doCommand method of the Commandable object to which the command applies.
| Field Summary | |
static java.util.Vector |
classesLinked
|
static java.util.Vector |
classesUnlinked
|
static java.util.Vector |
countsOfClasses
|
static ListableVector |
currentThreads
|
static int |
totalCreated
|
static int |
totalDisposed
|
static int |
totalFinalized
|
| Fields inherited from interface mesquite.lib.MesquiteListener |
ANNOTATION_ADDED, ANNOTATION_CHANGED, ANNOTATION_DELETED, ASSOCIATED_CHANGED, BRANCHES_REARRANGED, BRANCHLENGTHS_CHANGED, COMMAND_CANCELLED, DATA_CHANGED, ELEMENT_CHANGED, ITEMS_ADDED, NAMES_CHANGED, OBJECT_DESTROYED, PARTS_ADDED, PARTS_CHANGED, PARTS_DELETED, PARTS_MOVED, SELECTION_CHANGED, TAXA_SUBSTITUTED, UNKNOWN, VALUE_CHANGED |
| Constructor Summary | |
MesquiteCommand(java.lang.String commandName,
Commandable ownerObject)
|
|
| Method Summary | |
static boolean |
anyCrashedCommands()
returns whether there are any commands in the command queue that have crashed |
static boolean |
anyQueuedCommands(boolean countCommandsWithoutLetMeFinish)
returns whether there are any commands in the command queue |
void |
changed(java.lang.Object caller,
java.lang.Object obj,
Notification notification,
CommandRecord commandRec)
passes which object changed, along with optional code number (type of change) and integers (e.g. |
static java.lang.String |
commandList()
returns list of commands |
void |
deleteOnQueue()
Deletes pending references to this command on main queue |
void |
dispose()
disposes of this command by setting the commanded object to null |
void |
disposing(java.lang.Object obj)
passes which object was disposed |
java.lang.Object |
doIt(java.lang.String arguments)
Do the command, passing the given arguments. |
java.lang.Object |
doIt(java.lang.String arguments,
CommandRecord commandRec)
Do the command, passing the given arguments. |
void |
doItMainThread(java.lang.String arguments,
java.lang.String uiCallInformation,
boolean showWaitCursors,
boolean logCommand)
Do the command, passing the given arguments. |
void |
doItMainThread(java.lang.String arguments,
java.lang.String uiCallInformation,
boolean showWaitCursors,
boolean logCommand,
java.lang.Object c)
Do the command, passing the given arguments. |
void |
doItMainThread(java.lang.String arguments,
java.lang.String uiCallInformation,
java.lang.Object c)
Do the command, passing the given arguments. |
void |
doItNewThread(java.lang.String arguments,
java.lang.String uiCallInformation)
Do the command, passing the given arguments. |
void |
doItNewThread(java.lang.String arguments,
java.lang.String uiCallInformation,
boolean showWaitCursors,
boolean logCommand)
Do the command, passing the given arguments. |
void |
finalize()
to track memory leaks |
boolean |
getLetMeFinish()
gets whether the command is to be let finish (i.e. |
java.lang.String |
getName()
returns the command name |
Commandable |
getOwner()
returns the object to be commanded |
boolean |
okToDispose(java.lang.Object obj,
int queryUser)
Asks whether it's ok to delete the object as far as the listener is concerned (e.g., is it in use?) |
MesquiteCommand |
setDefaultArguments(java.lang.String defaultArgs)
sets the default arguments to be passed if argument is null |
void |
setDontDuplicate(boolean dd)
sets whether the command is to be suppressed from the command queue if there is already the same command to the same object there |
void |
setLetMeFinish(boolean letMe)
sets whether the command is to be let finish (i.e. |
void |
setOwner(Commandable obj)
sets the object to be commanded |
void |
setQueueBypass(boolean bypass)
sets whether the command is to bypass the command queue (e.g., for force quit) |
void |
setSuppressLogging(boolean dd)
sets whether the command is to be shown in the log when given by user interface command |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static ListableVector currentThreads
public static int totalCreated
public static int totalFinalized
public static int totalDisposed
public static java.util.Vector classesLinked
public static java.util.Vector classesUnlinked
public static java.util.Vector countsOfClasses
| Constructor Detail |
public MesquiteCommand(java.lang.String commandName,
Commandable ownerObject)
| Method Detail |
public java.lang.Object doIt(java.lang.String arguments)
public java.lang.Object doIt(java.lang.String arguments,
CommandRecord commandRec)
public void doItNewThread(java.lang.String arguments,
java.lang.String uiCallInformation)
public void doItNewThread(java.lang.String arguments,
java.lang.String uiCallInformation,
boolean showWaitCursors,
boolean logCommand)
public void doItMainThread(java.lang.String arguments,
java.lang.String uiCallInformation,
java.lang.Object c)
public void doItMainThread(java.lang.String arguments,
java.lang.String uiCallInformation,
boolean showWaitCursors,
boolean logCommand)
public void doItMainThread(java.lang.String arguments,
java.lang.String uiCallInformation,
boolean showWaitCursors,
boolean logCommand,
java.lang.Object c)
public void changed(java.lang.Object caller,
java.lang.Object obj,
Notification notification,
CommandRecord commandRec)
changed in interface MesquiteListenerpublic void disposing(java.lang.Object obj)
disposing in interface MesquiteListener
public boolean okToDispose(java.lang.Object obj,
int queryUser)
okToDispose in interface MesquiteListenerpublic java.lang.String getName()
getName in interface Listablepublic void dispose()
public void finalize()
throws java.lang.Throwable
java.lang.Throwablepublic Commandable getOwner()
public void setOwner(Commandable obj)
public MesquiteCommand setDefaultArguments(java.lang.String defaultArgs)
public void setLetMeFinish(boolean letMe)
public boolean getLetMeFinish()
public void setQueueBypass(boolean bypass)
public void setDontDuplicate(boolean dd)
public void setSuppressLogging(boolean dd)
public void deleteOnQueue()
public static boolean anyQueuedCommands(boolean countCommandsWithoutLetMeFinish)
public static boolean anyCrashedCommands()
public static java.lang.String commandList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||