Package org.qdl_lang.gui
Class SwingTerminal.QDLHistoryKeyAdapter
- java.lang.Object
-
- java.awt.event.KeyAdapter
-
- org.qdl_lang.gui.editor.EditorKeyPressedAdapter
-
- org.qdl_lang.gui.SwingTerminal.QDLHistoryKeyAdapter
-
- All Implemented Interfaces:
KeyListener
,EventListener
- Direct Known Subclasses:
QDLSASTerminal.QDLSASHistoryKeyAdapter
- Enclosing class:
- SwingTerminal
public class SwingTerminal.QDLHistoryKeyAdapter extends EditorKeyPressedAdapter
This listens for ctrl+up or down arrows and will scroll through the input/outputs in tandem
-
-
Field Summary
-
Fields inherited from class org.qdl_lang.gui.editor.EditorKeyPressedAdapter
input, output
-
-
Constructor Summary
Constructors Constructor Description QDLHistoryKeyAdapter(WorkspaceCommands workspaceCommands, JFrame frame, org.fife.ui.rsyntaxtextarea.RSyntaxTextArea input, JTextArea output)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
arrowDown(int ndx, List<String> lines, JTextArea textArea)
protected int
arrowUp(int ndx, List<String> lines, JTextArea textArea)
void
keyPressed(KeyEvent e)
NOTE-
Methods inherited from class org.qdl_lang.gui.editor.EditorKeyPressedAdapter
createHelpMessage, doQuit, doSave, getGUIHelp, getHelp, getLineNumber, showHelp, toggleSelectionComment
-
Methods inherited from class java.awt.event.KeyAdapter
keyReleased, keyTyped
-
-
-
-
Constructor Detail
-
QDLHistoryKeyAdapter
public QDLHistoryKeyAdapter(WorkspaceCommands workspaceCommands, JFrame frame, org.fife.ui.rsyntaxtextarea.RSyntaxTextArea input, JTextArea output)
-
-
Method Detail
-
keyPressed
public void keyPressed(KeyEvent e)
NOTE
This is not just a text area, it is anRSyntaxTextArea
which masks off various keystroked for itself. A symptom of this is if you attempt to use one of the (not well documented) reserved keystrokes, you will get mysterious enter key events as it tries to reformat (or whatever) the input area. So far the list of reserved keys are- a -- select all
- c -- copy select to clipboard
- d -- delete current line
- j --(justify?)
- k -- beeps?
- v -- paste from clipbaord
- x -- cut selected to clipboard
- Specified by:
keyPressed
in interfaceKeyListener
- Overrides:
keyPressed
in classEditorKeyPressedAdapter
- Parameters:
e
-
-
-