git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8caf0d5
)
Refactoring - boolean getters and miscellaneous
author
Kevin Lamonte
<kevin.lamonte@gmail.com>
Sun, 22 Mar 2015 04:00:42 +0000
(
00:00
-0400)
committer
Kevin Lamonte
<kevin.lamonte@gmail.com>
Sun, 22 Mar 2015 04:00:42 +0000
(
00:00
-0400)
28 files changed:
README.md
patch
|
blob
|
blame
|
history
src/jexer/TApplication.java
patch
|
blob
|
blame
|
history
src/jexer/TButton.java
patch
|
blob
|
blame
|
history
src/jexer/TCheckbox.java
patch
|
blob
|
blame
|
history
src/jexer/TField.java
patch
|
blob
|
blame
|
history
src/jexer/THScroller.java
patch
|
blob
|
blame
|
history
src/jexer/TKeypress.java
patch
|
blob
|
blame
|
history
src/jexer/TLabel.java
patch
|
blob
|
blame
|
history
src/jexer/TPasswordField.java
patch
|
blob
|
blame
|
history
src/jexer/TRadioButton.java
patch
|
blob
|
blame
|
history
src/jexer/TRadioGroup.java
patch
|
blob
|
blame
|
history
src/jexer/TTerminalWindow.java
patch
|
blob
|
blame
|
history
src/jexer/TText.java
patch
|
blob
|
blame
|
history
src/jexer/TVScroller.java
patch
|
blob
|
blame
|
history
src/jexer/TWidget.java
patch
|
blob
|
blame
|
history
src/jexer/TWindow.java
patch
|
blob
|
blame
|
history
src/jexer/bits/Cell.java
patch
|
blob
|
blame
|
history
src/jexer/bits/CellAttributes.java
patch
|
blob
|
blame
|
history
src/jexer/demos/Demo1.java
patch
|
blob
|
blame
|
history
src/jexer/event/TKeypressEvent.java
patch
|
blob
|
blame
|
history
src/jexer/event/TMouseEvent.java
patch
|
blob
|
blame
|
history
src/jexer/io/ECMA48Screen.java
patch
|
blob
|
blame
|
history
src/jexer/io/Screen.java
patch
|
blob
|
blame
|
history
src/jexer/io/SwingScreen.java
patch
|
blob
|
blame
|
history
src/jexer/menu/TMenu.java
patch
|
blob
|
blame
|
history
src/jexer/menu/TMenuItem.java
patch
|
blob
|
blame
|
history
src/jexer/menu/TSubMenu.java
patch
|
blob
|
blame
|
history
src/jexer/tterminal/ECMA48.java
patch
|
blob
|
blame
|
history
diff --git
a/README.md
b/README.md
index ee5a26543ff6436057ee4784a26be3ef42ec14b4..24b437a65a4dee26b1392ddda1033bc40860f3d8 100644
(file)
--- a/
README.md
+++ b/
README.md
@@
-136,13
+136,6
@@
Many tasks remain before calling this version 1.0:
- Block cursor
- ECMA48Backend running on socket
- TFileOpen
- Block cursor
- ECMA48Backend running on socket
- TFileOpen
-- Decide on naming convention: getText, getValue, getLabel: one or all
- of them?
-- Refactor:
- - TKeypress:
- - getCh() --> getChar()
- - getAlt/getCtrl/getShift --> isAltDown / isCtrlDown / isShiftDown
- - Other boolean getters --> isSomething
- Document any properties used
- Expose use of 'stty'
- Document any properties used
- Expose use of 'stty'
diff --git
a/src/jexer/TApplication.java
b/src/jexer/TApplication.java
index 2b8f47e47cbf80b84cdd5bb83ce90c7bdfa2846f..8be6af5af54a9a024d67976a7f6960fe2d4bba90 100644
(file)
--- a/
src/jexer/TApplication.java
+++ b/
src/jexer/TApplication.java
@@
-569,7
+569,7
@@
public class TApplication implements Runnable {
/**
* Draw everything.
*/
/**
* Draw everything.
*/
- p
ublic final
void drawAll() {
+ p
rivate
void drawAll() {
if (debugThreads) {
System.err.printf("drawAll() enter\n");
}
if (debugThreads) {
System.err.printf("drawAll() enter\n");
}
@@
-623,7
+623,7
@@
public class TApplication implements Runnable {
for (TMenu menu: menus) {
CellAttributes menuColor;
CellAttributes menuMnemonicColor;
for (TMenu menu: menus) {
CellAttributes menuColor;
CellAttributes menuMnemonicColor;
- if (menu.
get
Active()) {
+ if (menu.
is
Active()) {
menuColor = theme.getColor("tmenu.highlighted");
menuMnemonicColor = theme.getColor("tmenu.mnemonic.highlighted");
} else {
menuColor = theme.getColor("tmenu.highlighted");
menuMnemonicColor = theme.getColor("tmenu.mnemonic.highlighted");
} else {
@@
-638,7
+638,7
@@
public class TApplication implements Runnable {
getScreen().putCharXY(x + 1 + menu.getMnemonic().getShortcutIdx(),
0, menu.getMnemonic().getShortcut(), menuMnemonicColor);
getScreen().putCharXY(x + 1 + menu.getMnemonic().getShortcutIdx(),
0, menu.getMnemonic().getShortcut(), menuMnemonicColor);
- if (menu.
get
Active()) {
+ if (menu.
is
Active()) {
menu.drawChildren();
// Reset the screen clipping so we can draw the next title.
getScreen().resetClipping();
menu.drawChildren();
// Reset the screen clipping so we can draw the next title.
getScreen().resetClipping();
@@
-659,7
+659,7
@@
public class TApplication implements Runnable {
TWidget activeWidget = null;
if (sorted.size() > 0) {
activeWidget = sorted.get(sorted.size() - 1).getActiveChild();
TWidget activeWidget = null;
if (sorted.size() > 0) {
activeWidget = sorted.get(sorted.size() - 1).getActiveChild();
- if (activeWidget.
visibleCursor
()) {
+ if (activeWidget.
isCursorVisible
()) {
getScreen().putCursor(true, activeWidget.getCursorAbsoluteX(),
activeWidget.getCursorAbsoluteY());
cursor = true;
getScreen().putCursor(true, activeWidget.getCursorAbsoluteX(),
activeWidget.getCursorAbsoluteY());
cursor = true;
@@
-885,11
+885,11
@@
public class TApplication implements Runnable {
break;
}
if ((mouse.getType() == TMouseEvent.Type.MOUSE_MOTION)
break;
}
if ((mouse.getType() == TMouseEvent.Type.MOUSE_MOTION)
- && (!mouse.
get
Mouse1())
- && (!mouse.
get
Mouse2())
- && (!mouse.
get
Mouse3())
- && (!mouse.
get
MouseWheelUp())
- && (!mouse.
get
MouseWheelDown())
+ && (!mouse.
is
Mouse1())
+ && (!mouse.
is
Mouse2())
+ && (!mouse.
is
Mouse3())
+ && (!mouse.
is
MouseWheelUp())
+ && (!mouse.
is
MouseWheelDown())
) {
break;
}
) {
break;
}
@@
-921,7
+921,7
@@
public class TApplication implements Runnable {
item = accelerators.get(keypressLowercase);
}
if (item != null) {
item = accelerators.get(keypressLowercase);
}
if (item != null) {
- if (item.
get
Enabled()) {
+ if (item.
is
Enabled()) {
// Let the menu item dispatch
item.dispatch();
return;
// Let the menu item dispatch
item.dispatch();
return;
@@
-947,7
+947,7
@@
public class TApplication implements Runnable {
// Dispatch events to the active window -------------------------------
for (TWindow window: windows) {
// Dispatch events to the active window -------------------------------
for (TWindow window: windows) {
- if (window.
get
Active()) {
+ if (window.
is
Active()) {
if (event instanceof TMouseEvent) {
TMouseEvent mouse = (TMouseEvent) event;
// Convert the mouse relative x/y to window coordinates
if (event instanceof TMouseEvent) {
TMouseEvent mouse = (TMouseEvent) event;
// Convert the mouse relative x/y to window coordinates
@@
-1132,7
+1132,7
@@
public class TApplication implements Runnable {
// Swap z/active between active window and the next in the list
int activeWindowI = -1;
for (int i = 0; i < windows.size(); i++) {
// Swap z/active between active window and the next in the list
int activeWindowI = -1;
for (int i = 0; i < windows.size(); i++) {
- if (windows.get(i).
get
Active()) {
+ if (windows.get(i).
is
Active()) {
activeWindowI = i;
break;
}
activeWindowI = i;
break;
}
@@
-1241,7
+1241,7
@@
public class TApplication implements Runnable {
// See if they hit the menu bar
if ((mouse.getType() == TMouseEvent.Type.MOUSE_DOWN)
// See if they hit the menu bar
if ((mouse.getType() == TMouseEvent.Type.MOUSE_DOWN)
- && (mouse.
get
Mouse1())
+ && (mouse.
is
Mouse1())
&& (!modalWindowActive())
&& (mouse.getAbsoluteY() == 0)
) {
&& (!modalWindowActive())
&& (mouse.getAbsoluteY() == 0)
) {
@@
-1268,7
+1268,7
@@
public class TApplication implements Runnable {
// See if they hit the menu bar
if ((mouse.getType() == TMouseEvent.Type.MOUSE_MOTION)
// See if they hit the menu bar
if ((mouse.getType() == TMouseEvent.Type.MOUSE_MOTION)
- && (mouse.
get
Mouse1())
+ && (mouse.
is
Mouse1())
&& (activeMenu != null)
&& (mouse.getAbsoluteY() == 0)
) {
&& (activeMenu != null)
&& (mouse.getAbsoluteY() == 0)
) {
@@
-1322,8
+1322,8
@@
public class TApplication implements Runnable {
}
// We will be switching to another window
}
// We will be switching to another window
- assert (windows.get(0).
get
Active());
- assert (!window.
get
Active());
+ assert (windows.get(0).
is
Active());
+ assert (!window.
is
Active());
windows.get(0).setActive(false);
windows.get(0).setZ(window.getZ());
window.setZ(0);
windows.get(0).setActive(false);
windows.get(0).setZ(window.getZ());
window.setZ(0);
@@
-1481,9
+1481,9
@@
public class TApplication implements Runnable {
// Default: only menu shortcuts
// Process Alt-F, Alt-E, etc. menu shortcut keys
// Default: only menu shortcuts
// Process Alt-F, Alt-E, etc. menu shortcut keys
- if (!keypress.getKey().
getIs
Key()
- && keypress.getKey().
get
Alt()
- && !keypress.getKey().
get
Ctrl()
+ if (!keypress.getKey().
isFn
Key()
+ && keypress.getKey().
is
Alt()
+ && !keypress.getKey().
is
Ctrl()
&& (activeMenu == null)
) {
&& (activeMenu == null)
) {
@@
-1491,7
+1491,7
@@
public class TApplication implements Runnable {
for (TMenu menu: menus) {
if (Character.toLowerCase(menu.getMnemonic().getShortcut())
for (TMenu menu: menus) {
if (Character.toLowerCase(menu.getMnemonic().getShortcut())
- == Character.toLowerCase(keypress.getKey().getCh())
+ == Character.toLowerCase(keypress.getKey().getCh
ar
())
) {
activeMenu = menu;
menu.setActive(true);
) {
activeMenu = menu;
menu.setActive(true);
diff --git
a/src/jexer/TButton.java
b/src/jexer/TButton.java
index 5e5edd03ca37a7a67285df1efd78bd810ede21c8..ce04f5c79a51de37c935b71bd74e99043aa3dc49 100644
(file)
--- a/
src/jexer/TButton.java
+++ b/
src/jexer/TButton.java
@@
-145,10
+145,10
@@
public final class TButton extends TWidget {
shadowColor.setForeColor(Color.BLACK);
shadowColor.setBold(false);
shadowColor.setForeColor(Color.BLACK);
shadowColor.setBold(false);
- if (!
get
Enabled()) {
+ if (!
is
Enabled()) {
buttonColor = getTheme().getColor("tbutton.disabled");
menuMnemonicColor = getTheme().getColor("tbutton.disabled");
buttonColor = getTheme().getColor("tbutton.disabled");
menuMnemonicColor = getTheme().getColor("tbutton.disabled");
- } else if (
get
AbsoluteActive()) {
+ } else if (
is
AbsoluteActive()) {
buttonColor = getTheme().getColor("tbutton.active");
menuMnemonicColor = getTheme().getColor("tbutton.mnemonic.highlighted");
} else {
buttonColor = getTheme().getColor("tbutton.active");
menuMnemonicColor = getTheme().getColor("tbutton.mnemonic.highlighted");
} else {
@@
-191,7
+191,7
@@
public final class TButton extends TWidget {
public void onMouseDown(final TMouseEvent mouse) {
this.mouse = mouse;
public void onMouseDown(final TMouseEvent mouse) {
this.mouse = mouse;
- if ((mouseOnButton()) && (mouse.
get
Mouse1())) {
+ if ((mouseOnButton()) && (mouse.
is
Mouse1())) {
// Begin button press
inButtonPress = true;
}
// Begin button press
inButtonPress = true;
}
@@
-206,7
+206,7
@@
public final class TButton extends TWidget {
public void onMouseUp(final TMouseEvent mouse) {
this.mouse = mouse;
public void onMouseUp(final TMouseEvent mouse) {
this.mouse = mouse;
- if (inButtonPress && mouse.
get
Mouse1()) {
+ if (inButtonPress && mouse.
is
Mouse1()) {
inButtonPress = false;
// Dispatch the event
if (action != null) {
inButtonPress = false;
// Dispatch the event
if (action != null) {
diff --git
a/src/jexer/TCheckbox.java
b/src/jexer/TCheckbox.java
index b33d1f59252705042adf945af8a325bc6785c618..1562ca023d9af4c2adee8139f837cbbdcb5c190b 100644
(file)
--- a/
src/jexer/TCheckbox.java
+++ b/
src/jexer/TCheckbox.java
@@
-30,11
+30,11
@@
*/
package jexer;
*/
package jexer;
+import static jexer.TKeypress.kbSpace;
import jexer.bits.CellAttributes;
import jexer.bits.GraphicsChars;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
import jexer.bits.CellAttributes;
import jexer.bits.GraphicsChars;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
-import static jexer.TKeypress.*;
/**
* TCheckbox implements an on/off checkbox.
/**
* TCheckbox implements an on/off checkbox.
@@
-46,6
+46,24
@@
public final class TCheckbox extends TWidget {
*/
private boolean checked = false;
*/
private boolean checked = false;
+ /**
+ * Get checked value.
+ *
+ * @return if true, this is checked
+ */
+ public final boolean isChecked() {
+ return checked;
+ }
+
+ /**
+ * Set checked value.
+ *
+ * @param checked new checked value.
+ */
+ public final void setChecked(final boolean checked) {
+ this.checked = checked;
+ }
+
/**
* Label for this checkbox.
*/
/**
* Label for this checkbox.
*/
@@
-61,7
+79,7
@@
public final class TCheckbox extends TWidget {
* @param checked initial check state
*/
public TCheckbox(final TWidget parent, final int x, final int y,
* @param checked initial check state
*/
public TCheckbox(final TWidget parent, final int x, final int y,
- final String label, final boolean checked) {
+
final String label, final boolean checked) {
// Set parent and window
super(parent, x, y, label.length() + 4, 1);
// Set parent and window
super(parent, x, y, label.length() + 4, 1);
@@
-69,7
+87,7
@@
public final class TCheckbox extends TWidget {
this.label = label;
this.checked = checked;
this.label = label;
this.checked = checked;
- set
HasCursor
(true);
+ set
CursorVisible
(true);
setCursorX(1);
}
setCursorX(1);
}
@@
-81,9
+99,9
@@
public final class TCheckbox extends TWidget {
*/
private boolean mouseOnCheckbox(final TMouseEvent mouse) {
if ((mouse.getY() == 0)
*/
private boolean mouseOnCheckbox(final TMouseEvent mouse) {
if ((mouse.getY() == 0)
- && (mouse.getX() >= 0)
- && (mouse.getX() <= 2)
- ) {
+
&& (mouse.getX() >= 0)
+
&& (mouse.getX() <= 2)
+
) {
return true;
}
return false;
return true;
}
return false;
@@
-96,7
+114,7
@@
public final class TCheckbox extends TWidget {
public void draw() {
CellAttributes checkboxColor;
public void draw() {
CellAttributes checkboxColor;
- if (
get
AbsoluteActive()) {
+ if (
is
AbsoluteActive()) {
checkboxColor = getTheme().getColor("tcheckbox.active");
} else {
checkboxColor = getTheme().getColor("tcheckbox.inactive");
checkboxColor = getTheme().getColor("tcheckbox.active");
} else {
checkboxColor = getTheme().getColor("tcheckbox.inactive");
@@
-119,7
+137,7
@@
public final class TCheckbox extends TWidget {
*/
@Override
public void onMouseDown(final TMouseEvent mouse) {
*/
@Override
public void onMouseDown(final TMouseEvent mouse) {
- if ((mouseOnCheckbox(mouse)) && (mouse.
get
Mouse1())) {
+ if ((mouseOnCheckbox(mouse)) && (mouse.
is
Mouse1())) {
// Switch state
checked = !checked;
}
// Switch state
checked = !checked;
}
diff --git
a/src/jexer/TField.java
b/src/jexer/TField.java
index 083efdda3853ad6898e9b31c010ae01c703ce503..07a457bcf7eb7beb4e05af9e71f8f782a6cc2227 100644
(file)
--- a/
src/jexer/TField.java
+++ b/
src/jexer/TField.java
@@
-141,7
+141,7
@@
public class TField extends TWidget {
// Set parent and window
super(parent, x, y, width, 1);
// Set parent and window
super(parent, x, y, width, 1);
- set
HasCursor
(true);
+ set
CursorVisible
(true);
this.fixed = fixed;
this.text = text;
this.enterAction = enterAction;
this.fixed = fixed;
this.text = text;
this.enterAction = enterAction;
@@
-190,7
+190,7
@@
public class TField extends TWidget {
public void draw() {
CellAttributes fieldColor;
public void draw() {
CellAttributes fieldColor;
- if (
get
AbsoluteActive()) {
+ if (
is
AbsoluteActive()) {
fieldColor = getTheme().getColor("tfield.active");
} else {
fieldColor = getTheme().getColor("tfield.inactive");
fieldColor = getTheme().getColor("tfield.active");
} else {
fieldColor = getTheme().getColor("tfield.inactive");
@@
-230,7
+230,7
@@
public class TField extends TWidget {
public void onMouseDown(final TMouseEvent mouse) {
this.mouse = mouse;
public void onMouseDown(final TMouseEvent mouse) {
this.mouse = mouse;
- if ((mouseOnField()) && (mouse.
get
Mouse1())) {
+ if ((mouseOnField()) && (mouse.
is
Mouse1())) {
// Move cursor
int deltaX = mouse.getX() - getCursorX();
position += deltaX;
// Move cursor
int deltaX = mouse.getX() - getCursorX();
position += deltaX;
@@
-333,16
+333,16
@@
public class TField extends TWidget {
return;
}
return;
}
- if (!keypress.getKey().
getIs
Key()
- && !keypress.getKey().
get
Alt()
- && !keypress.getKey().
get
Ctrl()
+ if (!keypress.getKey().
isFn
Key()
+ && !keypress.getKey().
is
Alt()
+ && !keypress.getKey().
is
Ctrl()
) {
// Plain old keystroke, process it
if ((position == text.length())
&& (text.length() < getWidth())) {
// Append case
) {
// Plain old keystroke, process it
if ((position == text.length())
&& (text.length() < getWidth())) {
// Append case
- appendChar(keypress.getKey().getCh());
+ appendChar(keypress.getKey().getCh
ar
());
} else if ((position < text.length())
&& (text.length() < getWidth())) {
} else if ((position < text.length())
&& (text.length() < getWidth())) {
@@
-350,12
+350,12
@@
public class TField extends TWidget {
if (insertMode == false) {
// Replace character
text = text.substring(0, position)
if (insertMode == false) {
// Replace character
text = text.substring(0, position)
- + keypress.getKey().getCh()
+ + keypress.getKey().getCh
ar
()
+ text.substring(position + 1);
position++;
} else {
// Insert character
+ text.substring(position + 1);
position++;
} else {
// Insert character
- insertChar(keypress.getKey().getCh());
+ insertChar(keypress.getKey().getCh
ar
());
}
} else if ((position < text.length())
&& (text.length() >= getWidth())) {
}
} else if ((position < text.length())
&& (text.length() >= getWidth())) {
@@
-366,7
+366,7
@@
public class TField extends TWidget {
} else if ((fixed == true) && (insertMode == false)) {
// Overwrite the last character, maybe move position
text = text.substring(0, position)
} else if ((fixed == true) && (insertMode == false)) {
// Overwrite the last character, maybe move position
text = text.substring(0, position)
- + keypress.getKey().getCh()
+ + keypress.getKey().getCh
ar
()
+ text.substring(position + 1);
if (position < getWidth() - 1) {
position++;
+ text.substring(position + 1);
if (position < getWidth() - 1) {
position++;
@@
-374,23
+374,23
@@
public class TField extends TWidget {
} else if ((fixed == false) && (insertMode == false)) {
// Overwrite the last character, definitely move position
text = text.substring(0, position)
} else if ((fixed == false) && (insertMode == false)) {
// Overwrite the last character, definitely move position
text = text.substring(0, position)
- + keypress.getKey().getCh()
+ + keypress.getKey().getCh
ar
()
+ text.substring(position + 1);
position++;
} else {
if (position == text.length()) {
// Append this character
+ text.substring(position + 1);
position++;
} else {
if (position == text.length()) {
// Append this character
- appendChar(keypress.getKey().getCh());
+ appendChar(keypress.getKey().getCh
ar
());
} else {
// Insert this character
} else {
// Insert this character
- insertChar(keypress.getKey().getCh());
+ insertChar(keypress.getKey().getCh
ar
());
}
}
} else {
assert (!fixed);
// Append this character
}
}
} else {
assert (!fixed);
// Append this character
- appendChar(keypress.getKey().getCh());
+ appendChar(keypress.getKey().getCh
ar
());
}
dispatch(false);
return;
}
dispatch(false);
return;
diff --git
a/src/jexer/THScroller.java
b/src/jexer/THScroller.java
index 3539ff4e874d579092be6c83cd05bc3dfa7f40cb..511bce9c2bebd82adfef88823037a0aafeb0e14c 100644
(file)
--- a/
src/jexer/THScroller.java
+++ b/
src/jexer/THScroller.java
@@
-291,7
+291,7
@@
public final class THScroller extends TWidget {
return;
}
return;
}
- if ((mouse.
get
Mouse1())
+ if ((mouse.
is
Mouse1())
&& (inScroll)
&& (mouse.getX() > 0)
&& (mouse.getX() < getWidth() - 1)
&& (inScroll)
&& (mouse.getX() > 0)
&& (mouse.getX() < getWidth() - 1)
diff --git
a/src/jexer/TKeypress.java
b/src/jexer/TKeypress.java
index 8143f151006af3fc656a8188d66b6d660c576802..531251bfd268e004e5c616d5e413afece44b9199 100644
(file)
--- a/
src/jexer/TKeypress.java
+++ b/
src/jexer/TKeypress.java
@@
-173,31
+173,31
@@
public final class TKeypress {
public static final int ESC = 43;
/**
public static final int ESC = 43;
/**
- * If true, ch is meaningless, use
fnKey
instead.
+ * If true, ch is meaningless, use
keyCode
instead.
*/
*/
- private boolean isKey;
+ private boolean is
Function
Key;
/**
/**
- * Getter for isKey.
+ * Getter for is
Function
Key.
*
*
- * @return if true, ch is meaningless, use
fnKey
instead
+ * @return if true, ch is meaningless, use
keyCode
instead
*/
*/
- public boolean
getIs
Key() {
- return isKey;
+ public boolean
isFn
Key() {
+ return is
Function
Key;
}
/**
* Will be set to F1, F2, HOME, END, etc. if isKey is true.
*/
}
/**
* Will be set to F1, F2, HOME, END, etc. if isKey is true.
*/
- private int
fnKey
;
+ private int
keyCode
;
/**
/**
- * Getter for f
nKey
.
+ * Getter for f
unction key code
.
*
*
- * @return f
nKey
value (only valid is isKey is true)
+ * @return f
unction key code int
value (only valid is isKey is true)
*/
*/
- public int get
FnKey
() {
- return
fnKey
;
+ public int get
KeyCode
() {
+ return
keyCode
;
}
/**
}
/**
@@
-210,7
+210,7
@@
public final class TKeypress {
*
* @return alt value
*/
*
* @return alt value
*/
- public boolean
get
Alt() {
+ public boolean
is
Alt() {
return alt;
}
return alt;
}
@@
-224,7
+224,7
@@
public final class TKeypress {
*
* @return ctrl value
*/
*
* @return ctrl value
*/
- public boolean
get
Ctrl() {
+ public boolean
is
Ctrl() {
return ctrl;
}
return ctrl;
}
@@
-238,7
+238,7
@@
public final class TKeypress {
*
* @return shift value
*/
*
* @return shift value
*/
- public boolean
get
Shift() {
+ public boolean
is
Shift() {
return shift;
}
return shift;
}
@@
-252,7
+252,7
@@
public final class TKeypress {
*
* @return the character (only valid if isKey is false)
*/
*
* @return the character (only valid if isKey is false)
*/
- public char getCh() {
+ public char getCh
ar
() {
return ch;
}
return ch;
}
@@
-267,14
+267,14
@@
public final class TKeypress {
* @param shift if true, SHIFT was pressed with this keystroke
*/
public TKeypress(final boolean isKey, final int fnKey, final char ch,
* @param shift if true, SHIFT was pressed with this keystroke
*/
public TKeypress(final boolean isKey, final int fnKey, final char ch,
- final boolean alt, final boolean ctrl, final boolean shift) {
-
- this.isKey = isKey;
- this.
fnKey
= fnKey;
- this.ch = ch;
- this.alt = alt;
- this.ctrl = ctrl;
- this.shift = shift;
+
final boolean alt, final boolean ctrl, final boolean shift) {
+
+ this.is
Function
Key = isKey;
+ this.
keyCode
= fnKey;
+ this.ch
= ch;
+ this.alt
= alt;
+ this.ctrl
= ctrl;
+ this.shift
= shift;
}
/**
}
/**
@@
-290,12
+290,12
@@
public final class TKeypress {
}
TKeypress that = (TKeypress) rhs;
}
TKeypress that = (TKeypress) rhs;
- return ((is
Key == that.is
Key)
-
&& (fnKey == that.fnKey
)
- && (ch == that.ch)
- && (alt == that.alt)
- && (ctrl == that.ctrl)
- && (shift == that.shift));
+ return ((is
FunctionKey == that.isFunction
Key)
+
&& (keyCode == that.keyCode
)
+
&& (ch == that.ch)
+
&& (alt == that.alt)
+
&& (ctrl == that.ctrl)
+
&& (shift == that.shift));
}
/**
}
/**
@@
-308,9
+308,9
@@
public final class TKeypress {
int A = 13;
int B = 23;
int hash = A;
int A = 13;
int B = 23;
int hash = A;
- hash = (B * hash) + (isKey ? 1 : 0);
- hash = (B * hash) +
fnKey
;
- hash = (B * hash) +
(int)
ch;
+ hash = (B * hash) + (is
Function
Key ? 1 : 0);
+ hash = (B * hash) +
keyCode
;
+ hash = (B * hash) + ch;
hash = (B * hash) + (alt ? 1 : 0);
hash = (B * hash) + (ctrl ? 1 : 0);
hash = (B * hash) + (shift ? 1 : 0);
hash = (B * hash) + (alt ? 1 : 0);
hash = (B * hash) + (ctrl ? 1 : 0);
hash = (B * hash) + (shift ? 1 : 0);
@@
-324,138
+324,138
@@
public final class TKeypress {
*/
@Override
public String toString() {
*/
@Override
public String toString() {
- if (isKey) {
- switch (
fnKey
) {
+ if (is
Function
Key) {
+ switch (
keyCode
) {
case F1:
return String.format("%s%s%sF1",
case F1:
return String.format("%s%s%sF1",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F2:
return String.format("%s%s%sF2",
case F2:
return String.format("%s%s%sF2",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F3:
return String.format("%s%s%sF3",
case F3:
return String.format("%s%s%sF3",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F4:
return String.format("%s%s%sF4",
case F4:
return String.format("%s%s%sF4",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F5:
return String.format("%s%s%sF5",
case F5:
return String.format("%s%s%sF5",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F6:
return String.format("%s%s%sF6",
case F6:
return String.format("%s%s%sF6",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F7:
return String.format("%s%s%sF7",
case F7:
return String.format("%s%s%sF7",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F8:
return String.format("%s%s%sF8",
case F8:
return String.format("%s%s%sF8",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F9:
return String.format("%s%s%sF9",
case F9:
return String.format("%s%s%sF9",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F10:
return String.format("%s%s%sF10",
case F10:
return String.format("%s%s%sF10",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F11:
return String.format("%s%s%sF11",
case F11:
return String.format("%s%s%sF11",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case F12:
return String.format("%s%s%sF12",
case F12:
return String.format("%s%s%sF12",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case HOME:
return String.format("%s%s%sHOME",
case HOME:
return String.format("%s%s%sHOME",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case END:
return String.format("%s%s%sEND",
case END:
return String.format("%s%s%sEND",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case PGUP:
return String.format("%s%s%sPGUP",
case PGUP:
return String.format("%s%s%sPGUP",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case PGDN:
return String.format("%s%s%sPGDN",
case PGDN:
return String.format("%s%s%sPGDN",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case INS:
return String.format("%s%s%sINS",
case INS:
return String.format("%s%s%sINS",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case DEL:
return String.format("%s%s%sDEL",
case DEL:
return String.format("%s%s%sDEL",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case RIGHT:
return String.format("%s%s%sRIGHT",
case RIGHT:
return String.format("%s%s%sRIGHT",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case LEFT:
return String.format("%s%s%sLEFT",
case LEFT:
return String.format("%s%s%sLEFT",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case UP:
return String.format("%s%s%sUP",
case UP:
return String.format("%s%s%sUP",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case DOWN:
return String.format("%s%s%sDOWN",
case DOWN:
return String.format("%s%s%sDOWN",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case TAB:
return String.format("%s%s%sTAB",
case TAB:
return String.format("%s%s%sTAB",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case BTAB:
return String.format("%s%s%sBTAB",
case BTAB:
return String.format("%s%s%sBTAB",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case ENTER:
return String.format("%s%s%sENTER",
case ENTER:
return String.format("%s%s%sENTER",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
case ESC:
return String.format("%s%s%sESC",
case ESC:
return String.format("%s%s%sESC",
- ctrl ? "Ctrl+" : "",
- alt ? "Alt+" : "",
- shift ? "Shift+" : "");
+
ctrl ? "Ctrl+" : "",
+
alt ? "Alt+" : "",
+
shift ? "Shift+" : "");
default:
return String.format("--UNKNOWN--");
}
default:
return String.format("--UNKNOWN--");
}
@@
-481,7
+481,7
@@
public final class TKeypress {
} else if (alt && shift && ctrl) {
// Ctrl-Alt-Shift-X
return String.format("Ctrl+Alt+Shift+%c",
} else if (alt && shift && ctrl) {
// Ctrl-Alt-Shift-X
return String.format("Ctrl+Alt+Shift+%c",
- Character.toUpperCase(ch));
+
Character.toUpperCase(ch));
} else {
// X
return String.format("%c", ch);
} else {
// X
return String.format("%c", ch);
@@
-496,8
+496,9
@@
public final class TKeypress {
* @return a new instance with the key converted
*/
public TKeypress toLowerCase() {
* @return a new instance with the key converted
*/
public TKeypress toLowerCase() {
- TKeypress newKey = new TKeypress(isKey, fnKey, ch, alt, ctrl, shift);
- if (!isKey && (ch >= 'A') && (ch <= 'Z') && !ctrl && !alt) {
+ TKeypress newKey = new TKeypress(isFunctionKey, keyCode, ch, alt, ctrl,
+ shift);
+ if (!isFunctionKey && (ch >= 'A') && (ch <= 'Z') && !ctrl && !alt) {
newKey.shift = false;
newKey.ch += 32;
}
newKey.shift = false;
newKey.ch += 32;
}
@@
-511,8
+512,9
@@
public final class TKeypress {
* @return a new instance with the key converted
*/
public TKeypress toUpperCase() {
* @return a new instance with the key converted
*/
public TKeypress toUpperCase() {
- TKeypress newKey = new TKeypress(isKey, fnKey, ch, alt, ctrl, shift);
- if (!isKey && (ch >= 'a') && (ch <= 'z') && !ctrl && !alt) {
+ TKeypress newKey = new TKeypress(isFunctionKey, keyCode, ch, alt, ctrl,
+ shift);
+ if (!isFunctionKey && (ch >= 'a') && (ch <= 'z') && !ctrl && !alt) {
newKey.shift = true;
newKey.ch -= 32;
}
newKey.shift = true;
newKey.ch -= 32;
}
@@
-521,432
+523,432
@@
public final class TKeypress {
// Special "no-key" keypress, used to ignore undefined keystrokes
public static final TKeypress kbNoKey = new TKeypress(true,
// Special "no-key" keypress, used to ignore undefined keystrokes
public static final TKeypress kbNoKey = new TKeypress(true,
- TKeypress.NONE, ' ', false, false, false);
+
TKeypress.NONE, ' ', false, false, false);
// Normal keys
public static final TKeypress kbF1 = new TKeypress(true,
// Normal keys
public static final TKeypress kbF1 = new TKeypress(true,
- TKeypress.F1, ' ', false, false, false);
+
TKeypress.F1, ' ', false, false, false);
public static final TKeypress kbF2 = new TKeypress(true,
public static final TKeypress kbF2 = new TKeypress(true,
- TKeypress.F2, ' ', false, false, false);
+
TKeypress.F2, ' ', false, false, false);
public static final TKeypress kbF3 = new TKeypress(true,
public static final TKeypress kbF3 = new TKeypress(true,
- TKeypress.F3, ' ', false, false, false);
+
TKeypress.F3, ' ', false, false, false);
public static final TKeypress kbF4 = new TKeypress(true,
public static final TKeypress kbF4 = new TKeypress(true,
- TKeypress.F4, ' ', false, false, false);
+
TKeypress.F4, ' ', false, false, false);
public static final TKeypress kbF5 = new TKeypress(true,
public static final TKeypress kbF5 = new TKeypress(true,
- TKeypress.F5, ' ', false, false, false);
+
TKeypress.F5, ' ', false, false, false);
public static final TKeypress kbF6 = new TKeypress(true,
public static final TKeypress kbF6 = new TKeypress(true,
- TKeypress.F6, ' ', false, false, false);
+
TKeypress.F6, ' ', false, false, false);
public static final TKeypress kbF7 = new TKeypress(true,
public static final TKeypress kbF7 = new TKeypress(true,
- TKeypress.F7, ' ', false, false, false);
+
TKeypress.F7, ' ', false, false, false);
public static final TKeypress kbF8 = new TKeypress(true,
public static final TKeypress kbF8 = new TKeypress(true,
- TKeypress.F8, ' ', false, false, false);
+
TKeypress.F8, ' ', false, false, false);
public static final TKeypress kbF9 = new TKeypress(true,
public static final TKeypress kbF9 = new TKeypress(true,
- TKeypress.F9, ' ', false, false, false);
+
TKeypress.F9, ' ', false, false, false);
public static final TKeypress kbF10 = new TKeypress(true,
public static final TKeypress kbF10 = new TKeypress(true,
- TKeypress.F10, ' ', false, false, false);
+
TKeypress.F10, ' ', false, false, false);
public static final TKeypress kbF11 = new TKeypress(true,
public static final TKeypress kbF11 = new TKeypress(true,
- TKeypress.F11, ' ', false, false, false);
+
TKeypress.F11, ' ', false, false, false);
public static final TKeypress kbF12 = new TKeypress(true,
public static final TKeypress kbF12 = new TKeypress(true,
- TKeypress.F12, ' ', false, false, false);
+
TKeypress.F12, ' ', false, false, false);
public static final TKeypress kbAltF1 = new TKeypress(true,
public static final TKeypress kbAltF1 = new TKeypress(true,
- TKeypress.F1, ' ', true, false, false);
+
TKeypress.F1, ' ', true, false, false);
public static final TKeypress kbAltF2 = new TKeypress(true,
public static final TKeypress kbAltF2 = new TKeypress(true,
- TKeypress.F2, ' ', true, false, false);
+
TKeypress.F2, ' ', true, false, false);
public static final TKeypress kbAltF3 = new TKeypress(true,
public static final TKeypress kbAltF3 = new TKeypress(true,
- TKeypress.F3, ' ', true, false, false);
+
TKeypress.F3, ' ', true, false, false);
public static final TKeypress kbAltF4 = new TKeypress(true,
public static final TKeypress kbAltF4 = new TKeypress(true,
- TKeypress.F4, ' ', true, false, false);
+
TKeypress.F4, ' ', true, false, false);
public static final TKeypress kbAltF5 = new TKeypress(true,
public static final TKeypress kbAltF5 = new TKeypress(true,
- TKeypress.F5, ' ', true, false, false);
+
TKeypress.F5, ' ', true, false, false);
public static final TKeypress kbAltF6 = new TKeypress(true,
public static final TKeypress kbAltF6 = new TKeypress(true,
- TKeypress.F6, ' ', true, false, false);
+
TKeypress.F6, ' ', true, false, false);
public static final TKeypress kbAltF7 = new TKeypress(true,
public static final TKeypress kbAltF7 = new TKeypress(true,
- TKeypress.F7, ' ', true, false, false);
+
TKeypress.F7, ' ', true, false, false);
public static final TKeypress kbAltF8 = new TKeypress(true,
public static final TKeypress kbAltF8 = new TKeypress(true,
- TKeypress.F8, ' ', true, false, false);
+
TKeypress.F8, ' ', true, false, false);
public static final TKeypress kbAltF9 = new TKeypress(true,
public static final TKeypress kbAltF9 = new TKeypress(true,
- TKeypress.F9, ' ', true, false, false);
+
TKeypress.F9, ' ', true, false, false);
public static final TKeypress kbAltF10 = new TKeypress(true,
public static final TKeypress kbAltF10 = new TKeypress(true,
- TKeypress.F10, ' ', true, false, false);
+
TKeypress.F10, ' ', true, false, false);
public static final TKeypress kbAltF11 = new TKeypress(true,
public static final TKeypress kbAltF11 = new TKeypress(true,
- TKeypress.F11, ' ', true, false, false);
+
TKeypress.F11, ' ', true, false, false);
public static final TKeypress kbAltF12 = new TKeypress(true,
public static final TKeypress kbAltF12 = new TKeypress(true,
- TKeypress.F12, ' ', true, false, false);
+
TKeypress.F12, ' ', true, false, false);
public static final TKeypress kbCtrlF1 = new TKeypress(true,
public static final TKeypress kbCtrlF1 = new TKeypress(true,
- TKeypress.F1, ' ', false, true, false);
+
TKeypress.F1, ' ', false, true, false);
public static final TKeypress kbCtrlF2 = new TKeypress(true,
public static final TKeypress kbCtrlF2 = new TKeypress(true,
- TKeypress.F2, ' ', false, true, false);
+
TKeypress.F2, ' ', false, true, false);
public static final TKeypress kbCtrlF3 = new TKeypress(true,
public static final TKeypress kbCtrlF3 = new TKeypress(true,
- TKeypress.F3, ' ', false, true, false);
+
TKeypress.F3, ' ', false, true, false);
public static final TKeypress kbCtrlF4 = new TKeypress(true,
public static final TKeypress kbCtrlF4 = new TKeypress(true,
- TKeypress.F4, ' ', false, true, false);
+
TKeypress.F4, ' ', false, true, false);
public static final TKeypress kbCtrlF5 = new TKeypress(true,
public static final TKeypress kbCtrlF5 = new TKeypress(true,
- TKeypress.F5, ' ', false, true, false);
+
TKeypress.F5, ' ', false, true, false);
public static final TKeypress kbCtrlF6 = new TKeypress(true,
public static final TKeypress kbCtrlF6 = new TKeypress(true,
- TKeypress.F6, ' ', false, true, false);
+
TKeypress.F6, ' ', false, true, false);
public static final TKeypress kbCtrlF7 = new TKeypress(true,
public static final TKeypress kbCtrlF7 = new TKeypress(true,
- TKeypress.F7, ' ', false, true, false);
+
TKeypress.F7, ' ', false, true, false);
public static final TKeypress kbCtrlF8 = new TKeypress(true,
public static final TKeypress kbCtrlF8 = new TKeypress(true,
- TKeypress.F8, ' ', false, true, false);
+
TKeypress.F8, ' ', false, true, false);
public static final TKeypress kbCtrlF9 = new TKeypress(true,
public static final TKeypress kbCtrlF9 = new TKeypress(true,
- TKeypress.F9, ' ', false, true, false);
+
TKeypress.F9, ' ', false, true, false);
public static final TKeypress kbCtrlF10 = new TKeypress(true,
public static final TKeypress kbCtrlF10 = new TKeypress(true,
- TKeypress.F10, ' ', false, true, false);
+
TKeypress.F10, ' ', false, true, false);
public static final TKeypress kbCtrlF11 = new TKeypress(true,
public static final TKeypress kbCtrlF11 = new TKeypress(true,
- TKeypress.F11, ' ', false, true, false);
+
TKeypress.F11, ' ', false, true, false);
public static final TKeypress kbCtrlF12 = new TKeypress(true,
public static final TKeypress kbCtrlF12 = new TKeypress(true,
- TKeypress.F12, ' ', false, true, false);
+
TKeypress.F12, ' ', false, true, false);
public static final TKeypress kbShiftF1 = new TKeypress(true,
public static final TKeypress kbShiftF1 = new TKeypress(true,
- TKeypress.F1, ' ', false, false, true);
+
TKeypress.F1, ' ', false, false, true);
public static final TKeypress kbShiftF2 = new TKeypress(true,
public static final TKeypress kbShiftF2 = new TKeypress(true,
- TKeypress.F2, ' ', false, false, true);
+
TKeypress.F2, ' ', false, false, true);
public static final TKeypress kbShiftF3 = new TKeypress(true,
public static final TKeypress kbShiftF3 = new TKeypress(true,
- TKeypress.F3, ' ', false, false, true);
+
TKeypress.F3, ' ', false, false, true);
public static final TKeypress kbShiftF4 = new TKeypress(true,
public static final TKeypress kbShiftF4 = new TKeypress(true,
- TKeypress.F4, ' ', false, false, true);
+
TKeypress.F4, ' ', false, false, true);
public static final TKeypress kbShiftF5 = new TKeypress(true,
public static final TKeypress kbShiftF5 = new TKeypress(true,
- TKeypress.F5, ' ', false, false, true);
+
TKeypress.F5, ' ', false, false, true);
public static final TKeypress kbShiftF6 = new TKeypress(true,
public static final TKeypress kbShiftF6 = new TKeypress(true,
- TKeypress.F6, ' ', false, false, true);
+
TKeypress.F6, ' ', false, false, true);
public static final TKeypress kbShiftF7 = new TKeypress(true,
public static final TKeypress kbShiftF7 = new TKeypress(true,
- TKeypress.F7, ' ', false, false, true);
+
TKeypress.F7, ' ', false, false, true);
public static final TKeypress kbShiftF8 = new TKeypress(true,
public static final TKeypress kbShiftF8 = new TKeypress(true,
- TKeypress.F8, ' ', false, false, true);
+
TKeypress.F8, ' ', false, false, true);
public static final TKeypress kbShiftF9 = new TKeypress(true,
public static final TKeypress kbShiftF9 = new TKeypress(true,
- TKeypress.F9, ' ', false, false, true);
+
TKeypress.F9, ' ', false, false, true);
public static final TKeypress kbShiftF10 = new TKeypress(true,
public static final TKeypress kbShiftF10 = new TKeypress(true,
- TKeypress.F10, ' ', false, false, true);
+
TKeypress.F10, ' ', false, false, true);
public static final TKeypress kbShiftF11 = new TKeypress(true,
public static final TKeypress kbShiftF11 = new TKeypress(true,
- TKeypress.F11, ' ', false, false, true);
+
TKeypress.F11, ' ', false, false, true);
public static final TKeypress kbShiftF12 = new TKeypress(true,
public static final TKeypress kbShiftF12 = new TKeypress(true,
- TKeypress.F12, ' ', false, false, true);
+
TKeypress.F12, ' ', false, false, true);
public static final TKeypress kbEnter = new TKeypress(true,
public static final TKeypress kbEnter = new TKeypress(true,
- TKeypress.ENTER, ' ', false, false, false);
+
TKeypress.ENTER, ' ', false, false, false);
public static final TKeypress kbTab = new TKeypress(true,
public static final TKeypress kbTab = new TKeypress(true,
- TKeypress.TAB, ' ', false, false, false);
+
TKeypress.TAB, ' ', false, false, false);
public static final TKeypress kbEsc = new TKeypress(true,
public static final TKeypress kbEsc = new TKeypress(true,
- TKeypress.ESC, ' ', false, false, false);
+
TKeypress.ESC, ' ', false, false, false);
public static final TKeypress kbHome = new TKeypress(true,
public static final TKeypress kbHome = new TKeypress(true,
- TKeypress.HOME, ' ', false, false, false);
+
TKeypress.HOME, ' ', false, false, false);
public static final TKeypress kbEnd = new TKeypress(true,
public static final TKeypress kbEnd = new TKeypress(true,
- TKeypress.END, ' ', false, false, false);
+
TKeypress.END, ' ', false, false, false);
public static final TKeypress kbPgUp = new TKeypress(true,
public static final TKeypress kbPgUp = new TKeypress(true,
- TKeypress.PGUP, ' ', false, false, false);
+
TKeypress.PGUP, ' ', false, false, false);
public static final TKeypress kbPgDn = new TKeypress(true,
public static final TKeypress kbPgDn = new TKeypress(true,
- TKeypress.PGDN, ' ', false, false, false);
+
TKeypress.PGDN, ' ', false, false, false);
public static final TKeypress kbIns = new TKeypress(true,
public static final TKeypress kbIns = new TKeypress(true,
- TKeypress.INS, ' ', false, false, false);
+
TKeypress.INS, ' ', false, false, false);
public static final TKeypress kbDel = new TKeypress(true,
public static final TKeypress kbDel = new TKeypress(true,
- TKeypress.DEL, ' ', false, false, false);
+
TKeypress.DEL, ' ', false, false, false);
public static final TKeypress kbUp = new TKeypress(true,
public static final TKeypress kbUp = new TKeypress(true,
- TKeypress.UP, ' ', false, false, false);
+
TKeypress.UP, ' ', false, false, false);
public static final TKeypress kbDown = new TKeypress(true,
public static final TKeypress kbDown = new TKeypress(true,
- TKeypress.DOWN, ' ', false, false, false);
+
TKeypress.DOWN, ' ', false, false, false);
public static final TKeypress kbLeft = new TKeypress(true,
public static final TKeypress kbLeft = new TKeypress(true,
- TKeypress.LEFT, ' ', false, false, false);
+
TKeypress.LEFT, ' ', false, false, false);
public static final TKeypress kbRight = new TKeypress(true,
public static final TKeypress kbRight = new TKeypress(true,
- TKeypress.RIGHT, ' ', false, false, false);
+
TKeypress.RIGHT, ' ', false, false, false);
public static final TKeypress kbAltEnter = new TKeypress(true,
public static final TKeypress kbAltEnter = new TKeypress(true,
- TKeypress.ENTER, ' ', true, false, false);
+
TKeypress.ENTER, ' ', true, false, false);
public static final TKeypress kbAltTab = new TKeypress(true,
public static final TKeypress kbAltTab = new TKeypress(true,
- TKeypress.TAB, ' ', true, false, false);
+
TKeypress.TAB, ' ', true, false, false);
public static final TKeypress kbAltEsc = new TKeypress(true,
public static final TKeypress kbAltEsc = new TKeypress(true,
- TKeypress.ESC, ' ', true, false, false);
+
TKeypress.ESC, ' ', true, false, false);
public static final TKeypress kbAltHome = new TKeypress(true,
public static final TKeypress kbAltHome = new TKeypress(true,
- TKeypress.HOME, ' ', true, false, false);
+
TKeypress.HOME, ' ', true, false, false);
public static final TKeypress kbAltEnd = new TKeypress(true,
public static final TKeypress kbAltEnd = new TKeypress(true,
- TKeypress.END, ' ', true, false, false);
+
TKeypress.END, ' ', true, false, false);
public static final TKeypress kbAltPgUp = new TKeypress(true,
public static final TKeypress kbAltPgUp = new TKeypress(true,
- TKeypress.PGUP, ' ', true, false, false);
+
TKeypress.PGUP, ' ', true, false, false);
public static final TKeypress kbAltPgDn = new TKeypress(true,
public static final TKeypress kbAltPgDn = new TKeypress(true,
- TKeypress.PGDN, ' ', true, false, false);
+
TKeypress.PGDN, ' ', true, false, false);
public static final TKeypress kbAltIns = new TKeypress(true,
public static final TKeypress kbAltIns = new TKeypress(true,
- TKeypress.INS, ' ', true, false, false);
+
TKeypress.INS, ' ', true, false, false);
public static final TKeypress kbAltDel = new TKeypress(true,
public static final TKeypress kbAltDel = new TKeypress(true,
- TKeypress.DEL, ' ', true, false, false);
+
TKeypress.DEL, ' ', true, false, false);
public static final TKeypress kbAltUp = new TKeypress(true,
public static final TKeypress kbAltUp = new TKeypress(true,
- TKeypress.UP, ' ', true, false, false);
+
TKeypress.UP, ' ', true, false, false);
public static final TKeypress kbAltDown = new TKeypress(true,
public static final TKeypress kbAltDown = new TKeypress(true,
- TKeypress.DOWN, ' ', true, false, false);
+
TKeypress.DOWN, ' ', true, false, false);
public static final TKeypress kbAltLeft = new TKeypress(true,
public static final TKeypress kbAltLeft = new TKeypress(true,
- TKeypress.LEFT, ' ', true, false, false);
+
TKeypress.LEFT, ' ', true, false, false);
public static final TKeypress kbAltRight = new TKeypress(true,
public static final TKeypress kbAltRight = new TKeypress(true,
- TKeypress.RIGHT, ' ', true, false, false);
+
TKeypress.RIGHT, ' ', true, false, false);
public static final TKeypress kbCtrlEnter = new TKeypress(true,
public static final TKeypress kbCtrlEnter = new TKeypress(true,
- TKeypress.ENTER, ' ', false, true, false);
+
TKeypress.ENTER, ' ', false, true, false);
public static final TKeypress kbCtrlTab = new TKeypress(true,
public static final TKeypress kbCtrlTab = new TKeypress(true,
- TKeypress.TAB, ' ', false, true, false);
+
TKeypress.TAB, ' ', false, true, false);
public static final TKeypress kbCtrlEsc = new TKeypress(true,
public static final TKeypress kbCtrlEsc = new TKeypress(true,
- TKeypress.ESC, ' ', false, true, false);
+
TKeypress.ESC, ' ', false, true, false);
public static final TKeypress kbCtrlHome = new TKeypress(true,
public static final TKeypress kbCtrlHome = new TKeypress(true,
- TKeypress.HOME, ' ', false, true, false);
+
TKeypress.HOME, ' ', false, true, false);
public static final TKeypress kbCtrlEnd = new TKeypress(true,
public static final TKeypress kbCtrlEnd = new TKeypress(true,
- TKeypress.END, ' ', false, true, false);
+
TKeypress.END, ' ', false, true, false);
public static final TKeypress kbCtrlPgUp = new TKeypress(true,
public static final TKeypress kbCtrlPgUp = new TKeypress(true,
- TKeypress.PGUP, ' ', false, true, false);
+
TKeypress.PGUP, ' ', false, true, false);
public static final TKeypress kbCtrlPgDn = new TKeypress(true,
public static final TKeypress kbCtrlPgDn = new TKeypress(true,
- TKeypress.PGDN, ' ', false, true, false);
+
TKeypress.PGDN, ' ', false, true, false);
public static final TKeypress kbCtrlIns = new TKeypress(true,
public static final TKeypress kbCtrlIns = new TKeypress(true,
- TKeypress.INS, ' ', false, true, false);
+
TKeypress.INS, ' ', false, true, false);
public static final TKeypress kbCtrlDel = new TKeypress(true,
public static final TKeypress kbCtrlDel = new TKeypress(true,
- TKeypress.DEL, ' ', false, true, false);
+
TKeypress.DEL, ' ', false, true, false);
public static final TKeypress kbCtrlUp = new TKeypress(true,
public static final TKeypress kbCtrlUp = new TKeypress(true,
- TKeypress.UP, ' ', false, true, false);
+
TKeypress.UP, ' ', false, true, false);
public static final TKeypress kbCtrlDown = new TKeypress(true,
public static final TKeypress kbCtrlDown = new TKeypress(true,
- TKeypress.DOWN, ' ', false, true, false);
+
TKeypress.DOWN, ' ', false, true, false);
public static final TKeypress kbCtrlLeft = new TKeypress(true,
public static final TKeypress kbCtrlLeft = new TKeypress(true,
- TKeypress.LEFT, ' ', false, true, false);
+
TKeypress.LEFT, ' ', false, true, false);
public static final TKeypress kbCtrlRight = new TKeypress(true,
public static final TKeypress kbCtrlRight = new TKeypress(true,
- TKeypress.RIGHT, ' ', false, true, false);
+
TKeypress.RIGHT, ' ', false, true, false);
public static final TKeypress kbShiftEnter = new TKeypress(true,
public static final TKeypress kbShiftEnter = new TKeypress(true,
- TKeypress.ENTER, ' ', false, false, true);
+
TKeypress.ENTER, ' ', false, false, true);
public static final TKeypress kbShiftTab = new TKeypress(true,
public static final TKeypress kbShiftTab = new TKeypress(true,
- TKeypress.TAB, ' ', false, false, true);
+
TKeypress.TAB, ' ', false, false, true);
public static final TKeypress kbBackTab = new TKeypress(true,
public static final TKeypress kbBackTab = new TKeypress(true,
- TKeypress.BTAB, ' ', false, false, false);
+
TKeypress.BTAB, ' ', false, false, false);
public static final TKeypress kbShiftEsc = new TKeypress(true,
public static final TKeypress kbShiftEsc = new TKeypress(true,
- TKeypress.ESC, ' ', false, false, true);
+
TKeypress.ESC, ' ', false, false, true);
public static final TKeypress kbShiftHome = new TKeypress(true,
public static final TKeypress kbShiftHome = new TKeypress(true,
- TKeypress.HOME, ' ', false, false, true);
+
TKeypress.HOME, ' ', false, false, true);
public static final TKeypress kbShiftEnd = new TKeypress(true,
public static final TKeypress kbShiftEnd = new TKeypress(true,
- TKeypress.END, ' ', false, false, true);
+
TKeypress.END, ' ', false, false, true);
public static final TKeypress kbShiftPgUp = new TKeypress(true,
public static final TKeypress kbShiftPgUp = new TKeypress(true,
- TKeypress.PGUP, ' ', false, false, true);
+
TKeypress.PGUP, ' ', false, false, true);
public static final TKeypress kbShiftPgDn = new TKeypress(true,
public static final TKeypress kbShiftPgDn = new TKeypress(true,
- TKeypress.PGDN, ' ', false, false, true);
+
TKeypress.PGDN, ' ', false, false, true);
public static final TKeypress kbShiftIns = new TKeypress(true,
public static final TKeypress kbShiftIns = new TKeypress(true,
- TKeypress.INS, ' ', false, false, true);
+
TKeypress.INS, ' ', false, false, true);
public static final TKeypress kbShiftDel = new TKeypress(true,
public static final TKeypress kbShiftDel = new TKeypress(true,
- TKeypress.DEL, ' ', false, false, true);
+
TKeypress.DEL, ' ', false, false, true);
public static final TKeypress kbShiftUp = new TKeypress(true,
public static final TKeypress kbShiftUp = new TKeypress(true,
- TKeypress.UP, ' ', false, false, true);
+
TKeypress.UP, ' ', false, false, true);
public static final TKeypress kbShiftDown = new TKeypress(true,
public static final TKeypress kbShiftDown = new TKeypress(true,
- TKeypress.DOWN, ' ', false, false, true);
+
TKeypress.DOWN, ' ', false, false, true);
public static final TKeypress kbShiftLeft = new TKeypress(true,
public static final TKeypress kbShiftLeft = new TKeypress(true,
- TKeypress.LEFT, ' ', false, false, true);
+
TKeypress.LEFT, ' ', false, false, true);
public static final TKeypress kbShiftRight = new TKeypress(true,
public static final TKeypress kbShiftRight = new TKeypress(true,
- TKeypress.RIGHT, ' ', false, false, true);
+
TKeypress.RIGHT, ' ', false, false, true);
public static final TKeypress kbA = new TKeypress(false,
public static final TKeypress kbA = new TKeypress(false,
- 0, 'a', false, false, false);
+
0, 'a', false, false, false);
public static final TKeypress kbB = new TKeypress(false,
public static final TKeypress kbB = new TKeypress(false,
- 0, 'b', false, false, false);
+
0, 'b', false, false, false);
public static final TKeypress kbC = new TKeypress(false,
public static final TKeypress kbC = new TKeypress(false,
- 0, 'c', false, false, false);
+
0, 'c', false, false, false);
public static final TKeypress kbD = new TKeypress(false,
public static final TKeypress kbD = new TKeypress(false,
- 0, 'd', false, false, false);
+
0, 'd', false, false, false);
public static final TKeypress kbE = new TKeypress(false,
public static final TKeypress kbE = new TKeypress(false,
- 0, 'e', false, false, false);
+
0, 'e', false, false, false);
public static final TKeypress kbF = new TKeypress(false,
public static final TKeypress kbF = new TKeypress(false,
- 0, 'f', false, false, false);
+
0, 'f', false, false, false);
public static final TKeypress kbG = new TKeypress(false,
public static final TKeypress kbG = new TKeypress(false,
- 0, 'g', false, false, false);
+
0, 'g', false, false, false);
public static final TKeypress kbH = new TKeypress(false,
public static final TKeypress kbH = new TKeypress(false,
- 0, 'h', false, false, false);
+
0, 'h', false, false, false);
public static final TKeypress kbI = new TKeypress(false,
public static final TKeypress kbI = new TKeypress(false,
- 0, 'i', false, false, false);
+
0, 'i', false, false, false);
public static final TKeypress kbJ = new TKeypress(false,
public static final TKeypress kbJ = new TKeypress(false,
- 0, 'j', false, false, false);
+
0, 'j', false, false, false);
public static final TKeypress kbK = new TKeypress(false,
public static final TKeypress kbK = new TKeypress(false,
- 0, 'k', false, false, false);
+
0, 'k', false, false, false);
public static final TKeypress kbL = new TKeypress(false,
public static final TKeypress kbL = new TKeypress(false,
- 0, 'l', false, false, false);
+
0, 'l', false, false, false);
public static final TKeypress kbM = new TKeypress(false,
public static final TKeypress kbM = new TKeypress(false,
- 0, 'm', false, false, false);
+
0, 'm', false, false, false);
public static final TKeypress kbN = new TKeypress(false,
public static final TKeypress kbN = new TKeypress(false,
- 0, 'n', false, false, false);
+
0, 'n', false, false, false);
public static final TKeypress kbO = new TKeypress(false,
public static final TKeypress kbO = new TKeypress(false,
- 0, 'o', false, false, false);
+
0, 'o', false, false, false);
public static final TKeypress kbP = new TKeypress(false,
public static final TKeypress kbP = new TKeypress(false,
- 0, 'p', false, false, false);
+
0, 'p', false, false, false);
public static final TKeypress kbQ = new TKeypress(false,
public static final TKeypress kbQ = new TKeypress(false,
- 0, 'q', false, false, false);
+
0, 'q', false, false, false);
public static final TKeypress kbR = new TKeypress(false,
public static final TKeypress kbR = new TKeypress(false,
- 0, 'r', false, false, false);
+
0, 'r', false, false, false);
public static final TKeypress kbS = new TKeypress(false,
public static final TKeypress kbS = new TKeypress(false,
- 0, 's', false, false, false);
+
0, 's', false, false, false);
public static final TKeypress kbT = new TKeypress(false,
public static final TKeypress kbT = new TKeypress(false,
- 0, 't', false, false, false);
+
0, 't', false, false, false);
public static final TKeypress kbU = new TKeypress(false,
public static final TKeypress kbU = new TKeypress(false,
- 0, 'u', false, false, false);
+
0, 'u', false, false, false);
public static final TKeypress kbV = new TKeypress(false,
public static final TKeypress kbV = new TKeypress(false,
- 0, 'v', false, false, false);
+
0, 'v', false, false, false);
public static final TKeypress kbW = new TKeypress(false,
public static final TKeypress kbW = new TKeypress(false,
- 0, 'w', false, false, false);
+
0, 'w', false, false, false);
public static final TKeypress kbX = new TKeypress(false,
public static final TKeypress kbX = new TKeypress(false,
- 0, 'x', false, false, false);
+
0, 'x', false, false, false);
public static final TKeypress kbY = new TKeypress(false,
public static final TKeypress kbY = new TKeypress(false,
- 0, 'y', false, false, false);
+
0, 'y', false, false, false);
public static final TKeypress kbZ = new TKeypress(false,
public static final TKeypress kbZ = new TKeypress(false,
- 0, 'z', false, false, false);
+
0, 'z', false, false, false);
public static final TKeypress kbSpace = new TKeypress(false,
public static final TKeypress kbSpace = new TKeypress(false,
- 0, ' ', false, false, false);
+
0, ' ', false, false, false);
public static final TKeypress kbAltA = new TKeypress(false,
public static final TKeypress kbAltA = new TKeypress(false,
- 0, 'a', true, false, false);
+
0, 'a', true, false, false);
public static final TKeypress kbAltB = new TKeypress(false,
public static final TKeypress kbAltB = new TKeypress(false,
- 0, 'b', true, false, false);
+
0, 'b', true, false, false);
public static final TKeypress kbAltC = new TKeypress(false,
public static final TKeypress kbAltC = new TKeypress(false,
- 0, 'c', true, false, false);
+
0, 'c', true, false, false);
public static final TKeypress kbAltD = new TKeypress(false,
public static final TKeypress kbAltD = new TKeypress(false,
- 0, 'd', true, false, false);
+
0, 'd', true, false, false);
public static final TKeypress kbAltE = new TKeypress(false,
public static final TKeypress kbAltE = new TKeypress(false,
- 0, 'e', true, false, false);
+
0, 'e', true, false, false);
public static final TKeypress kbAltF = new TKeypress(false,
public static final TKeypress kbAltF = new TKeypress(false,
- 0, 'f', true, false, false);
+
0, 'f', true, false, false);
public static final TKeypress kbAltG = new TKeypress(false,
public static final TKeypress kbAltG = new TKeypress(false,
- 0, 'g', true, false, false);
+
0, 'g', true, false, false);
public static final TKeypress kbAltH = new TKeypress(false,
public static final TKeypress kbAltH = new TKeypress(false,
- 0, 'h', true, false, false);
+
0, 'h', true, false, false);
public static final TKeypress kbAltI = new TKeypress(false,
public static final TKeypress kbAltI = new TKeypress(false,
- 0, 'i', true, false, false);
+
0, 'i', true, false, false);
public static final TKeypress kbAltJ = new TKeypress(false,
public static final TKeypress kbAltJ = new TKeypress(false,
- 0, 'j', true, false, false);
+
0, 'j', true, false, false);
public static final TKeypress kbAltK = new TKeypress(false,
public static final TKeypress kbAltK = new TKeypress(false,
- 0, 'k', true, false, false);
+
0, 'k', true, false, false);
public static final TKeypress kbAltL = new TKeypress(false,
public static final TKeypress kbAltL = new TKeypress(false,
- 0, 'l', true, false, false);
+
0, 'l', true, false, false);
public static final TKeypress kbAltM = new TKeypress(false,
public static final TKeypress kbAltM = new TKeypress(false,
- 0, 'm', true, false, false);
+
0, 'm', true, false, false);
public static final TKeypress kbAltN = new TKeypress(false,
public static final TKeypress kbAltN = new TKeypress(false,
- 0, 'n', true, false, false);
+
0, 'n', true, false, false);
public static final TKeypress kbAltO = new TKeypress(false,
public static final TKeypress kbAltO = new TKeypress(false,
- 0, 'o', true, false, false);
+
0, 'o', true, false, false);
public static final TKeypress kbAltP = new TKeypress(false,
public static final TKeypress kbAltP = new TKeypress(false,
- 0, 'p', true, false, false);
+
0, 'p', true, false, false);
public static final TKeypress kbAltQ = new TKeypress(false,
public static final TKeypress kbAltQ = new TKeypress(false,
- 0, 'q', true, false, false);
+
0, 'q', true, false, false);
public static final TKeypress kbAltR = new TKeypress(false,
public static final TKeypress kbAltR = new TKeypress(false,
- 0, 'r', true, false, false);
+
0, 'r', true, false, false);
public static final TKeypress kbAltS = new TKeypress(false,
public static final TKeypress kbAltS = new TKeypress(false,
- 0, 's', true, false, false);
+
0, 's', true, false, false);
public static final TKeypress kbAltT = new TKeypress(false,
public static final TKeypress kbAltT = new TKeypress(false,
- 0, 't', true, false, false);
+
0, 't', true, false, false);
public static final TKeypress kbAltU = new TKeypress(false,
public static final TKeypress kbAltU = new TKeypress(false,
- 0, 'u', true, false, false);
+
0, 'u', true, false, false);
public static final TKeypress kbAltV = new TKeypress(false,
public static final TKeypress kbAltV = new TKeypress(false,
- 0, 'v', true, false, false);
+
0, 'v', true, false, false);
public static final TKeypress kbAltW = new TKeypress(false,
public static final TKeypress kbAltW = new TKeypress(false,
- 0, 'w', true, false, false);
+
0, 'w', true, false, false);
public static final TKeypress kbAltX = new TKeypress(false,
public static final TKeypress kbAltX = new TKeypress(false,
- 0, 'x', true, false, false);
+
0, 'x', true, false, false);
public static final TKeypress kbAltY = new TKeypress(false,
public static final TKeypress kbAltY = new TKeypress(false,
- 0, 'y', true, false, false);
+
0, 'y', true, false, false);
public static final TKeypress kbAltZ = new TKeypress(false,
public static final TKeypress kbAltZ = new TKeypress(false,
- 0, 'z', true, false, false);
+
0, 'z', true, false, false);
public static final TKeypress kbCtrlA = new TKeypress(false,
public static final TKeypress kbCtrlA = new TKeypress(false,
- 0, 'A', false, true, false);
+
0, 'A', false, true, false);
public static final TKeypress kbCtrlB = new TKeypress(false,
public static final TKeypress kbCtrlB = new TKeypress(false,
- 0, 'B', false, true, false);
+
0, 'B', false, true, false);
public static final TKeypress kbCtrlC = new TKeypress(false,
public static final TKeypress kbCtrlC = new TKeypress(false,
- 0, 'C', false, true, false);
+
0, 'C', false, true, false);
public static final TKeypress kbCtrlD = new TKeypress(false,
public static final TKeypress kbCtrlD = new TKeypress(false,
- 0, 'D', false, true, false);
+
0, 'D', false, true, false);
public static final TKeypress kbCtrlE = new TKeypress(false,
public static final TKeypress kbCtrlE = new TKeypress(false,
- 0, 'E', false, true, false);
+
0, 'E', false, true, false);
public static final TKeypress kbCtrlF = new TKeypress(false,
public static final TKeypress kbCtrlF = new TKeypress(false,
- 0, 'F', false, true, false);
+
0, 'F', false, true, false);
public static final TKeypress kbCtrlG = new TKeypress(false,
public static final TKeypress kbCtrlG = new TKeypress(false,
- 0, 'G', false, true, false);
+
0, 'G', false, true, false);
public static final TKeypress kbCtrlH = new TKeypress(false,
public static final TKeypress kbCtrlH = new TKeypress(false,
- 0, 'H', false, true, false);
+
0, 'H', false, true, false);
public static final TKeypress kbCtrlI = new TKeypress(false,
public static final TKeypress kbCtrlI = new TKeypress(false,
- 0, 'I', false, true, false);
+
0, 'I', false, true, false);
public static final TKeypress kbCtrlJ = new TKeypress(false,
public static final TKeypress kbCtrlJ = new TKeypress(false,
- 0, 'J', false, true, false);
+
0, 'J', false, true, false);
public static final TKeypress kbCtrlK = new TKeypress(false,
public static final TKeypress kbCtrlK = new TKeypress(false,
- 0, 'K', false, true, false);
+
0, 'K', false, true, false);
public static final TKeypress kbCtrlL = new TKeypress(false,
public static final TKeypress kbCtrlL = new TKeypress(false,
- 0, 'L', false, true, false);
+
0, 'L', false, true, false);
public static final TKeypress kbCtrlM = new TKeypress(false,
public static final TKeypress kbCtrlM = new TKeypress(false,
- 0, 'M', false, true, false);
+
0, 'M', false, true, false);
public static final TKeypress kbCtrlN = new TKeypress(false,
public static final TKeypress kbCtrlN = new TKeypress(false,
- 0, 'N', false, true, false);
+
0, 'N', false, true, false);
public static final TKeypress kbCtrlO = new TKeypress(false,
public static final TKeypress kbCtrlO = new TKeypress(false,
- 0, 'O', false, true, false);
+
0, 'O', false, true, false);
public static final TKeypress kbCtrlP = new TKeypress(false,
public static final TKeypress kbCtrlP = new TKeypress(false,
- 0, 'P', false, true, false);
+
0, 'P', false, true, false);
public static final TKeypress kbCtrlQ = new TKeypress(false,
public static final TKeypress kbCtrlQ = new TKeypress(false,
- 0, 'Q', false, true, false);
+
0, 'Q', false, true, false);
public static final TKeypress kbCtrlR = new TKeypress(false,
public static final TKeypress kbCtrlR = new TKeypress(false,
- 0, 'R', false, true, false);
+
0, 'R', false, true, false);
public static final TKeypress kbCtrlS = new TKeypress(false,
public static final TKeypress kbCtrlS = new TKeypress(false,
- 0, 'S', false, true, false);
+
0, 'S', false, true, false);
public static final TKeypress kbCtrlT = new TKeypress(false,
public static final TKeypress kbCtrlT = new TKeypress(false,
- 0, 'T', false, true, false);
+
0, 'T', false, true, false);
public static final TKeypress kbCtrlU = new TKeypress(false,
public static final TKeypress kbCtrlU = new TKeypress(false,
- 0, 'U', false, true, false);
+
0, 'U', false, true, false);
public static final TKeypress kbCtrlV = new TKeypress(false,
public static final TKeypress kbCtrlV = new TKeypress(false,
- 0, 'V', false, true, false);
+
0, 'V', false, true, false);
public static final TKeypress kbCtrlW = new TKeypress(false,
public static final TKeypress kbCtrlW = new TKeypress(false,
- 0, 'W', false, true, false);
+
0, 'W', false, true, false);
public static final TKeypress kbCtrlX = new TKeypress(false,
public static final TKeypress kbCtrlX = new TKeypress(false,
- 0, 'X', false, true, false);
+
0, 'X', false, true, false);
public static final TKeypress kbCtrlY = new TKeypress(false,
public static final TKeypress kbCtrlY = new TKeypress(false,
- 0, 'Y', false, true, false);
+
0, 'Y', false, true, false);
public static final TKeypress kbCtrlZ = new TKeypress(false,
public static final TKeypress kbCtrlZ = new TKeypress(false,
- 0, 'Z', false, true, false);
+
0, 'Z', false, true, false);
public static final TKeypress kbAltShiftA = new TKeypress(false,
public static final TKeypress kbAltShiftA = new TKeypress(false,
- 0, 'A', true, false, true);
+
0, 'A', true, false, true);
public static final TKeypress kbAltShiftB = new TKeypress(false,
public static final TKeypress kbAltShiftB = new TKeypress(false,
- 0, 'B', true, false, true);
+
0, 'B', true, false, true);
public static final TKeypress kbAltShiftC = new TKeypress(false,
public static final TKeypress kbAltShiftC = new TKeypress(false,
- 0, 'C', true, false, true);
+
0, 'C', true, false, true);
public static final TKeypress kbAltShiftD = new TKeypress(false,
public static final TKeypress kbAltShiftD = new TKeypress(false,
- 0, 'D', true, false, true);
+
0, 'D', true, false, true);
public static final TKeypress kbAltShiftE = new TKeypress(false,
public static final TKeypress kbAltShiftE = new TKeypress(false,
- 0, 'E', true, false, true);
+
0, 'E', true, false, true);
public static final TKeypress kbAltShiftF = new TKeypress(false,
public static final TKeypress kbAltShiftF = new TKeypress(false,
- 0, 'F', true, false, true);
+
0, 'F', true, false, true);
public static final TKeypress kbAltShiftG = new TKeypress(false,
public static final TKeypress kbAltShiftG = new TKeypress(false,
- 0, 'G', true, false, true);
+
0, 'G', true, false, true);
public static final TKeypress kbAltShiftH = new TKeypress(false,
public static final TKeypress kbAltShiftH = new TKeypress(false,
- 0, 'H', true, false, true);
+
0, 'H', true, false, true);
public static final TKeypress kbAltShiftI = new TKeypress(false,
public static final TKeypress kbAltShiftI = new TKeypress(false,
- 0, 'I', true, false, true);
+
0, 'I', true, false, true);
public static final TKeypress kbAltShiftJ = new TKeypress(false,
public static final TKeypress kbAltShiftJ = new TKeypress(false,
- 0, 'J', true, false, true);
+
0, 'J', true, false, true);
public static final TKeypress kbAltShiftK = new TKeypress(false,
public static final TKeypress kbAltShiftK = new TKeypress(false,
- 0, 'K', true, false, true);
+
0, 'K', true, false, true);
public static final TKeypress kbAltShiftL = new TKeypress(false,
public static final TKeypress kbAltShiftL = new TKeypress(false,
- 0, 'L', true, false, true);
+
0, 'L', true, false, true);
public static final TKeypress kbAltShiftM = new TKeypress(false,
public static final TKeypress kbAltShiftM = new TKeypress(false,
- 0, 'M', true, false, true);
+
0, 'M', true, false, true);
public static final TKeypress kbAltShiftN = new TKeypress(false,
public static final TKeypress kbAltShiftN = new TKeypress(false,
- 0, 'N', true, false, true);
+
0, 'N', true, false, true);
public static final TKeypress kbAltShiftO = new TKeypress(false,
public static final TKeypress kbAltShiftO = new TKeypress(false,
- 0, 'O', true, false, true);
+
0, 'O', true, false, true);
public static final TKeypress kbAltShiftP = new TKeypress(false,
public static final TKeypress kbAltShiftP = new TKeypress(false,
- 0, 'P', true, false, true);
+
0, 'P', true, false, true);
public static final TKeypress kbAltShiftQ = new TKeypress(false,
public static final TKeypress kbAltShiftQ = new TKeypress(false,
- 0, 'Q', true, false, true);
+
0, 'Q', true, false, true);
public static final TKeypress kbAltShiftR = new TKeypress(false,
public static final TKeypress kbAltShiftR = new TKeypress(false,
- 0, 'R', true, false, true);
+
0, 'R', true, false, true);
public static final TKeypress kbAltShiftS = new TKeypress(false,
public static final TKeypress kbAltShiftS = new TKeypress(false,
- 0, 'S', true, false, true);
+
0, 'S', true, false, true);
public static final TKeypress kbAltShiftT = new TKeypress(false,
public static final TKeypress kbAltShiftT = new TKeypress(false,
- 0, 'T', true, false, true);
+
0, 'T', true, false, true);
public static final TKeypress kbAltShiftU = new TKeypress(false,
public static final TKeypress kbAltShiftU = new TKeypress(false,
- 0, 'U', true, false, true);
+
0, 'U', true, false, true);
public static final TKeypress kbAltShiftV = new TKeypress(false,
public static final TKeypress kbAltShiftV = new TKeypress(false,
- 0, 'V', true, false, true);
+
0, 'V', true, false, true);
public static final TKeypress kbAltShiftW = new TKeypress(false,
public static final TKeypress kbAltShiftW = new TKeypress(false,
- 0, 'W', true, false, true);
+
0, 'W', true, false, true);
public static final TKeypress kbAltShiftX = new TKeypress(false,
public static final TKeypress kbAltShiftX = new TKeypress(false,
- 0, 'X', true, false, true);
+
0, 'X', true, false, true);
public static final TKeypress kbAltShiftY = new TKeypress(false,
public static final TKeypress kbAltShiftY = new TKeypress(false,
- 0, 'Y', true, false, true);
+
0, 'Y', true, false, true);
public static final TKeypress kbAltShiftZ = new TKeypress(false,
public static final TKeypress kbAltShiftZ = new TKeypress(false,
- 0, 'Z', true, false, true);
+
0, 'Z', true, false, true);
/**
* Backspace as ^H.
*/
public static final TKeypress kbBackspace = new TKeypress(false,
/**
* Backspace as ^H.
*/
public static final TKeypress kbBackspace = new TKeypress(false,
- 0, 'H', false, true, false);
+
0, 'H', false, true, false);
/**
* Backspace as ^?.
*/
public static final TKeypress kbBackspaceDel = new TKeypress(false,
/**
* Backspace as ^?.
*/
public static final TKeypress kbBackspaceDel = new TKeypress(false,
- 0, (char)0x7F, false, false, false);
+
0, (char)0x7F, false, false, false);
}
}
diff --git
a/src/jexer/TLabel.java
b/src/jexer/TLabel.java
index e57ad9b1de1dbe9e94844ca3e2a6ff85dd5de618..ad30035980ef1c4ae13fdd3cac0ac89a39eb43b8 100644
(file)
--- a/
src/jexer/TLabel.java
+++ b/
src/jexer/TLabel.java
@@
-40,24
+40,24
@@
public final class TLabel extends TWidget {
/**
* Label text.
*/
/**
* Label text.
*/
- private String
text
= "";
+ private String
label
= "";
/**
* Get label text.
*
* @return label text
*/
/**
* Get label text.
*
* @return label text
*/
- public String get
Text
() {
- return
text
;
+ public String get
Label
() {
+ return
label
;
}
/**
* Set label text.
*
}
/**
* Set label text.
*
- * @param
text
new label text
+ * @param
label
new label text
*/
*/
- public void set
Text(final String text
) {
- this.
text = text
;
+ public void set
Label(final String label
) {
+ this.
label = label
;
}
/**
}
/**
@@
-94,7
+94,7
@@
public final class TLabel extends TWidget {
// Set parent and window
super(parent, false, x, y, text.length(), 1);
// Set parent and window
super(parent, false, x, y, text.length(), 1);
- this.
text
= text;
+ this.
label
= text;
this.colorKey = colorKey;
}
this.colorKey = colorKey;
}
@@
-108,7
+108,7
@@
public final class TLabel extends TWidget {
CellAttributes background = getWindow().getBackground();
color.setBackColor(background.getBackColor());
CellAttributes background = getWindow().getBackground();
color.setBackColor(background.getBackColor());
- getScreen().putStrXY(0, 0,
text
, color);
+ getScreen().putStrXY(0, 0,
label
, color);
}
}
}
}
diff --git
a/src/jexer/TPasswordField.java
b/src/jexer/TPasswordField.java
index 8fd29d0d8fde69e15cb35cd1361f0fcb1d7c0b01..5cb9732e6f1e4945257a3b0837d92c90d70e8c63 100644
(file)
--- a/
src/jexer/TPasswordField.java
+++ b/
src/jexer/TPasswordField.java
@@
-97,7
+97,7
@@
public final class TPasswordField extends TField {
CellAttributes fieldColor;
boolean showStars = false;
CellAttributes fieldColor;
boolean showStars = false;
- if (
get
AbsoluteActive()) {
+ if (
is
AbsoluteActive()) {
fieldColor = getTheme().getColor("tfield.active");
} else {
fieldColor = getTheme().getColor("tfield.inactive");
fieldColor = getTheme().getColor("tfield.active");
} else {
fieldColor = getTheme().getColor("tfield.inactive");
diff --git
a/src/jexer/TRadioButton.java
b/src/jexer/TRadioButton.java
index 685f1f484d752072d11eca248f997426a0070ce1..ddeec0911711b6621be41e4854b459826f93537f 100644
(file)
--- a/
src/jexer/TRadioButton.java
+++ b/
src/jexer/TRadioButton.java
@@
-52,7
+52,7
@@
public final class TRadioButton extends TWidget {
* @return if true then this is the one button in the group that is
* selected
*/
* @return if true then this is the one button in the group that is
* selected
*/
- public boolean
get
Selected() {
+ public boolean
is
Selected() {
return selected;
}
return selected;
}
@@
-106,7
+106,7
@@
public final class TRadioButton extends TWidget {
this.label = label;
this.id = id;
this.label = label;
this.id = id;
- set
HasCursor
(true);
+ set
CursorVisible
(true);
setCursorX(1);
}
setCursorX(1);
}
@@
-133,7
+133,7
@@
public final class TRadioButton extends TWidget {
public void draw() {
CellAttributes radioButtonColor;
public void draw() {
CellAttributes radioButtonColor;
- if (
get
AbsoluteActive()) {
+ if (
is
AbsoluteActive()) {
radioButtonColor = getTheme().getColor("tradiobutton.active");
} else {
radioButtonColor = getTheme().getColor("tradiobutton.inactive");
radioButtonColor = getTheme().getColor("tradiobutton.active");
} else {
radioButtonColor = getTheme().getColor("tradiobutton.inactive");
@@
-157,7
+157,7
@@
public final class TRadioButton extends TWidget {
*/
@Override
public void onMouseDown(final TMouseEvent mouse) {
*/
@Override
public void onMouseDown(final TMouseEvent mouse) {
- if ((mouseOnRadioButton(mouse)) && (mouse.
get
Mouse1())) {
+ if ((mouseOnRadioButton(mouse)) && (mouse.
is
Mouse1())) {
// Switch state
selected = !selected;
if (selected) {
// Switch state
selected = !selected;
if (selected) {
diff --git
a/src/jexer/TRadioGroup.java
b/src/jexer/TRadioGroup.java
index e2e24a33ddf232a226636214891bbf35e0b0329d..723148fd1f781e080901cf013fc41e510a2b5283 100644
(file)
--- a/
src/jexer/TRadioGroup.java
+++ b/
src/jexer/TRadioGroup.java
@@
-65,7
+65,7
@@
public final class TRadioGroup extends TWidget {
* @param button new button that became selected
*/
void setSelected(final TRadioButton button) {
* @param button new button that became selected
*/
void setSelected(final TRadioButton button) {
- assert (button.
get
Selected());
+ assert (button.
is
Selected());
if (selectedButton != null) {
selectedButton.setSelected(false);
}
if (selectedButton != null) {
selectedButton.setSelected(false);
}
@@
-96,7
+96,7
@@
public final class TRadioGroup extends TWidget {
public void draw() {
CellAttributes radioGroupColor;
public void draw() {
CellAttributes radioGroupColor;
- if (
get
AbsoluteActive()) {
+ if (
is
AbsoluteActive()) {
radioGroupColor = getTheme().getColor("tradiogroup.active");
} else {
radioGroupColor = getTheme().getColor("tradiogroup.inactive");
radioGroupColor = getTheme().getColor("tradiogroup.active");
} else {
radioGroupColor = getTheme().getColor("tradiogroup.inactive");
diff --git
a/src/jexer/TTerminalWindow.java
b/src/jexer/TTerminalWindow.java
index 010cc4993eaa139f5b67ad2a5dedac36f00b3e44..f85e346e4a230f646e6e41635941a516e6281f72 100644
(file)
--- a/
src/jexer/TTerminalWindow.java
+++ b/
src/jexer/TTerminalWindow.java
@@
-208,7
+208,7
@@
public class TTerminalWindow extends TWindow {
Cell ch = line.charAt(i);
Cell newCell = new Cell();
newCell.setTo(ch);
Cell ch = line.charAt(i);
Cell newCell = new Cell();
newCell.setTo(ch);
- boolean reverse = line.isReverseColor() ^ ch.
get
Reverse();
+ boolean reverse = line.isReverseColor() ^ ch.
is
Reverse();
newCell.setReverse(false);
if (reverse) {
newCell.setBackColor(ch.getForeColor());
newCell.setReverse(false);
if (reverse) {
newCell.setBackColor(ch.getForeColor());
@@
-265,12
+265,12
@@
public class TTerminalWindow extends TWindow {
if (vScroller != null) {
setCursorY(getCursorY() - vScroller.getValue());
}
if (vScroller != null) {
setCursorY(getCursorY() - vScroller.getValue());
}
- set
HasCursor(emulator.visibleCursor
());
+ set
CursorVisible(emulator.isCursorVisible
());
if (getCursorX() > getWidth() - 2) {
if (getCursorX() > getWidth() - 2) {
- set
HasCursor
(false);
+ set
CursorVisible
(false);
}
if ((getCursorY() > getHeight() - 2) || (getCursorY() < 0)) {
}
if ((getCursorY() > getHeight() - 2) || (getCursorY() < 0)) {
- set
HasCursor
(false);
+ set
CursorVisible
(false);
}
if (emulator.getScreenTitle().length() > 0) {
// Only update the title if the shell is still alive
}
if (emulator.getScreenTitle().length() > 0) {
// Only update the title if the shell is still alive
@@
-444,11
+444,11
@@
public class TTerminalWindow extends TWindow {
return;
}
return;
}
- if (mouse.
get
MouseWheelUp()) {
+ if (mouse.
is
MouseWheelUp()) {
vScroller.decrement();
return;
}
vScroller.decrement();
return;
}
- if (mouse.
get
MouseWheelDown()) {
+ if (mouse.
is
MouseWheelDown()) {
vScroller.increment();
return;
}
vScroller.increment();
return;
}
diff --git
a/src/jexer/TText.java
b/src/jexer/TText.java
index 6d2fe27faaf6e3ae9652761acd52e9c7ea8d1830..64e96bbe602e00a455ea0f35be986240d9fe82b1 100644
(file)
--- a/
src/jexer/TText.java
+++ b/
src/jexer/TText.java
@@
-30,16
+30,25
@@
*/
package jexer;
*/
package jexer;
+import static jexer.TKeypress.kbDown;
+import static jexer.TKeypress.kbEnd;
+import static jexer.TKeypress.kbHome;
+import static jexer.TKeypress.kbLeft;
+import static jexer.TKeypress.kbPgDn;
+import static jexer.TKeypress.kbPgUp;
+import static jexer.TKeypress.kbRight;
+import static jexer.TKeypress.kbUp;
+
import java.util.LinkedList;
import java.util.List;
import jexer.bits.CellAttributes;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
import java.util.LinkedList;
import java.util.List;
import jexer.bits.CellAttributes;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
-import static jexer.TKeypress.*;
/**
/**
- * TText implements a simple text windget.
+ * TText implements a simple scrollable text area. It reflows automatically on
+ * resize.
*/
public final class TText extends TWidget {
*/
public final class TText extends TWidget {
@@
-81,7
+90,8
@@
public final class TText extends TWidget {
/**
* Convenience method used by TWindowLoggerOutput.
*
/**
* Convenience method used by TWindowLoggerOutput.
*
- * @param line new line to add
+ * @param line
+ * new line to add
*/
public void addLine(final String line) {
if (text.length() == 0) {
*/
public void addLine(final String line) {
if (text.length() == 0) {
@@
-98,13
+108,13
@@
public final class TText extends TWidget {
*/
private void computeBounds() {
maxLineWidth = 0;
*/
private void computeBounds() {
maxLineWidth = 0;
- for (String line: lines) {
+ for (String line
: lines) {
if (line.length() > maxLineWidth) {
maxLineWidth = line.length();
}
}
if (line.length() > maxLineWidth) {
maxLineWidth = line.length();
}
}
- vScroller.setBottomValue(
lines.size() - getHeight(
) + 1);
+ vScroller.setBottomValue(
(lines.size() - getHeight()
) + 1);
if (vScroller.getBottomValue() < 0) {
vScroller.setBottomValue(0);
}
if (vScroller.getBottomValue() < 0) {
vScroller.setBottomValue(0);
}
@@
-112,7
+122,7
@@
public final class TText extends TWidget {
vScroller.setValue(vScroller.getBottomValue());
}
vScroller.setValue(vScroller.getBottomValue());
}
- hScroller.setRightValue(
maxLineWidth - getWidth(
) + 1);
+ hScroller.setRightValue(
(maxLineWidth - getWidth()
) + 1);
if (hScroller.getRightValue() < 0) {
hScroller.setRightValue(0);
}
if (hScroller.getRightValue() < 0) {
hScroller.setRightValue(0);
}
@@
-122,12
+132,14
@@
public final class TText extends TWidget {
}
/**
}
/**
- * Insert newlines into a string to wrap it to a maximum column.
- *
Terminate the final string with a newline. Note that interior
- *
newlines are
converted to spaces.
+ * Insert newlines into a string to wrap it to a maximum column.
Terminate
+ *
the final string with a newline. Note that interior newlines are
+ * converted to spaces.
*
*
- * @param str the string
- * @param n the maximum number of characters in a line
+ * @param str
+ * the string
+ * @param n
+ * the maximum number of characters in a line
* @return the wrapped string
*/
private String wrap(final String str, final int n) {
* @return the wrapped string
*/
private String wrap(final String str, final int n) {
@@
-144,7
+156,7
@@
public final class TText extends TWidget {
if (ch == ' ') {
sb.append(word.toString());
sb.append(ch);
if (ch == ' ') {
sb.append(word.toString());
sb.append(ch);
- if (word.length() >=
n - 1
) {
+ if (word.length() >=
(n - 1)
) {
sb.append('\n');
col = 0;
}
sb.append('\n');
col = 0;
}
@@
-154,7
+166,7
@@
public final class TText extends TWidget {
}
col++;
}
col++;
- if (col >=
n - 1
) {
+ if (col >=
(n - 1)
) {
sb.append('\n');
col = 0;
}
sb.append('\n');
col = 0;
}
@@
-164,7
+176,6
@@
public final class TText extends TWidget {
return sb.toString();
}
return sb.toString();
}
-
/**
* Resize text and scrollbars for a new width/height.
*/
/**
* Resize text and scrollbars for a new width/height.
*/
@@
-173,10
+184,10
@@
public final class TText extends TWidget {
lines.clear();
// Break up text into paragraphs
lines.clear();
// Break up text into paragraphs
- String
[] paragraphs = text.split("\n\n");
- for (String p: paragraphs) {
+ String[] paragraphs = text.split("\n\n");
+ for (String p
: paragraphs) {
String paragraph = wrap(p, getWidth() - 1);
String paragraph = wrap(p, getWidth() - 1);
- for (String line: paragraph.split("\n")) {
+ for (String line
: paragraph.split("\n")) {
lines.add(line);
}
for (int i = 0; i < lineSpacing; i++) {
lines.add(line);
}
for (int i = 0; i < lineSpacing; i++) {
@@
-186,8
+197,7
@@
public final class TText extends TWidget {
// Start at the top
if (vScroller == null) {
// Start at the top
if (vScroller == null) {
- vScroller = new TVScroller(this, getWidth() - 1, 0,
- getHeight() - 1);
+ vScroller = new TVScroller(this, getWidth() - 1, 0, getHeight() - 1);
vScroller.setTopValue(0);
vScroller.setValue(0);
} else {
vScroller.setTopValue(0);
vScroller.setValue(0);
} else {
@@
-198,8
+208,7
@@
public final class TText extends TWidget {
// Start at the left
if (hScroller == null) {
// Start at the left
if (hScroller == null) {
- hScroller = new THScroller(this, 0, getHeight() - 1,
- getWidth() - 1);
+ hScroller = new THScroller(this, 0, getHeight() - 1, getWidth() - 1);
hScroller.setLeftValue(0);
hScroller.setValue(0);
} else {
hScroller.setLeftValue(0);
hScroller.setValue(0);
} else {
@@
-214,15
+223,21
@@
public final class TText extends TWidget {
/**
* Public constructor.
*
/**
* Public constructor.
*
- * @param parent parent widget
- * @param text text on the screen
- * @param x column relative to parent
- * @param y row relative to parent
- * @param width width of text area
- * @param height height of text area
+ * @param parent
+ * parent widget
+ * @param text
+ * text on the screen
+ * @param x
+ * column relative to parent
+ * @param y
+ * row relative to parent
+ * @param width
+ * width of text area
+ * @param height
+ * height of text area
*/
public TText(final TWidget parent, final String text, final int x,
*/
public TText(final TWidget parent, final String text, final int x,
- final int y, final int width, final int height) {
+
final int y, final int width, final int height) {
this(parent, text, x, y, width, height, "ttext");
}
this(parent, text, x, y, width, height, "ttext");
}
@@
-230,17
+245,25
@@
public final class TText extends TWidget {
/**
* Public constructor.
*
/**
* Public constructor.
*
- * @param parent parent widget
- * @param text text on the screen
- * @param x column relative to parent
- * @param y row relative to parent
- * @param width width of text area
- * @param height height of text area
- * @param colorKey ColorTheme key color to use for foreground text.
- * Default is "ttext"
+ * @param parent
+ * parent widget
+ * @param text
+ * text on the screen
+ * @param x
+ * column relative to parent
+ * @param y
+ * row relative to parent
+ * @param width
+ * width of text area
+ * @param height
+ * height of text area
+ * @param colorKey
+ * ColorTheme key color to use for foreground text. Default is
+ * "ttext"
*/
public TText(final TWidget parent, final String text, final int x,
*/
public TText(final TWidget parent, final String text, final int x,
- final int y, final int width, final int height, final String colorKey) {
+ final int y, final int width, final int height,
+ final String colorKey) {
// Set parent and window
super(parent, x, y, width, height);
// Set parent and window
super(parent, x, y, width, height);
@@
-272,16
+295,16
@@
public final class TText extends TWidget {
}
String formatString = "%-" + Integer.toString(getWidth() - 1) + "s";
getScreen().putStrXY(0, topY, String.format(formatString, line),
}
String formatString = "%-" + Integer.toString(getWidth() - 1) + "s";
getScreen().putStrXY(0, topY, String.format(formatString, line),
- color);
+
color);
topY++;
topY++;
- if (topY >=
getHeight() - 1
) {
+ if (topY >=
(getHeight() - 1)
) {
break;
}
}
// Pad the rest with blank lines
break;
}
}
// Pad the rest with blank lines
- for (int i = topY; i <
getHeight() - 1
; i++) {
+ for (int i = topY; i <
(getHeight() - 1)
; i++) {
getScreen().hLineXY(0, i, getWidth() - 1, ' ', color);
}
getScreen().hLineXY(0, i, getWidth() - 1, ' ', color);
}
@@
-290,15
+313,16
@@
public final class TText extends TWidget {
/**
* Handle mouse press events.
*
/**
* Handle mouse press events.
*
- * @param mouse mouse button press event
+ * @param mouse
+ * mouse button press event
*/
@Override
public void onMouseDown(final TMouseEvent mouse) {
*/
@Override
public void onMouseDown(final TMouseEvent mouse) {
- if (mouse.
get
MouseWheelUp()) {
+ if (mouse.
is
MouseWheelUp()) {
vScroller.decrement();
return;
}
vScroller.decrement();
return;
}
- if (mouse.
get
MouseWheelDown()) {
+ if (mouse.
is
MouseWheelDown()) {
vScroller.increment();
return;
}
vScroller.increment();
return;
}
@@
-310,7
+334,8
@@
public final class TText extends TWidget {
/**
* Handle keystrokes.
*
/**
* Handle keystrokes.
*
- * @param keypress keystroke event
+ * @param keypress
+ * keystroke event
*/
@Override
public void onKeypress(final TKeypressEvent keypress) {
*/
@Override
public void onKeypress(final TKeypressEvent keypress) {
diff --git
a/src/jexer/TVScroller.java
b/src/jexer/TVScroller.java
index 51fcd8519f6bd47eba9064b5b2f4582316f2776b..fd806e712b9b8e7883cd79cc276bb9f175f53fb1 100644
(file)
--- a/
src/jexer/TVScroller.java
+++ b/
src/jexer/TVScroller.java
@@
-328,7
+328,7
@@
public final class TVScroller extends TWidget {
return;
}
return;
}
- if ((mouse.
get
Mouse1()) &&
+ if ((mouse.
is
Mouse1()) &&
(inScroll) &&
(mouse.getY() > 0) &&
(mouse.getY() < getHeight() - 1)
(inScroll) &&
(mouse.getY() > 0) &&
(mouse.getY() < getHeight() - 1)
diff --git
a/src/jexer/TWidget.java
b/src/jexer/TWidget.java
index 6cb0f98b1fe4c6634334c13f081a07fbd78a7e0e..7ea1a427cbb78227e40c9b4935139631a66b3919 100644
(file)
--- a/
src/jexer/TWidget.java
+++ b/
src/jexer/TWidget.java
@@
-133,7
+133,7
@@
public abstract class TWidget implements Comparable<TWidget> {
*
* @return if true, this widget will receive events
*/
*
* @return if true, this widget will receive events
*/
- public final boolean
get
Active() {
+ public final boolean
is
Active() {
return active;
}
return active;
}
@@
-267,7
+267,7
@@
public abstract class TWidget implements Comparable<TWidget> {
*
* @return if true, this widget can be tabbed to or receive events
*/
*
* @return if true, this widget can be tabbed to or receive events
*/
- public final boolean
get
Enabled() {
+ public final boolean
is
Enabled() {
return enabled;
}
return enabled;
}
@@
-303,15
+303,15
@@
public abstract class TWidget implements Comparable<TWidget> {
/**
* If true, this widget has a cursor.
*/
/**
* If true, this widget has a cursor.
*/
- private boolean
hasCursor
= false;
+ private boolean
cursorVisible
= false;
/**
* Set visible cursor flag.
*
/**
* Set visible cursor flag.
*
- * @param
hasCursor
if true, this widget has a cursor
+ * @param
cursorVisible
if true, this widget has a cursor
*/
*/
- public final void set
HasCursor(final boolean hasCursor
) {
- this.
hasCursor = hasCursor
;
+ public final void set
CursorVisible(final boolean cursorVisible
) {
+ this.
cursorVisible = cursorVisible
;
}
/**
}
/**
@@
-319,8
+319,8
@@
public abstract class TWidget implements Comparable<TWidget> {
*
* @return if true, this widget has a visible cursor
*/
*
* @return if true, this widget has a visible cursor
*/
- public final boolean
visibleCursor
() {
- return
hasCursor
;
+ public final boolean
isCursorVisible
() {
+ return
cursorVisible
;
}
/**
}
/**
@@
-392,11
+392,11
@@
public abstract class TWidget implements Comparable<TWidget> {
* @return true if this widget is active and all of its parents are
* active.
*/
* @return true if this widget is active and all of its parents are
* active.
*/
- public final boolean
get
AbsoluteActive() {
+ public final boolean
is
AbsoluteActive() {
if (parent == this) {
return active;
}
if (parent == this) {
return active;
}
- return (active && parent.
get
AbsoluteActive());
+ return (active && parent.
is
AbsoluteActive());
}
/**
}
/**
@@
-405,7
+405,7
@@
public abstract class TWidget implements Comparable<TWidget> {
* @return absolute screen column number for the cursor's X position
*/
public final int getCursorAbsoluteX() {
* @return absolute screen column number for the cursor's X position
*/
public final int getCursorAbsoluteX() {
- assert (
hasCursor
);
+ assert (
cursorVisible
);
return getAbsoluteX() + cursorX;
}
return getAbsoluteX() + cursorX;
}
@@
-415,7
+415,7
@@
public abstract class TWidget implements Comparable<TWidget> {
* @return absolute screen row number for the cursor's Y position
*/
public final int getCursorAbsoluteY() {
* @return absolute screen row number for the cursor's Y position
*/
public final int getCursorAbsoluteY() {
- assert (
hasCursor
);
+ assert (
cursorVisible
);
return getAbsoluteY() + cursorY;
}
return getAbsoluteY() + cursorY;
}
@@
-781,12
+781,12
@@
public abstract class TWidget implements Comparable<TWidget> {
for (TWidget widget: children) {
if (widget instanceof TButton) {
TButton button = (TButton) widget;
for (TWidget widget: children) {
if (widget instanceof TButton) {
TButton button = (TButton) widget;
- if (button.
get
Enabled()
- && !keypress.getKey().
getIs
Key()
- && keypress.getKey().
get
Alt()
- && !keypress.getKey().
get
Ctrl()
+ if (button.
is
Enabled()
+ && !keypress.getKey().
isFn
Key()
+ && keypress.getKey().
is
Alt()
+ && !keypress.getKey().
is
Ctrl()
&& (Character.toLowerCase(button.getMnemonic().getShortcut())
&& (Character.toLowerCase(button.getMnemonic().getShortcut())
- == Character.toLowerCase(keypress.getKey().getCh()))
+ == Character.toLowerCase(keypress.getKey().getCh
ar
()))
) {
widget.handleEvent(new TKeypressEvent(kbEnter));
) {
widget.handleEvent(new TKeypressEvent(kbEnter));
diff --git
a/src/jexer/TWindow.java
b/src/jexer/TWindow.java
index e1d0299b5f7463cec7eec3dad3b50276f1042824..82d187c762a4d89743edbc6bdd600c6409b0a810 100644
(file)
--- a/
src/jexer/TWindow.java
+++ b/
src/jexer/TWindow.java
@@
-374,17
+374,17
@@
public class TWindow extends TWidget {
if (!isModal()
&& (inWindowMove || inWindowResize || inKeyboardResize)
) {
if (!isModal()
&& (inWindowMove || inWindowResize || inKeyboardResize)
) {
- assert (
get
Active());
+ assert (
is
Active());
return getTheme().getColor("twindow.background.windowmove");
} else if (isModal() && inWindowMove) {
return getTheme().getColor("twindow.background.windowmove");
} else if (isModal() && inWindowMove) {
- assert (
get
Active());
+ assert (
is
Active());
return getTheme().getColor("twindow.background.modal");
} else if (isModal()) {
return getTheme().getColor("twindow.background.modal");
} else if (isModal()) {
- if (
get
Active()) {
+ if (
is
Active()) {
return getTheme().getColor("twindow.background.modal");
}
return getTheme().getColor("twindow.background.modal.inactive");
return getTheme().getColor("twindow.background.modal");
}
return getTheme().getColor("twindow.background.modal.inactive");
- } else if (
get
Active()) {
+ } else if (
is
Active()) {
assert (!isModal());
return getTheme().getColor("twindow.background");
} else {
assert (!isModal());
return getTheme().getColor("twindow.background");
} else {
@@
-402,18
+402,18
@@
public class TWindow extends TWidget {
if (!isModal()
&& (inWindowMove || inWindowResize || inKeyboardResize)
) {
if (!isModal()
&& (inWindowMove || inWindowResize || inKeyboardResize)
) {
- assert (
get
Active());
+ assert (
is
Active());
return getTheme().getColor("twindow.border.windowmove");
} else if (isModal() && inWindowMove) {
return getTheme().getColor("twindow.border.windowmove");
} else if (isModal() && inWindowMove) {
- assert (
get
Active());
+ assert (
is
Active());
return getTheme().getColor("twindow.border.modal.windowmove");
} else if (isModal()) {
return getTheme().getColor("twindow.border.modal.windowmove");
} else if (isModal()) {
- if (
get
Active()) {
+ if (
is
Active()) {
return getTheme().getColor("twindow.border.modal");
} else {
return getTheme().getColor("twindow.border.modal.inactive");
}
return getTheme().getColor("twindow.border.modal");
} else {
return getTheme().getColor("twindow.border.modal.inactive");
}
- } else if (
get
Active()) {
+ } else if (
is
Active()) {
assert (!isModal());
return getTheme().getColor("twindow.border");
} else {
assert (!isModal());
return getTheme().getColor("twindow.border");
} else {
@@
-431,18
+431,18
@@
public class TWindow extends TWidget {
if (!isModal()
&& (inWindowMove || inWindowResize || inKeyboardResize)
) {
if (!isModal()
&& (inWindowMove || inWindowResize || inKeyboardResize)
) {
- assert (
get
Active());
+ assert (
is
Active());
return 1;
} else if (isModal() && inWindowMove) {
return 1;
} else if (isModal() && inWindowMove) {
- assert (
get
Active());
+ assert (
is
Active());
return 1;
} else if (isModal()) {
return 1;
} else if (isModal()) {
- if (
get
Active()) {
+ if (
is
Active()) {
return 2;
} else {
return 1;
}
return 2;
} else {
return 1;
}
- } else if (
get
Active()) {
+ } else if (
is
Active()) {
return 2;
} else {
return 1;
return 2;
} else {
return 1;
@@
-476,12
+476,12
@@
public class TWindow extends TWidget {
putStrXY(titleLeft + 1, 0, title);
putCharXY(titleLeft + title.length() + 1, 0, ' ', border);
putStrXY(titleLeft + 1, 0, title);
putCharXY(titleLeft + title.length() + 1, 0, ' ', border);
- if (
get
Active()) {
+ if (
is
Active()) {
// Draw the close button
putCharXY(2, 0, '[', border);
putCharXY(4, 0, ']', border);
// Draw the close button
putCharXY(2, 0, '[', border);
putCharXY(4, 0, ']', border);
- if (mouseOnClose() && mouse.
get
Mouse1()) {
+ if (mouseOnClose() && mouse.
is
Mouse1()) {
putCharXY(3, 0, GraphicsChars.CP437[0x0F],
!isModal()
? getTheme().getColor("twindow.border.windowmove")
putCharXY(3, 0, GraphicsChars.CP437[0x0F],
!isModal()
? getTheme().getColor("twindow.border.windowmove")
@@
-498,7
+498,7
@@
public class TWindow extends TWidget {
putCharXY(getWidth() - 5, 0, '[', border);
putCharXY(getWidth() - 3, 0, ']', border);
putCharXY(getWidth() - 5, 0, '[', border);
putCharXY(getWidth() - 3, 0, ']', border);
- if (mouseOnMaximize() && mouse.
get
Mouse1()) {
+ if (mouseOnMaximize() && mouse.
is
Mouse1()) {
putCharXY(getWidth() - 4, 0, GraphicsChars.CP437[0x0F],
getTheme().getColor("twindow.border.windowmove"));
} else {
putCharXY(getWidth() - 4, 0, GraphicsChars.CP437[0x0F],
getTheme().getColor("twindow.border.windowmove"));
} else {
@@
-536,7
+536,7
@@
public class TWindow extends TWidget {
inKeyboardResize = false;
if ((mouse.getAbsoluteY() == getY())
inKeyboardResize = false;
if ((mouse.getAbsoluteY() == getY())
- && mouse.
get
Mouse1()
+ && mouse.
is
Mouse1()
&& (getX() <= mouse.getAbsoluteX())
&& (mouse.getAbsoluteX() < getX() + getWidth())
&& !mouseOnClose()
&& (getX() <= mouse.getAbsoluteX())
&& (mouse.getAbsoluteX() < getX() + getWidth())
&& !mouseOnClose()
@@
-605,26
+605,26
@@
public class TWindow extends TWidget {
public void onMouseUp(final TMouseEvent mouse) {
this.mouse = mouse;
public void onMouseUp(final TMouseEvent mouse) {
this.mouse = mouse;
- if ((inWindowMove) && (mouse.
get
Mouse1())) {
+ if ((inWindowMove) && (mouse.
is
Mouse1())) {
// Stop moving window
inWindowMove = false;
return;
}
// Stop moving window
inWindowMove = false;
return;
}
- if ((inWindowResize) && (mouse.
get
Mouse1())) {
+ if ((inWindowResize) && (mouse.
is
Mouse1())) {
// Stop resizing window
inWindowResize = false;
return;
}
// Stop resizing window
inWindowResize = false;
return;
}
- if (mouse.
get
Mouse1() && mouseOnClose()) {
+ if (mouse.
is
Mouse1() && mouseOnClose()) {
// Close window
application.closeWindow(this);
return;
}
if ((mouse.getAbsoluteY() == getY())
// Close window
application.closeWindow(this);
return;
}
if ((mouse.getAbsoluteY() == getY())
- && mouse.
get
Mouse1()
+ && mouse.
is
Mouse1()
&& mouseOnMaximize()) {
if (maximized) {
// Restore
&& mouseOnMaximize()) {
if (maximized) {
// Restore
diff --git
a/src/jexer/bits/Cell.java
b/src/jexer/bits/Cell.java
index 511963c28ac23c0f458addcafc56090bb7697bb8..e75680864fb60dc27910a845b27db6c5d7bfb2d1 100644
(file)
--- a/
src/jexer/bits/Cell.java
+++ b/
src/jexer/bits/Cell.java
@@
-77,11
+77,11
@@
public final class Cell extends CellAttributes {
public boolean isBlank() {
if ((getForeColor().equals(Color.WHITE))
&& (getBackColor().equals(Color.BLACK))
public boolean isBlank() {
if ((getForeColor().equals(Color.WHITE))
&& (getBackColor().equals(Color.BLACK))
- && !
get
Bold()
- && !
get
Blink()
- && !
get
Reverse()
- && !
get
Underline()
- && !
get
Protect()
+ && !
is
Bold()
+ && !
is
Blink()
+ && !
is
Reverse()
+ && !
is
Underline()
+ && !
is
Protect()
&& (ch == ' ')
) {
return true;
&& (ch == ' ')
) {
return true;
@@
-178,6
+178,6
@@
public final class Cell extends CellAttributes {
@Override
public String toString() {
return String.format("fore: %d back: %d bold: %s blink: %s ch %c",
@Override
public String toString() {
return String.format("fore: %d back: %d bold: %s blink: %s ch %c",
- getForeColor(), getBackColor(),
getBold(), get
Blink(), ch);
+ getForeColor(), getBackColor(),
isBold(), is
Blink(), ch);
}
}
}
}
diff --git
a/src/jexer/bits/CellAttributes.java
b/src/jexer/bits/CellAttributes.java
index d1aea2cfded151f64b7fab265f48e328afa1ebd7..ad065254b48a08ed57c06909f6ceb4627cd6a3ff 100644
(file)
--- a/
src/jexer/bits/CellAttributes.java
+++ b/
src/jexer/bits/CellAttributes.java
@@
-45,7
+45,7
@@
public class CellAttributes {
*
* @return bold value
*/
*
* @return bold value
*/
- public final boolean
get
Bold() {
+ public final boolean
is
Bold() {
return bold;
}
return bold;
}
@@
-68,7
+68,7
@@
public class CellAttributes {
*
* @return blink value
*/
*
* @return blink value
*/
- public final boolean
get
Blink() {
+ public final boolean
is
Blink() {
return blink;
}
return blink;
}
@@
-91,7
+91,7
@@
public class CellAttributes {
*
* @return reverse value
*/
*
* @return reverse value
*/
- public final boolean
get
Reverse() {
+ public final boolean
is
Reverse() {
return reverse;
}
return reverse;
}
@@
-114,7
+114,7
@@
public class CellAttributes {
*
* @return underline value
*/
*
* @return underline value
*/
- public final boolean
get
Underline() {
+ public final boolean
is
Underline() {
return underline;
}
return underline;
}
@@
-137,7
+137,7
@@
public class CellAttributes {
*
* @return protect value
*/
*
* @return protect value
*/
- public final boolean
get
Protect() {
+ public final boolean
is
Protect() {
return protect;
}
return protect;
}
diff --git
a/src/jexer/demos/Demo1.java
b/src/jexer/demos/Demo1.java
index 32272fbe62158e78f48d7d02006d338b2ec78192..f8ede8578465370bd0348000bff37958ef7227ee 100644
(file)
--- a/
src/jexer/demos/Demo1.java
+++ b/
src/jexer/demos/Demo1.java
@@
-426,8
+426,8
@@
class DemoMainWindow extends TWindow {
new TAction() {
public void DO() {
new TAction() {
public void DO() {
- timerLabel.set
Text
(String.format("Timer: %d", timerI));
- timerLabel.setWidth(timerLabel.get
Text
().length());
+ timerLabel.set
Label
(String.format("Timer: %d", timerI));
+ timerLabel.setWidth(timerLabel.get
Label
().length());
if (timerI < 100) {
timerI++;
}
if (timerI < 100) {
timerI++;
}
diff --git
a/src/jexer/event/TKeypressEvent.java
b/src/jexer/event/TKeypressEvent.java
index bf8a51afe09ce4ec7f723a202c4dfcd12f9684e3..19d87cf68ccc89cc3466ddc95c336d7f74c000e8 100644
(file)
--- a/
src/jexer/event/TKeypressEvent.java
+++ b/
src/jexer/event/TKeypressEvent.java
@@
-87,7
+87,7
@@
public final class TKeypressEvent extends TInputEvent {
public TKeypressEvent(final TKeypress key,
final boolean alt, final boolean ctrl, final boolean shift) {
public TKeypressEvent(final TKeypress key,
final boolean alt, final boolean ctrl, final boolean shift) {
- this.key = new TKeypress(key.
getIsKey(), key.getFnKey(), key.getCh
(),
+ this.key = new TKeypress(key.
isFnKey(), key.getKeyCode(), key.getChar
(),
alt, ctrl, shift);
}
alt, ctrl, shift);
}
diff --git
a/src/jexer/event/TMouseEvent.java
b/src/jexer/event/TMouseEvent.java
index 2f801ccfcfdc2c858df46013a99f4194d86cebcc..4a148656d545bc0683300662189bbaac130d8014 100644
(file)
--- a/
src/jexer/event/TMouseEvent.java
+++ b/
src/jexer/event/TMouseEvent.java
@@
-161,7
+161,7
@@
public final class TMouseEvent extends TInputEvent {
*
* @return mouse1
*/
*
* @return mouse1
*/
- public boolean
get
Mouse1() {
+ public boolean
is
Mouse1() {
return mouse1;
}
return mouse1;
}
@@
-175,7
+175,7
@@
public final class TMouseEvent extends TInputEvent {
*
* @return mouse2
*/
*
* @return mouse2
*/
- public boolean
get
Mouse2() {
+ public boolean
is
Mouse2() {
return mouse2;
}
return mouse2;
}
@@
-189,7
+189,7
@@
public final class TMouseEvent extends TInputEvent {
*
* @return mouse3
*/
*
* @return mouse3
*/
- public boolean
get
Mouse3() {
+ public boolean
is
Mouse3() {
return mouse3;
}
return mouse3;
}
@@
-203,7
+203,7
@@
public final class TMouseEvent extends TInputEvent {
*
* @return mouseWheelUp
*/
*
* @return mouseWheelUp
*/
- public boolean
get
MouseWheelUp() {
+ public boolean
is
MouseWheelUp() {
return mouseWheelUp;
}
return mouseWheelUp;
}
@@
-217,7
+217,7
@@
public final class TMouseEvent extends TInputEvent {
*
* @return mouseWheelDown
*/
*
* @return mouseWheelDown
*/
- public boolean
get
MouseWheelDown() {
+ public boolean
is
MouseWheelDown() {
return mouseWheelDown;
}
return mouseWheelDown;
}
diff --git
a/src/jexer/io/ECMA48Screen.java
b/src/jexer/io/ECMA48Screen.java
index aa71796c3a508d02fbaba7f04b8fd4cbce30b265..7e143175196791a7e2ff1bd1c7e267b70b589a89 100644
(file)
--- a/
src/jexer/io/ECMA48Screen.java
+++ b/
src/jexer/io/ECMA48Screen.java
@@
-133,10
+133,10
@@
public final class ECMA48Screen extends Screen {
// Now emit only the modified attributes
if ((lCell.getForeColor() != lastAttr.getForeColor())
&& (lCell.getBackColor() != lastAttr.getBackColor())
// Now emit only the modified attributes
if ((lCell.getForeColor() != lastAttr.getForeColor())
&& (lCell.getBackColor() != lastAttr.getBackColor())
- && (lCell.
getBold() == lastAttr.get
Bold())
- && (lCell.
getReverse() == lastAttr.get
Reverse())
- && (lCell.
getUnderline() == lastAttr.get
Underline())
- && (lCell.
getBlink() == lastAttr.get
Blink())
+ && (lCell.
isBold() == lastAttr.is
Bold())
+ && (lCell.
isReverse() == lastAttr.is
Reverse())
+ && (lCell.
isUnderline() == lastAttr.is
Underline())
+ && (lCell.
isBlink() == lastAttr.is
Blink())
) {
// Both colors changed, attributes the same
sb.append(terminal.color(lCell.getForeColor(),
) {
// Both colors changed, attributes the same
sb.append(terminal.color(lCell.getForeColor(),
@@
-147,27
+147,27
@@
public final class ECMA48Screen extends Screen {
}
} else if ((lCell.getForeColor() != lastAttr.getForeColor())
&& (lCell.getBackColor() != lastAttr.getBackColor())
}
} else if ((lCell.getForeColor() != lastAttr.getForeColor())
&& (lCell.getBackColor() != lastAttr.getBackColor())
- && (lCell.
getBold() != lastAttr.get
Bold())
- && (lCell.
getReverse() != lastAttr.get
Reverse())
- && (lCell.
getUnderline() != lastAttr.get
Underline())
- && (lCell.
getBlink() != lastAttr.get
Blink())
+ && (lCell.
isBold() != lastAttr.is
Bold())
+ && (lCell.
isReverse() != lastAttr.is
Reverse())
+ && (lCell.
isUnderline() != lastAttr.is
Underline())
+ && (lCell.
isBlink() != lastAttr.is
Blink())
) {
// Everything is different
sb.append(terminal.color(lCell.getForeColor(),
lCell.getBackColor(),
) {
// Everything is different
sb.append(terminal.color(lCell.getForeColor(),
lCell.getBackColor(),
- lCell.
getBold(), lCell.get
Reverse(),
- lCell.
get
Blink(),
- lCell.
get
Underline()));
+ lCell.
isBold(), lCell.is
Reverse(),
+ lCell.
is
Blink(),
+ lCell.
is
Underline()));
if (debugToStderr) {
System.err.printf("2 Set all attributes\n");
}
} else if ((lCell.getForeColor() != lastAttr.getForeColor())
&& (lCell.getBackColor() == lastAttr.getBackColor())
if (debugToStderr) {
System.err.printf("2 Set all attributes\n");
}
} else if ((lCell.getForeColor() != lastAttr.getForeColor())
&& (lCell.getBackColor() == lastAttr.getBackColor())
- && (lCell.
getBold() == lastAttr.get
Bold())
- && (lCell.
getReverse() == lastAttr.get
Reverse())
- && (lCell.
getUnderline() == lastAttr.get
Underline())
- && (lCell.
getBlink() == lastAttr.get
Blink())
+ && (lCell.
isBold() == lastAttr.is
Bold())
+ && (lCell.
isReverse() == lastAttr.is
Reverse())
+ && (lCell.
isUnderline() == lastAttr.is
Underline())
+ && (lCell.
isBlink() == lastAttr.is
Blink())
) {
// Attributes same, foreColor different
) {
// Attributes same, foreColor different
@@
-178,10
+178,10
@@
public final class ECMA48Screen extends Screen {
}
} else if ((lCell.getForeColor() == lastAttr.getForeColor())
&& (lCell.getBackColor() != lastAttr.getBackColor())
}
} else if ((lCell.getForeColor() == lastAttr.getForeColor())
&& (lCell.getBackColor() != lastAttr.getBackColor())
- && (lCell.
getBold() == lastAttr.get
Bold())
- && (lCell.
getReverse() == lastAttr.get
Reverse())
- && (lCell.
getUnderline() == lastAttr.get
Underline())
- && (lCell.
getBlink() == lastAttr.get
Blink())
+ && (lCell.
isBold() == lastAttr.is
Bold())
+ && (lCell.
isReverse() == lastAttr.is
Reverse())
+ && (lCell.
isUnderline() == lastAttr.is
Underline())
+ && (lCell.
isBlink() == lastAttr.is
Blink())
) {
// Attributes same, backColor different
sb.append(terminal.color(lCell.getBackColor(), false));
) {
// Attributes same, backColor different
sb.append(terminal.color(lCell.getBackColor(), false));
@@
-191,10
+191,10
@@
public final class ECMA48Screen extends Screen {
}
} else if ((lCell.getForeColor() == lastAttr.getForeColor())
&& (lCell.getBackColor() == lastAttr.getBackColor())
}
} else if ((lCell.getForeColor() == lastAttr.getForeColor())
&& (lCell.getBackColor() == lastAttr.getBackColor())
- && (lCell.
getBold() == lastAttr.get
Bold())
- && (lCell.
getReverse() == lastAttr.get
Reverse())
- && (lCell.
getUnderline() == lastAttr.get
Underline())
- && (lCell.
getBlink() == lastAttr.get
Blink())
+ && (lCell.
isBold() == lastAttr.is
Bold())
+ && (lCell.
isReverse() == lastAttr.is
Reverse())
+ && (lCell.
isUnderline() == lastAttr.is
Underline())
+ && (lCell.
isBlink() == lastAttr.is
Blink())
) {
// All attributes the same, just print the char
) {
// All attributes the same, just print the char
@@
-207,10
+207,10
@@
public final class ECMA48Screen extends Screen {
// Just reset everything again
sb.append(terminal.color(lCell.getForeColor(),
lCell.getBackColor(),
// Just reset everything again
sb.append(terminal.color(lCell.getForeColor(),
lCell.getBackColor(),
- lCell.
get
Bold(),
- lCell.
get
Reverse(),
- lCell.
get
Blink(),
- lCell.
get
Underline()));
+ lCell.
is
Bold(),
+ lCell.
is
Reverse(),
+ lCell.
is
Blink(),
+ lCell.
is
Underline()));
if (debugToStderr) {
System.err.printf("6 Change all attributes\n");
if (debugToStderr) {
System.err.printf("6 Change all attributes\n");
diff --git
a/src/jexer/io/Screen.java
b/src/jexer/io/Screen.java
index a0497b8f1756dbd34fa55c344208ea705ee53aab..ec5309d669c3cf06a36dc5c2a460615d9b3422ad 100644
(file)
--- a/
src/jexer/io/Screen.java
+++ b/
src/jexer/io/Screen.java
@@
-275,11
+275,11
@@
public abstract class Screen {
dirty = true;
logical[X][Y].setForeColor(attr.getForeColor());
logical[X][Y].setBackColor(attr.getBackColor());
dirty = true;
logical[X][Y].setForeColor(attr.getForeColor());
logical[X][Y].setBackColor(attr.getBackColor());
- logical[X][Y].setBold(attr.
get
Bold());
- logical[X][Y].setBlink(attr.
get
Blink());
- logical[X][Y].setReverse(attr.
get
Reverse());
- logical[X][Y].setUnderline(attr.
get
Underline());
- logical[X][Y].setProtect(attr.
get
Protect());
+ logical[X][Y].setBold(attr.
is
Bold());
+ logical[X][Y].setBlink(attr.
is
Blink());
+ logical[X][Y].setReverse(attr.
is
Reverse());
+ logical[X][Y].setUnderline(attr.
is
Underline());
+ logical[X][Y].setProtect(attr.
is
Protect());
}
}
}
}
@@
-343,11
+343,11
@@
public abstract class Screen {
logical[X][Y].setChar(ch);
logical[X][Y].setForeColor(attr.getForeColor());
logical[X][Y].setBackColor(attr.getBackColor());
logical[X][Y].setChar(ch);
logical[X][Y].setForeColor(attr.getForeColor());
logical[X][Y].setBackColor(attr.getBackColor());
- logical[X][Y].setBold(attr.
get
Bold());
- logical[X][Y].setBlink(attr.
get
Blink());
- logical[X][Y].setReverse(attr.
get
Reverse());
- logical[X][Y].setUnderline(attr.
get
Underline());
- logical[X][Y].setProtect(attr.
get
Protect());
+ logical[X][Y].setBold(attr.
is
Bold());
+ logical[X][Y].setBlink(attr.
is
Blink());
+ logical[X][Y].setReverse(attr.
is
Reverse());
+ logical[X][Y].setUnderline(attr.
is
Underline());
+ logical[X][Y].setProtect(attr.
is
Protect());
}
}
}
}
diff --git
a/src/jexer/io/SwingScreen.java
b/src/jexer/io/SwingScreen.java
index e06dc83d82212d059c1c709ee613f882f53165b6..bdd74a7ca7e47728905f88f9b7bb58947fe83639 100644
(file)
--- a/
src/jexer/io/SwingScreen.java
+++ b/
src/jexer/io/SwingScreen.java
@@
-159,7
+159,7
@@
public final class SwingScreen extends Screen {
* blink
* underline
*/
* blink
* underline
*/
- if (attr.
get
Bold()) {
+ if (attr.
is
Bold()) {
if (attr.getForeColor().equals(jexer.bits.Color.BLACK)) {
return MYBOLD_BLACK;
} else if (attr.getForeColor().equals(jexer.bits.Color.RED)) {
if (attr.getForeColor().equals(jexer.bits.Color.BLACK)) {
return MYBOLD_BLACK;
} else if (attr.getForeColor().equals(jexer.bits.Color.RED)) {
diff --git
a/src/jexer/menu/TMenu.java
b/src/jexer/menu/TMenu.java
index 56cbad5be6661425575ea9039f2392f785b03405..165d951b283df63b8d18b818f1a2534a78676b24 100644
(file)
--- a/
src/jexer/menu/TMenu.java
+++ b/
src/jexer/menu/TMenu.java
@@
-128,7
+128,7
@@
public final class TMenu extends TWindow {
public void draw() {
CellAttributes background = getTheme().getColor("tmenu");
public void draw() {
CellAttributes background = getTheme().getColor("tmenu");
- assert (
get
AbsoluteActive());
+ assert (
is
AbsoluteActive());
// Fill in the interior background
for (int i = 0; i < getHeight(); i++) {
// Fill in the interior background
for (int i = 0; i < getHeight(); i++) {
@@
-221,7
+221,7
@@
public final class TMenu extends TWindow {
// See if we should activate a different menu item
for (TWidget widget: getChildren()) {
// See if we should activate a different menu item
for (TWidget widget: getChildren()) {
- if ((mouse.
get
Mouse1())
+ if ((mouse.
is
Mouse1())
&& (widget.mouseWouldHit(mouse))
) {
// Activate this menu item
&& (widget.mouseWouldHit(mouse))
) {
// Activate this menu item
@@
-276,14
+276,14
@@
public final class TMenu extends TWindow {
}
// Switch to a menuItem if it has an mnemonic
}
// Switch to a menuItem if it has an mnemonic
- if (!keypress.getKey().
getIs
Key()
- && !keypress.getKey().
get
Alt()
- && !keypress.getKey().
get
Ctrl()) {
+ if (!keypress.getKey().
isFn
Key()
+ && !keypress.getKey().
is
Alt()
+ && !keypress.getKey().
is
Ctrl()) {
for (TWidget widget: getChildren()) {
TMenuItem item = (TMenuItem) widget;
if ((item.getMnemonic() != null)
&& (Character.toLowerCase(item.getMnemonic().getShortcut())
for (TWidget widget: getChildren()) {
TMenuItem item = (TMenuItem) widget;
if ((item.getMnemonic() != null)
&& (Character.toLowerCase(item.getMnemonic().getShortcut())
- == Character.toLowerCase(keypress.getKey().getCh()))
+ == Character.toLowerCase(keypress.getKey().getCh
ar
()))
) {
// Send an enter keystroke to it
activate(item);
) {
// Send an enter keystroke to it
activate(item);
@@
-295,7
+295,7
@@
public final class TMenu extends TWindow {
// Dispatch the keypress to an active widget
for (TWidget widget: getChildren()) {
// Dispatch the keypress to an active widget
for (TWidget widget: getChildren()) {
- if (widget.
get
Active()) {
+ if (widget.
is
Active()) {
widget.handleEvent(keypress);
return;
}
widget.handleEvent(keypress);
return;
}
diff --git
a/src/jexer/menu/TMenuItem.java
b/src/jexer/menu/TMenuItem.java
index 607341b2734eaa4e35d5e941d3d34c3c94917802..43ea8f03cccc1f5e6f6f2d4b1e82ef7646f7b2d1 100644
(file)
--- a/
src/jexer/menu/TMenuItem.java
+++ b/
src/jexer/menu/TMenuItem.java
@@
-200,11
+200,11
@@
public class TMenuItem extends TWidget {
CellAttributes background = getTheme().getColor("tmenu");
CellAttributes menuColor;
CellAttributes menuMnemonicColor;
CellAttributes background = getTheme().getColor("tmenu");
CellAttributes menuColor;
CellAttributes menuMnemonicColor;
- if (
get
AbsoluteActive()) {
+ if (
is
AbsoluteActive()) {
menuColor = getTheme().getColor("tmenu.highlighted");
menuMnemonicColor = getTheme().getColor("tmenu.mnemonic.highlighted");
} else {
menuColor = getTheme().getColor("tmenu.highlighted");
menuMnemonicColor = getTheme().getColor("tmenu.mnemonic.highlighted");
} else {
- if (
get
Enabled()) {
+ if (
is
Enabled()) {
menuColor = getTheme().getColor("tmenu");
menuMnemonicColor = getTheme().getColor("tmenu.mnemonic");
} else {
menuColor = getTheme().getColor("tmenu");
menuMnemonicColor = getTheme().getColor("tmenu.mnemonic");
} else {
@@
-239,7
+239,7
@@
public class TMenuItem extends TWidget {
* Dispatch event(s) due to selection or click.
*/
public void dispatch() {
* Dispatch event(s) due to selection or click.
*/
public void dispatch() {
- assert (
get
Enabled());
+ assert (
is
Enabled());
getApplication().addMenuEvent(new TMenuEvent(id));
if (checkable) {
getApplication().addMenuEvent(new TMenuEvent(id));
if (checkable) {
@@
-269,7
+269,7
@@
public class TMenuItem extends TWidget {
*/
@Override
public void onMouseUp(final TMouseEvent mouse) {
*/
@Override
public void onMouseUp(final TMouseEvent mouse) {
- if ((mouseOnMenuItem(mouse)) && (mouse.
get
Mouse1())) {
+ if ((mouseOnMenuItem(mouse)) && (mouse.
is
Mouse1())) {
dispatch();
return;
}
dispatch();
return;
}
diff --git
a/src/jexer/menu/TSubMenu.java
b/src/jexer/menu/TSubMenu.java
index bd1815f9e6bcfa5cc155694063b47dc192874d8a..1f1b11971a550a20a1d08a2b838e7258e2441db3 100644
(file)
--- a/
src/jexer/menu/TSubMenu.java
+++ b/
src/jexer/menu/TSubMenu.java
@@
-77,10
+77,10
@@
public final class TSubMenu extends TMenuItem {
super.draw();
CellAttributes menuColor;
super.draw();
CellAttributes menuColor;
- if (
get
AbsoluteActive()) {
+ if (
is
AbsoluteActive()) {
menuColor = getTheme().getColor("tmenu.highlighted");
} else {
menuColor = getTheme().getColor("tmenu.highlighted");
} else {
- if (
get
Enabled()) {
+ if (
is
Enabled()) {
menuColor = getTheme().getColor("tmenu");
} else {
menuColor = getTheme().getColor("tmenu.disabled");
menuColor = getTheme().getColor("tmenu");
} else {
menuColor = getTheme().getColor("tmenu.disabled");
@@
-100,7
+100,7
@@
public final class TSubMenu extends TMenuItem {
@Override
public void onKeypress(final TKeypressEvent keypress) {
@Override
public void onKeypress(final TKeypressEvent keypress) {
- if (menu.
get
Active()) {
+ if (menu.
is
Active()) {
menu.onKeypress(keypress);
return;
}
menu.onKeypress(keypress);
return;
}
@@
-146,9
+146,9
@@
public final class TSubMenu extends TMenuItem {
*/
@Override
public void dispatch() {
*/
@Override
public void dispatch() {
- assert (
get
Enabled());
- if (
get
AbsoluteActive()) {
- if (!menu.
get
Active()) {
+ assert (
is
Enabled());
+ if (
is
AbsoluteActive()) {
+ if (!menu.
is
Active()) {
getApplication().addSubMenu(menu);
menu.setActive(true);
}
getApplication().addSubMenu(menu);
menu.setActive(true);
}
@@
-162,7
+162,7
@@
public final class TSubMenu extends TMenuItem {
*/
@Override
public TWidget getActiveChild() {
*/
@Override
public TWidget getActiveChild() {
- if (menu.
get
Active()) {
+ if (menu.
is
Active()) {
return menu;
}
// Menu not active, return me
return menu;
}
// Menu not active, return me
diff --git
a/src/jexer/tterminal/ECMA48.java
b/src/jexer/tterminal/ECMA48.java
index 22867e1d1c6e7c45e549dfdfc55999940e6aee53..7b41594be4eff9ab073437f9fb64f2302b18f259 100644
(file)
--- a/
src/jexer/tterminal/ECMA48.java
+++ b/
src/jexer/tterminal/ECMA48.java
@@
-614,7
+614,7
@@
public class ECMA48 implements Runnable {
*
* @return if true, the cursor is visible
*/
*
* @return if true, the cursor is visible
*/
- public final boolean
visibleCursor
() {
+ public final boolean
isCursorVisible
() {
return cursorVisible;
}
return cursorVisible;
}
@@
-1145,11
+1145,11
@@
public class ECMA48 implements Runnable {
* have a button down (i.e. drag-and-drop).
*/
if (mouse.getType() == TMouseEvent.Type.MOUSE_MOTION) {
* have a button down (i.e. drag-and-drop).
*/
if (mouse.getType() == TMouseEvent.Type.MOUSE_MOTION) {
- if (!mouse.
get
Mouse1()
- && !mouse.
get
Mouse2()
- && !mouse.
get
Mouse3()
- && !mouse.
get
MouseWheelUp()
- && !mouse.
get
MouseWheelDown()
+ if (!mouse.
is
Mouse1()
+ && !mouse.
is
Mouse2()
+ && !mouse.
is
Mouse3()
+ && !mouse.
is
MouseWheelUp()
+ && !mouse.
is
MouseWheelDown()
) {
return;
}
) {
return;
}
@@
-1168,15
+1168,15
@@
public class ECMA48 implements Runnable {
sb.append('M');
if (mouse.getType() == TMouseEvent.Type.MOUSE_UP) {
sb.append((char) (0x03 + 32));
sb.append('M');
if (mouse.getType() == TMouseEvent.Type.MOUSE_UP) {
sb.append((char) (0x03 + 32));
- } else if (mouse.
get
Mouse1()) {
+ } else if (mouse.
is
Mouse1()) {
sb.append((char) (0x00 + 32));
sb.append((char) (0x00 + 32));
- } else if (mouse.
get
Mouse2()) {
+ } else if (mouse.
is
Mouse2()) {
sb.append((char) (0x01 + 32));
sb.append((char) (0x01 + 32));
- } else if (mouse.
get
Mouse3()) {
+ } else if (mouse.
is
Mouse3()) {
sb.append((char) (0x02 + 32));
sb.append((char) (0x02 + 32));
- } else if (mouse.
get
MouseWheelUp()) {
+ } else if (mouse.
is
MouseWheelUp()) {
sb.append((char) (0x04 + 64));
sb.append((char) (0x04 + 64));
- } else if (mouse.
get
MouseWheelDown()) {
+ } else if (mouse.
is
MouseWheelDown()) {
sb.append((char) (0x05 + 64));
} else {
sb.append((char) (0x03 + 32));
sb.append((char) (0x05 + 64));
} else {
sb.append((char) (0x03 + 32));
@@
-1207,16
+1207,16
@@
public class ECMA48 implements Runnable {
*/
private String keypressToString(final TKeypress keypress) {
*/
private String keypressToString(final TKeypress keypress) {
- if ((fullDuplex == false) && (!keypress.
getIs
Key())) {
+ if ((fullDuplex == false) && (!keypress.
isFn
Key())) {
/*
* If this is a control character, process it like it came from
* the remote side.
*/
/*
* If this is a control character, process it like it came from
* the remote side.
*/
- if (keypress.getCh() < 0x20) {
- handleControlChar(keypress.getCh());
+ if (keypress.getCh
ar
() < 0x20) {
+ handleControlChar(keypress.getCh
ar
());
} else {
// Local echo for everything else
} else {
// Local echo for everything else
- printCharacter(keypress.getCh());
+ printCharacter(keypress.getCh
ar
());
}
}
}
}
@@
-1226,18
+1226,18
@@
public class ECMA48 implements Runnable {
}
// Handle control characters
}
// Handle control characters
- if ((keypress.
getCtrl()) && (!keypress.getIs
Key())) {
+ if ((keypress.
isCtrl()) && (!keypress.isFn
Key())) {
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder();
- char ch = keypress.getCh();
+ char ch = keypress.getCh
ar
();
ch -= 0x40;
sb.append(ch);
return sb.toString();
}
// Handle alt characters
ch -= 0x40;
sb.append(ch);
return sb.toString();
}
// Handle alt characters
- if ((keypress.
getAlt()) && (!keypress.getIs
Key())) {
+ if ((keypress.
isAlt()) && (!keypress.isFn
Key())) {
StringBuilder sb = new StringBuilder("\033");
StringBuilder sb = new StringBuilder("\033");
- char ch = keypress.getCh();
+ char ch = keypress.getCh
ar
();
sb.append(ch);
return sb.toString();
}
sb.append(ch);
return sb.toString();
}
@@
-1635,9
+1635,9
@@
public class ECMA48 implements Runnable {
}
// Non-alt, non-ctrl characters
}
// Non-alt, non-ctrl characters
- if (!keypress.
getIs
Key()) {
+ if (!keypress.
isFn
Key()) {
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder();
- sb.append(keypress.getCh());
+ sb.append(keypress.getCh
ar
());
return sb.toString();
}
return "";
return sb.toString();
}
return "";
@@
-3546,7
+3546,7
@@
public class ECMA48 implements Runnable {
for (int i = start; i <= end; i++) {
DisplayLine line = display.get(currentState.cursorY);
if ((!honorProtected)
for (int i = start; i <= end; i++) {
DisplayLine line = display.get(currentState.cursorY);
if ((!honorProtected)
- || ((honorProtected) && (!line.charAt(i).
get
Protect()))) {
+ || ((honorProtected) && (!line.charAt(i).
is
Protect()))) {
switch (type) {
case VT100:
switch (type) {
case VT100: