All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mesquite.lib.MesquiteCommand

mesquite.lib.MesquiteCommand

public class MesquiteCommand
extends java.lang.Object
implements mesquite.lib.Listable, mesquite.lib.MesquiteListener
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.


Variable Index

 o classesLinked
 o classesUnlinked
 o countsOfClasses
 o currentThreads
 o totalCreated
 o totalDisposed
 o totalFinalized

Constructor Index

 o MesquiteCommand(String, Commandable)

Method Index

 o anyCrashedCommands()
returns whether there are any commands in the command queue that have crashed
 o anyQueuedCommands(boolean)
returns whether there are any commands in the command queue
 o changed(Object, Object, Notification, CommandRecord)
passes which object changed, along with optional code number (type of change) and integers (e.g.
 o commandList()
returns list of commands
 o deleteOnQueue()
Deletes pending references to this command on main queue
 o dispose()
disposes of this command by setting the commanded object to null
 o disposing(Object)
passes which object was disposed
 o doIt(String)
Do the command, passing the given arguments.
 o doItMainThread(String, String, boolean, boolean)
Do the command, passing the given arguments.
 o doItMainThread(String, String, boolean, boolean, Object)
Do the command, passing the given arguments.
 o doItMainThread(String, String, Object)
Do the command, passing the given arguments.
 o doItNewThread(String, String)
Do the command, passing the given arguments.
 o doItNewThread(String, String, boolean, boolean)
Do the command, passing the given arguments.
 o finalize()
to track memory leaks
 o getName()
returns the command name
 o getOwner()
returns the object to be commanded
 o okToDispose(Object, int)
Asks whether it's ok to delete the object as far as the listener is concerned (e.g., is it in use?)
 o setDefaultArguments(String)
sets the default arguments to be passed if argument is null
 o setDontDuplicate(boolean)
sets whether the command is to be suppressed from the command queue if there is already the same command to the same object there
 o setLetMeFinish(boolean)
sets whether the command is to be let finish (i.e.
 o setOwner(Commandable)
sets the object to be commanded
 o setQueueBypass(boolean)
sets whether the command is to bypass the command queue (e.g., for force quit)
 o setSuppressLogging(boolean)
sets whether the command is to be shown in the log when given by user interface command

Variables

 o currentThreads
 public static mesquite.lib.ListableVector currentThreads
 o totalCreated
 public static int totalCreated
 o totalFinalized
 public static int totalFinalized
 o totalDisposed
 public static int totalDisposed
 o classesLinked
 public static java.util.Vector classesLinked
 o classesUnlinked
 public static java.util.Vector classesUnlinked
 o countsOfClasses
 public static java.util.Vector countsOfClasses

Constructors

 o MesquiteCommand
 public MesquiteCommand(java.lang.String commandName,
                        mesquite.lib.Commandable ownerObject)

Methods

 o doIt
 public java.lang.Object doIt(java.lang.String arguments)
Do the command, passing the given arguments. This will call the commanded object's doCommand method.

 o doItNewThread
 public void doItNewThread(java.lang.String arguments,
                           java.lang.String uiCallInformation)
Do the command, passing the given arguments. This will call the commanded object's doCommand method.

 o doItNewThread
 public void doItNewThread(java.lang.String arguments,
                           java.lang.String uiCallInformation,
                           boolean showWaitCursors,
                           boolean logCommand)
Do the command, passing the given arguments. This will call the commanded object's doCommand method.

 o doItMainThread
 public void doItMainThread(java.lang.String arguments,
                            java.lang.String uiCallInformation,
                            java.lang.Object c)
Do the command, passing the given arguments. This will call the commanded object's doCommand method.

 o doItMainThread
 public void doItMainThread(java.lang.String arguments,
                            java.lang.String uiCallInformation,
                            boolean showWaitCursors,
                            boolean logCommand)
Do the command, passing the given arguments. This will call the commanded object's doCommand method.

 o doItMainThread
 public 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. This will call the commanded object's doCommand method. Object passed is UI object (if any), such as menu item or button in window, from which command was issued

 o changed
 public void changed(java.lang.Object caller,
                     java.lang.Object obj,
                     mesquite.lib.Notification notification,
                     mesquite.lib.CommandRecord commandRec)
passes which object changed, along with optional code number (type of change) and integers (e.g. which character)

 o disposing
 public void disposing(java.lang.Object obj)
passes which object was disposed

 o okToDispose
 public 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?)

 o getName
 public java.lang.String getName()
returns the command name

 o dispose
 public void dispose()
disposes of this command by setting the commanded object to null

 o finalize
 public void finalize() throws java.lang.Throwable
to track memory leaks

 o getOwner
 public mesquite.lib.Commandable getOwner()
returns the object to be commanded

 o setOwner
 public void setOwner(mesquite.lib.Commandable obj)
sets the object to be commanded

 o setDefaultArguments
 public mesquite.lib.MesquiteCommand setDefaultArguments(java.lang.String defaultArgs)
sets the default arguments to be passed if argument is null

 o setLetMeFinish
 public void setLetMeFinish(boolean letMe)
sets whether the command is to be let finish (i.e. a warning is give on quit if pending)

 o setQueueBypass
 public void setQueueBypass(boolean bypass)
sets whether the command is to bypass the command queue (e.g., for force quit)

 o setDontDuplicate
 public 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

 o setSuppressLogging
 public void setSuppressLogging(boolean dd)
sets whether the command is to be shown in the log when given by user interface command

 o deleteOnQueue
 public void deleteOnQueue()
Deletes pending references to this command on main queue

 o anyQueuedCommands
 public static boolean anyQueuedCommands(boolean countCommandsWithoutLetMeFinish)
returns whether there are any commands in the command queue

 o anyCrashedCommands
 public static boolean anyCrashedCommands()
returns whether there are any commands in the command queue that have crashed

 o commandList
 public static java.lang.String commandList()
returns list of commands


All Packages  Class Hierarchy  This Package  Previous  Next  Index