Package PamController.command
Class ExtCommand
java.lang.Object
PamController.command.ExtCommand
- Direct Known Subclasses:
BatchCommand,BatchStatusCommand,ExitCommand,ExitNoSaveCommand,FindGUICommand,GetXMLSettings,HelpCommand,KillCommand,NotifyCommand,PingCommand,SetSerializedSettingsCommand,SetXMLSettings,StartCommand,StatusCommand,StopCommand,SummaryCommand,TellModuleCommand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract StringExecute the commandfinal StringexecuteCommand(String commandString) Execute the command.findControlledUnits(String unitType, String unitName) Find a set of controlled units, allowing for wild cards or nulls.getHint()Get a hint text for the help command.getName()booleanvoidsetImmediate(boolean immediate) void
-
Constructor Details
-
ExtCommand
- Parameters:
name- Name of command (must be a single word)immediate- immediate execution. If false, then the command will be queued in the AWT thread for later execution (SwingUtilitiies.invokeLater(...)
-
-
Method Details
-
canExecute
public boolean canExecute()- Returns:
- true if the command can be executed (may depend on PAMGuard status)
-
executeCommand
Execute the command.Note that if immediate is set false, then the command will be executed later in the AWT thread and this function will return true.
- Returns:
- true if the command executed OK, or if it was sent off to execute in a later thread.
-
execute
Execute the command- Parameters:
commandWords-- Returns:
- true if command executed correctly.
-
getName
- Returns:
- the name of the command
-
setName
- Parameters:
name- the name to set
-
isImmediate
public boolean isImmediate()- Returns:
- true if execution is immediate (i.e. not later in the swing thread).
-
setImmediate
public void setImmediate(boolean immediate) - Parameters:
immediate- : true if execution should be immediate (i.e. not later in the swing thread).
-
getHint
Get a hint text for the help command.- Returns:
- hint text.
-
findControlledUnits
Find a set of controlled units, allowing for wild cards or nulls.- Parameters:
unitType- unit type, can be null or * for wildcardsunitName- unit name, can be null or * for wildcards- Returns:
-