Package adams.terminal.menu
Class AbstractURLMenuItemDefinition
- java.lang.Object
-
- adams.terminal.menu.AbstractMenuItemDefinition
-
- adams.terminal.menu.AbstractURLMenuItemDefinition
-
- All Implemented Interfaces:
MenuItem
,Serializable
,Comparable<AbstractMenuItemDefinition>
- Direct Known Subclasses:
Homepage
public abstract class AbstractURLMenuItemDefinition extends AbstractMenuItemDefinition
Ancestor for menu item definitions that open a URL in a browser.- Version:
- $Revision$
- 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 AbstractURLMenuItemDefinition()
Initializes the menu item with no owner.AbstractURLMenuItemDefinition(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 void
doRun(com.googlecode.lanterna.gui2.WindowBasedTextGUI context)
Actual execution.protected abstract String
getURL()
The URL to open in a browser.-
Methods inherited from class adams.terminal.menu.AbstractMenuItemDefinition
compareTo, equals, getCategory, getOwner, getRunnable, getTitle, initialize, logError, logError, logMessage, postRun, preRun, setOwner
-
-
-
-
Constructor Detail
-
AbstractURLMenuItemDefinition
public AbstractURLMenuItemDefinition()
Initializes the menu item with no owner.
-
AbstractURLMenuItemDefinition
public AbstractURLMenuItemDefinition(adams.terminal.application.AbstractTerminalApplication owner)
Initializes the menu item.- Parameters:
owner
- the owning application
-
-
Method Detail
-
getURL
protected abstract String getURL()
The URL to open in a browser.- Returns:
- the URL
-
doRun
protected void doRun(com.googlecode.lanterna.gui2.WindowBasedTextGUI context)
Actual execution.- Specified by:
doRun
in classAbstractMenuItemDefinition
- Parameters:
context
- the context to use
-
-