|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mindbright.terminal.TerminalMenuHandler
com.mindbright.terminal.TerminalMenuHandlerFull
public class TerminalMenuHandlerFull
The actual implementation of the standard terminal menus.
TerminalWin| Field Summary | |
|---|---|
static int |
MENU_EDIT
|
static int |
MENU_FILE
|
static int |
MENU_SETTINGS
|
| Constructor Summary | |
|---|---|
TerminalMenuHandlerFull()
|
|
TerminalMenuHandlerFull(java.lang.String titleName)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Called when a menu item was selected |
void |
addBasicMenus(TerminalWin terminal,
javax.swing.JMenuBar mb)
Install the standard menus on the given frame. |
boolean |
captureToFileDialog()
Start capturing data to file. |
java.io.FileOutputStream |
chooseFileDialog(java.lang.String title)
Shows a save dialog with the specified title. |
void |
endCapture()
Stop capturing data in a file. |
void |
findDialog(java.lang.String title)
Show the find dialog. |
javax.swing.JMenu |
getMenu(int idx)
|
void |
handleMenuAction(int[] id)
Actually handle the selection of all the menu elements. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Called when a checkbox menu item has changed state |
void |
printBuffer()
|
void |
printScreen()
Print a dump of the current screen. |
void |
sendFileDialog()
Show the send file dialog. |
void |
setPopupMenu(java.lang.Object menu)
Registers a popup menu. |
void |
setReadOnlyMode(boolean readOnly)
Configure these menus to possibly act as belonging to a read only terminal. |
void |
setTerminalMenuListener(TerminalMenuListener listener)
Register a listener which is interested in menu events |
void |
setTerminalWin(TerminalWin term)
Attach to a terminal window. |
void |
setTitleName(java.lang.String titleName)
Set the name of this application. |
void |
showPopupMenu(int x,
int y)
Show the popup menu at the indicated position. |
void |
startPrinter()
Start printing data to printer. |
void |
stopPrinter()
Stop sending data to printer. |
void |
termSettingsDialog()
Show the terminal settings dialog with the default title. |
void |
termSettingsDialog(java.lang.String title)
Show the terminal settings dialog. |
void |
update()
Gets called when the contents of the menus might need updating. |
void |
updateSelection(boolean selectionAvailable)
Gets called when the selection state is changed |
void |
write(char c)
Write a character to the printer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MENU_FILE
public static final int MENU_EDIT
public static final int MENU_SETTINGS
| Constructor Detail |
|---|
public TerminalMenuHandlerFull()
public TerminalMenuHandlerFull(java.lang.String titleName)
| Method Detail |
|---|
public void setTitleName(java.lang.String titleName)
TerminalMenuHandler
setTitleName in class TerminalMenuHandlertitleName - the application name for window titlespublic void setTerminalWin(TerminalWin term)
TerminalMenuHandler
setTerminalWin in class TerminalMenuHandlerterm - terminal window to attach topublic void setReadOnlyMode(boolean readOnly)
TerminalMenuHandler
setReadOnlyMode in class TerminalMenuHandlerreadOnly - true if the menus should be configured for read
only mode.public void setTerminalMenuListener(TerminalMenuListener listener)
TerminalMenuHandler
setTerminalMenuListener in class TerminalMenuHandlerlistener - the interested listener
public void addBasicMenus(TerminalWin terminal,
javax.swing.JMenuBar mb)
TerminalMenuHandler
addBasicMenus in class TerminalMenuHandlerterminal - terminal window to attach tomb - menu bar to add menus topublic void updateSelection(boolean selectionAvailable)
TerminalMenuHandler
updateSelection in class TerminalMenuHandlerselectionAvailable - true if some text is selectedpublic void update()
TerminalMenuHandler
update in class TerminalMenuHandlerpublic void termSettingsDialog(java.lang.String title)
title - desired title of dialogpublic void termSettingsDialog()
public void findDialog(java.lang.String title)
title - desired title of dialogpublic final void sendFileDialog()
public final java.io.FileOutputStream chooseFileDialog(java.lang.String title)
FileOutputStream
title - title of dialog
public final boolean captureToFileDialog()
public void endCapture()
captureToFileDialog().
public javax.swing.JMenu getMenu(int idx)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void handleMenuAction(int[] id)
public void setPopupMenu(java.lang.Object menu)
TerminalMenuHandler
setPopupMenu in class TerminalMenuHandlermenu - the popup menu. This is passed as an Object since
it may be either a PopupMenu or
JPopupMenu.
public void showPopupMenu(int x,
int y)
TerminalMenuHandler
showPopupMenu in class TerminalMenuHandlerx - x-coordinate of position to show menu ayy - y-coordinate of position to show menu aypublic void write(char c)
write in interface TerminalOutputListenerc - charcter to writepublic void startPrinter()
startPrinter in interface TerminalPrinterpublic void stopPrinter()
stopPrinter in interface TerminalPrinterpublic void printScreen()
TerminalPrinter
printScreen in interface TerminalPrinterpublic void printBuffer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||