Package adams.gui.menu
Class RemoteCommands
- java.lang.Object
-
- adams.gui.application.AbstractMenuItemDefinition
-
- adams.gui.application.AbstractSubMenuDefinition
-
- adams.gui.menu.RemoteCommands
-
- All Implemented Interfaces:
Serializable
,Comparable<AbstractMenuItemDefinition>
public class RemoteCommands extends AbstractSubMenuDefinition
Provides submenu for starting/stopping of remote command scripting.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_COMMAND
static String
KEY_COMMANDPROCESSOR
static String
KEY_CONNECTION
protected RemoteCommand
m_LastCommand
the last command sent.protected RemoteCommandProcessor
m_LastCommandProcessor
the last command processor used.protected Connection
m_LastConnection
the last connection used.protected JMenuItem
m_MenuItemCC
the control center menu item.protected JMenuItem
m_MenuItemSend
the send menu item.protected JMenuItem
m_MenuItemStart
the start listening menu item.protected JMenuItem
m_MenuItemStop
the stop listening menu item.-
Fields inherited from class adams.gui.application.AbstractMenuItemDefinition
CATEGORY_HELP, CATEGORY_MACHINELEARNING, CATEGORY_MAINTENANCE, CATEGORY_PROGRAM, CATEGORY_TOOLS, CATEGORY_VISUALIZATION, CATEGORY_WIZARD, m_Owner
-
-
Constructor Summary
Constructors Constructor Description RemoteCommands(AbstractApplicationFrame owner)
Initializes the menu item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCategory()
Returns the category of the menu item in which it should appear, i.e., the name of the menu.String
getIconName()
Returns the file name of the icon.protected JMenuItem[]
getSubMenuItems()
Returns the menu items to add to the submenu.String
getTitle()
Returns the title of the window (and text of menuitem).UserMode
getUserMode()
Returns the user mode, which determines visibility as well.protected void
initialize()
Initializes members.boolean
isSingleton()
Whether the panel can only be displayed once.protected void
sendCommand()
Allows the sending of a remote command.protected void
startScripting()
Allows the user to select and configure a scripting engine before starting it.protected void
updateMenu()
Updates the menu items.-
Methods inherited from class adams.gui.application.AbstractSubMenuDefinition
getMenuItem
-
Methods inherited from class adams.gui.application.AbstractMenuItemDefinition
compareTo, createChildFrame, createChildFrame, equals, forCommandLine, forName, getActualCategory, getIcon, getLogger, getOwner, isAvailable, requiresRestartableApplication, setOwner
-
-
-
-
Field Detail
-
KEY_COMMAND
public static final String KEY_COMMAND
- See Also:
- Constant Field Values
-
KEY_CONNECTION
public static final String KEY_CONNECTION
- See Also:
- Constant Field Values
-
KEY_COMMANDPROCESSOR
public static final String KEY_COMMANDPROCESSOR
- See Also:
- Constant Field Values
-
m_MenuItemCC
protected JMenuItem m_MenuItemCC
the control center menu item.
-
m_MenuItemStart
protected JMenuItem m_MenuItemStart
the start listening menu item.
-
m_MenuItemStop
protected JMenuItem m_MenuItemStop
the stop listening menu item.
-
m_MenuItemSend
protected JMenuItem m_MenuItemSend
the send menu item.
-
m_LastCommand
protected RemoteCommand m_LastCommand
the last command sent.
-
m_LastConnection
protected Connection m_LastConnection
the last connection used.
-
m_LastCommandProcessor
protected RemoteCommandProcessor m_LastCommandProcessor
the last command processor used.
-
-
Constructor Detail
-
RemoteCommands
public RemoteCommands(AbstractApplicationFrame owner)
Initializes the menu item.- Parameters:
owner
- the owning application
-
-
Method Detail
-
initialize
protected void initialize()
Initializes members.- Overrides:
initialize
in classAbstractMenuItemDefinition
-
getTitle
public String getTitle()
Returns the title of the window (and text of menuitem).- Specified by:
getTitle
in classAbstractMenuItemDefinition
- Returns:
- the title
-
getIconName
public String getIconName()
Returns the file name of the icon.- Overrides:
getIconName
in classAbstractMenuItemDefinition
- Returns:
- the filename or null if no icon available
-
getUserMode
public UserMode getUserMode()
Returns the user mode, which determines visibility as well.- Specified by:
getUserMode
in classAbstractMenuItemDefinition
- Returns:
- the user mode
-
getCategory
public String getCategory()
Returns the category of the menu item in which it should appear, i.e., the name of the menu.- Specified by:
getCategory
in classAbstractMenuItemDefinition
- Returns:
- the category/menu name
-
isSingleton
public boolean isSingleton()
Whether the panel can only be displayed once.- Specified by:
isSingleton
in classAbstractMenuItemDefinition
- Returns:
- true if the panel can only be displayed once
-
startScripting
protected void startScripting()
Allows the user to select and configure a scripting engine before starting it.
-
sendCommand
protected void sendCommand()
Allows the sending of a remote command.
-
updateMenu
protected void updateMenu()
Updates the menu items.
-
getSubMenuItems
protected JMenuItem[] getSubMenuItems()
Returns the menu items to add to the submenu.- Specified by:
getSubMenuItems
in classAbstractSubMenuDefinition
- Returns:
- the menu items
-
-