2 * Jexer - Java Text User Interface
6 * Author: Kevin Lamonte, <a href="mailto:kevin.lamonte@gmail.com">kevin.lamonte@gmail.com</a>
8 * License: LGPLv3 or later
10 * Copyright: This module is licensed under the GNU Lesser General
11 * Public License Version 3. Please see the file "COPYING" in this
12 * directory for more information about the GNU Lesser General Public
15 * Copyright (C) 2015 Kevin Lamonte
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public License
19 * as published by the Free Software Foundation; either version 3 of
20 * the License, or (at your option) any later version.
22 * This program is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * General Public License for more details.
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this program; if not, see
29 * http://www.gnu.org/licenses/, or write to the Free Software
30 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
36 * This class encapsulates several kinds of user commands. A user command
37 * can be generated by a menu action or keyboard accelerator.
39 public class TCommand
{
43 * Immediately abort the application (e.g. remote side closed
59 * Spawn OS shell window
64 * Cut selected text and copy to the clipboard
69 * Copy selected text to clipboard
74 * Paste from clipboard
79 * Clear selected text without copying it to the clipboard
99 * Move (move/resize) window
104 * Zoom (maximize/restore) window
109 * Next window (like Alt-TAB)
114 * Previous window (like Shift-Alt-TAB)
126 * Type of command, one of EXIT, CASCADE, etc.
133 * @param type the Type of command, one of EXIT, CASCADE, etc.
135 public TCommand(Type type
) {
140 * Make human-readable description of this event
143 public String
toString() {
144 return String
.format("%s", type
);
147 static public final TCommand cmAbort
= new TCommand(TCommand
.Type
.ABORT
);
148 static public final TCommand cmExit
= new TCommand(TCommand
.Type
.EXIT
);
149 static public final TCommand cmQuit
= new TCommand(TCommand
.Type
.EXIT
);
150 static public final TCommand cmOpen
= new TCommand(TCommand
.Type
.OPEN
);
151 static public final TCommand cmShell
= new TCommand(TCommand
.Type
.SHELL
);
152 static public final TCommand cmCut
= new TCommand(TCommand
.Type
.CUT
);
153 static public final TCommand cmCopy
= new TCommand(TCommand
.Type
.COPY
);
154 static public final TCommand cmPaste
= new TCommand(TCommand
.Type
.PASTE
);
155 static public final TCommand cmClear
= new TCommand(TCommand
.Type
.CLEAR
);
156 static public final TCommand cmTile
= new TCommand(TCommand
.Type
.TILE
);
157 static public final TCommand cmCascade
= new TCommand(TCommand
.Type
.CASCADE
);
158 static public final TCommand cmCloseAll
= new TCommand(TCommand
.Type
.CLOSE_ALL
);
159 static public final TCommand cmWindowMove
= new TCommand(TCommand
.Type
.WINDOW_MOVE
);
160 static public final TCommand cmWindowZoom
= new TCommand(TCommand
.Type
.WINDOW_ZOOM
);
161 static public final TCommand cmWindowNext
= new TCommand(TCommand
.Type
.WINDOW_NEXT
);
162 static public final TCommand cmWindowPrevious
= new TCommand(TCommand
.Type
.WINDOW_PREVIOUS
);
163 static public final TCommand cmWindowClose
= new TCommand(TCommand
.Type
.WINDOW_CLOSE
);