Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mindbright.terminal
Class TerminalMenuHandler

    java.lang.Object
      com.mindbright.terminal.TerminalMenuHandler

Direct Known Subclasses:
  TerminalMenuHandlerFull

public abstract class TerminalMenuHandler
extends java.lang.Object

Interface for terminal menu handlers. A terminal menu handler is expected to handle the menus associated with a terminal window.

See Also:
  `TerminalWin`

Constructor Summary
`TerminalMenuHandler()`

Method Summary
`abstract void` | `addBasicMenus(TerminalWin terminal, java.awt.Frame frame)` Install the standard menus on the given frame.
`abstract void` | `setPopupMenu(java.lang.Object menu)` Registers a popup menu.
`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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TerminalMenuHandler

    public TerminalMenuHandler()

Method Detail

### setTitleName

    public abstract void setTitleName(java.lang.String titleName)

  Set the name of this application. This name may be used in the title of any dialogs popped up etc.

  Parameters:
    `titleName` - the application name for window titles

### setTerminalWin

    public abstract void setTerminalWin(TerminalWin term)

  Attach to a terminal window.

  Parameters:
    `term` - terminal window to attach to

### setTerminalMenuListener

    public abstract void setTerminalMenuListener(TerminalMenuListener listener)

  Register a listener which is interested in menu events

  Parameters:
    `listener` - the interested listener

### addBasicMenus

    public abstract void addBasicMenus(TerminalWin terminal,
                                       java.awt.Frame frame)

  Install the standard menus on the given frame. There is no need to call setTerminalWin before calling this since the actual terminal window is passed here as well.

  Parameters:
    `terminal` - terminal window to attach to
    `frame` - frame to install menus in

### updateSelection

    public abstract void updateSelection(boolean selectionAvailable)

  Gets called when the selection state is changed

  Parameters:
    `selectionAvailable` - true if some text is selected

### update

    public abstract void update()

  Gets called when the contents of the menus might need updating.

### setPopupMenu

    public abstract void setPopupMenu(java.lang.Object menu)

  Registers a popup menu.

  Parameters:
    `menu` - the popup menu. This is passed as an Object since it may be either a `PopupMenu` or `JPopupMenu`.

### showPopupMenu

    public abstract void showPopupMenu(int x,
                                       int y)

  Show the popup menu at the indicated position.

  Parameters:
    `x` - x-coordinate of position to show menu ay
    `y` - y-coordinate of position to show menu ay

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD