public class DemoApplication extends TApplication
TApplication.BackendType| Constructor and Description |
|---|
DemoApplication(Backend backend)
Public constructor.
|
DemoApplication(java.io.InputStream input,
java.io.OutputStream output)
Public constructor.
|
DemoApplication(java.io.InputStream input,
java.io.Reader reader,
java.io.PrintWriter writer)
Public constructor.
|
DemoApplication(java.io.InputStream input,
java.io.Reader reader,
java.io.PrintWriter writer,
boolean setRawMode)
Public constructor.
|
DemoApplication(TApplication.BackendType backendType)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
onMenu(TMenuEvent menu)
Handle menu events.
|
activateWindow, addEditMenu, addFileMenu, addHelpMenu, addMenu, addMenu, addMenuItem, addSubMenu, addTableMenu, addTimer, addToolMenu, addWindow, addWindow, addWindow, addWindow, addWindowMenu, closeMenu, closeSubMenu, closeWindow, disableMenuItem, disableMenuItems, doRepaint, doSmartPlacement, enableMenuItem, enableMenuItems, enableSecondaryEventReceiver, exit, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, getActiveWindow, getAllMenus, getAllWindows, getBackend, getDesktop, getDesktopBottom, getDesktopTop, getFocusFollowsMouse, getMenuItem, getScreen, getTheme, hasWindow, hiddenWindowCount, hideWindow, inputBox, inputBox, inputBox, invokeLater, isRunning, messageBox, messageBox, onCommand, onExit, onKeypress, openTerminal, openTerminal, openTerminal, openTerminal, openTerminal, openTerminal, openTerminal, openTerminal, openTerminal, openTerminal, postEvent, postMenuEvent, recomputeMenuX, removeMenu, removeTimer, restoreConsole, run, setDesktop, setFocusFollowsMouse, showAboutDialog, shownWindowCount, showWindow, switchMenu, switchWindow, windowCount, yieldpublic DemoApplication(java.io.InputStream input,
java.io.OutputStream output)
throws java.io.UnsupportedEncodingException
input - an InputStream connected to the remote user, or null for
System.in. If System.in is used, then on non-Windows systems it will
be put in raw mode; shutdown() will (blindly!) put System.in in cooked
mode. input is always converted to a Reader with UTF-8 encoding.output - an OutputStream connected to the remote user, or null
for System.out. output is always converted to a Writer with UTF-8
encoding.java.io.UnsupportedEncodingException - if an exception is thrown when
creating the InputStreamReaderpublic DemoApplication(java.io.InputStream input,
java.io.Reader reader,
java.io.PrintWriter writer,
boolean setRawMode)
input - the InputStream underlying 'reader'. Its available()
method is used to determine if reader.read() will block or not.reader - a Reader connected to the remote user.writer - a PrintWriter connected to the remote user.setRawMode - if true, set System.in into raw mode with stty.
This should in general not be used. It is here solely for Demo3,
which uses System.in.java.lang.IllegalArgumentException - if input, reader, or writer are null.public DemoApplication(java.io.InputStream input,
java.io.Reader reader,
java.io.PrintWriter writer)
input - the InputStream underlying 'reader'. Its available()
method is used to determine if reader.read() will block or not.reader - a Reader connected to the remote user.writer - a PrintWriter connected to the remote user.java.lang.IllegalArgumentException - if input, reader, or writer are null.public DemoApplication(Backend backend)
backend - a Backend that is already ready to go.public DemoApplication(TApplication.BackendType backendType) throws java.lang.Exception
backendType - one of the TApplication.BackendType valuesjava.lang.Exception - if TApplication can't instantiate the Backend.public boolean onMenu(TMenuEvent menu)
onMenu in class TApplicationmenu - menu eventCopyright © 2019 Kevin Lamonte. Licensed MIT.