Package jexer
Class TCommand
- java.lang.Object
-
- jexer.TCommand
-
public class TCommand extends java.lang.ObjectThis class encapsulates a user command event. User commands can be generated by menu actions, keyboard accelerators, and other UI elements. Commands can operate on both the application and individual widgets.
-
-
Field Summary
Fields Modifier and Type Field Description static intABORTImmediately abort the application (e.g.static intBACKEND_DISCONNECTBackend disconnected.static intCASCADECascade windows.static intCLEARClear selected text without copying it to the clipboard.static intCLOSE_ALLClose all windows.static TCommandcmAbortImmediately abort the application (e.g.static TCommandcmBackendDisconnectBackend disconnected.static TCommandcmCascadeCascade windows.static TCommandcmClearClear selected text without copying it to the clipboard.static TCommandcmCloseAllClose all windows.static TCommandcmCopyCopy selected text to clipboard.static TCommandcmCutCut selected text and copy to the clipboard.static TCommandcmExitExit application.static TCommandcmHelpEnter help system.static TCommandcmMenuEnter first menu.static TCommandcmOpenFile open dialog.static TCommandcmPastePaste from clipboard.static TCommandcmQuitExit application.static TCommandcmSaveSave file.static TCommandcmShellSpawn OS shell window.static TCommandcmTileTile windows.static TCommandcmWindowCloseClose window.static TCommandcmWindowMoveMove (move/resize) window.static TCommandcmWindowNextNext window (like Alt-TAB).static TCommandcmWindowPreviousPrevious window (like Shift-Alt-TAB).static TCommandcmWindowZoomZoom (maximize/restore) window.static intCOPYCopy selected text to clipboard.static intCUTCut selected text and copy to the clipboard.static intEXITExit application.static intHELPEnter help system.static intMENUEnter first menu.static intOPENFile open dialog.static intPASTEPaste from clipboard.static intSAVESave file.static intSHELLSpawn OS shell window.static intTILETile windows.static intWINDOW_CLOSEClose window.static intWINDOW_MOVEMove (move/resize) window.static intWINDOW_NEXTNext window (like Alt-TAB).static intWINDOW_PREVIOUSPrevious window (like Shift-Alt-TAB).static intWINDOW_ZOOMZoom (maximize/restore) window.
-
Constructor Summary
Constructors Constructor Description TCommand(int type)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object rhs)Comparison check.inthashCode()Hashcode uses all fields in equals().java.lang.StringtoString()Make human-readable description of this TCommand.
-
-
-
Field Detail
-
ABORT
public static final int ABORT
Immediately abort the application (e.g. remote side closed connection).- See Also:
- Constant Field Values
-
OPEN
public static final int OPEN
File open dialog.- See Also:
- Constant Field Values
-
EXIT
public static final int EXIT
Exit application.- See Also:
- Constant Field Values
-
SHELL
public static final int SHELL
Spawn OS shell window.- See Also:
- Constant Field Values
-
CUT
public static final int CUT
Cut selected text and copy to the clipboard.- See Also:
- Constant Field Values
-
COPY
public static final int COPY
Copy selected text to clipboard.- See Also:
- Constant Field Values
-
PASTE
public static final int PASTE
Paste from clipboard.- See Also:
- Constant Field Values
-
CLEAR
public static final int CLEAR
Clear selected text without copying it to the clipboard.- See Also:
- Constant Field Values
-
TILE
public static final int TILE
Tile windows.- See Also:
- Constant Field Values
-
CASCADE
public static final int CASCADE
Cascade windows.- See Also:
- Constant Field Values
-
CLOSE_ALL
public static final int CLOSE_ALL
Close all windows.- See Also:
- Constant Field Values
-
WINDOW_MOVE
public static final int WINDOW_MOVE
Move (move/resize) window.- See Also:
- Constant Field Values
-
WINDOW_ZOOM
public static final int WINDOW_ZOOM
Zoom (maximize/restore) window.- See Also:
- Constant Field Values
-
WINDOW_NEXT
public static final int WINDOW_NEXT
Next window (like Alt-TAB).- See Also:
- Constant Field Values
-
WINDOW_PREVIOUS
public static final int WINDOW_PREVIOUS
Previous window (like Shift-Alt-TAB).- See Also:
- Constant Field Values
-
WINDOW_CLOSE
public static final int WINDOW_CLOSE
Close window.- See Also:
- Constant Field Values
-
HELP
public static final int HELP
Enter help system.- See Also:
- Constant Field Values
-
MENU
public static final int MENU
Enter first menu.- See Also:
- Constant Field Values
-
SAVE
public static final int SAVE
Save file.- See Also:
- Constant Field Values
-
BACKEND_DISCONNECT
public static final int BACKEND_DISCONNECT
Backend disconnected.- See Also:
- Constant Field Values
-
cmAbort
public static final TCommand cmAbort
Immediately abort the application (e.g. remote side closed connection).
-
cmExit
public static final TCommand cmExit
Exit application.
-
cmQuit
public static final TCommand cmQuit
Exit application.
-
cmOpen
public static final TCommand cmOpen
File open dialog.
-
cmShell
public static final TCommand cmShell
Spawn OS shell window.
-
cmCut
public static final TCommand cmCut
Cut selected text and copy to the clipboard.
-
cmCopy
public static final TCommand cmCopy
Copy selected text to clipboard.
-
cmPaste
public static final TCommand cmPaste
Paste from clipboard.
-
cmClear
public static final TCommand cmClear
Clear selected text without copying it to the clipboard.
-
cmTile
public static final TCommand cmTile
Tile windows.
-
cmCascade
public static final TCommand cmCascade
Cascade windows.
-
cmCloseAll
public static final TCommand cmCloseAll
Close all windows.
-
cmWindowMove
public static final TCommand cmWindowMove
Move (move/resize) window.
-
cmWindowZoom
public static final TCommand cmWindowZoom
Zoom (maximize/restore) window.
-
cmWindowNext
public static final TCommand cmWindowNext
Next window (like Alt-TAB).
-
cmWindowPrevious
public static final TCommand cmWindowPrevious
Previous window (like Shift-Alt-TAB).
-
cmWindowClose
public static final TCommand cmWindowClose
Close window.
-
cmHelp
public static final TCommand cmHelp
Enter help system.
-
cmSave
public static final TCommand cmSave
Save file.
-
cmMenu
public static final TCommand cmMenu
Enter first menu.
-
cmBackendDisconnect
public static final TCommand cmBackendDisconnect
Backend disconnected.
-
-
Method Detail
-
toString
public final java.lang.String toString()
Make human-readable description of this TCommand.- Overrides:
toStringin classjava.lang.Object- Returns:
- displayable String
-
equals
public final boolean equals(java.lang.Object rhs)
Comparison check. All fields must match to return true.- Overrides:
equalsin classjava.lang.Object- Parameters:
rhs- another TCommand instance- Returns:
- true if all fields are equal
-
hashCode
public int hashCode()
Hashcode uses all fields in equals().- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash
-
-