Package adams.terminal.menu
Class AbstractJDKMenuItemDefinition
- java.lang.Object
-
- adams.terminal.menu.AbstractMenuItemDefinition
-
- adams.terminal.menu.AbstractJDKMenuItemDefinition
-
- All Implemented Interfaces:
MenuItem
,Serializable
,Comparable<AbstractMenuItemDefinition>
- Direct Known Subclasses:
JMap
public abstract class AbstractJDKMenuItemDefinition extends AbstractMenuItemDefinition
Ancestor for menu items that require a JDK present.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.terminal.menu.AbstractMenuItemDefinition
CATEGORY_HELP, CATEGORY_MAINTENANCE, CATEGORY_PROGRAM, CATEGORY_TOOLS, m_Owner
-
-
Constructor Summary
Constructors Constructor Description AbstractJDKMenuItemDefinition()
Initializes the menu item with no owner.AbstractJDKMenuItemDefinition(adams.terminal.application.AbstractTerminalApplication owner)
Initializes the menu item.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doLaunch(com.googlecode.lanterna.gui2.WindowBasedTextGUI context)
Performs the actual launch.protected void
doRun(com.googlecode.lanterna.gui2.WindowBasedTextGUI context)
Actual execution.String
getCategory()
Returns the category of the menu item in which it should appear, i.e., the name of the menu.-
Methods inherited from class adams.terminal.menu.AbstractMenuItemDefinition
compareTo, equals, getOwner, getRunnable, getTitle, initialize, logError, logError, logMessage, postRun, preRun, setOwner
-
-
-
-
Constructor Detail
-
AbstractJDKMenuItemDefinition
public AbstractJDKMenuItemDefinition()
Initializes the menu item with no owner.
-
AbstractJDKMenuItemDefinition
public AbstractJDKMenuItemDefinition(adams.terminal.application.AbstractTerminalApplication owner)
Initializes the menu item.- Parameters:
owner
- the owning application
-
-
Method Detail
-
doLaunch
protected abstract void doLaunch(com.googlecode.lanterna.gui2.WindowBasedTextGUI context)
Performs the actual launch.- Parameters:
context
- the context to use
-
doRun
protected void doRun(com.googlecode.lanterna.gui2.WindowBasedTextGUI context)
Actual execution.- Specified by:
doRun
in classAbstractMenuItemDefinition
- Parameters:
context
- the context to use
-
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
-
-