com.mindbright.terminal
public abstract class TerminalMenuHandler extends java.lang.Object
TerminalWin
,
TerminalMenuHandlerFull
Constructor and Description |
---|
TerminalMenuHandler() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addBasicMenus(TerminalWin terminal,
javax.swing.JMenuBar menuBar)
Install the standard menus on the given frame.
|
abstract void |
setPopupMenu(java.lang.Object menu)
Registers a popup menu.
|
abstract void |
setReadOnlyMode(boolean readOnly)
Configure these menus to possibly act as belonging to a read
only terminal.
|
abstract void |
setTerminalMenuListener(TerminalMenuListener listener)
Register a listener which is interested in menu events
|
abstract void |
setTerminalWin(TerminalWin term)
Attach to a terminal window.
|
abstract void |
setTitleName(java.lang.String titleName)
Set the name of this application.
|
abstract void |
showPopupMenu(int x,
int y)
Show the popup menu at the indicated position.
|
abstract void |
update()
Gets called when the contents of the menus might need updating.
|
abstract void |
updateSelection(boolean selectionAvailable)
Gets called when the selection state is changed
|
public abstract void setTitleName(java.lang.String titleName)
titleName
- the application name for window titlespublic abstract void setTerminalWin(TerminalWin term)
term
- terminal window to attach topublic abstract void setTerminalMenuListener(TerminalMenuListener listener)
listener
- the interested listenerpublic abstract void setReadOnlyMode(boolean readOnly)
readOnly
- true if the menus should be configured for read
only mode.public abstract void addBasicMenus(TerminalWin terminal, javax.swing.JMenuBar menuBar)
terminal
- terminal window to attach tomenuBar
- menu bar to add menus topublic abstract void updateSelection(boolean selectionAvailable)
selectionAvailable
- true if some text is selectedpublic abstract void update()
public abstract void setPopupMenu(java.lang.Object menu)
menu
- the popup menu. This is passed as an Object since
it may be either a PopupMenu
or
JPopupMenu
.public abstract void showPopupMenu(int x, int y)
x
- x-coordinate of position to show menu ayy
- y-coordinate of position to show menu ay