Package org.qdl_lang.gui.editor
Class EditorKeyPressedAdapter
- java.lang.Object
- 
- java.awt.event.KeyAdapter
- 
- org.qdl_lang.gui.editor.EditorKeyPressedAdapter
 
 
- 
- All Implemented Interfaces:
- KeyListener,- EventListener
 - Direct Known Subclasses:
- QDLEditor.ControlOperations,- SwingTerminal.QDLHistoryKeyAdapter
 
 public class EditorKeyPressedAdapter extends KeyAdapter Created by Jeff Gaynor 
 on 3/20/23 at 3:56 PM
- 
- 
Constructor SummaryConstructors Constructor Description EditorKeyPressedAdapter(WorkspaceCommands workspaceCommands, JFrame frame, org.fife.ui.rsyntaxtextarea.RSyntaxTextArea input, JTextArea output)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcreateHelpMessage(String functionHelp, String text, String example)protected voiddoQuit(boolean forceQuit)protected voiddoSave()protected StringgetGUIHelp()protected StringgetHelp(String text)intgetLineNumber(int position)Returns the line number (starting at 0) of the current cursor position.voidkeyPressed(KeyEvent e)NOTEprotected voidshowHelp(String title, String message)Show's help for the selected area.protected StringtoggleSelectionComment(String selection)- 
Methods inherited from class java.awt.event.KeyAdapterkeyReleased, keyTyped
 
- 
 
- 
- 
- 
Field Detail- 
inputprotected org.fife.ui.rsyntaxtextarea.RSyntaxTextArea input 
 - 
outputprotected JTextArea output 
 
- 
 - 
Constructor Detail- 
EditorKeyPressedAdapterpublic EditorKeyPressedAdapter(WorkspaceCommands workspaceCommands, JFrame frame, org.fife.ui.rsyntaxtextarea.RSyntaxTextArea input, JTextArea output) 
 
- 
 - 
Method Detail- 
getLineNumberpublic int getLineNumber(int position) Returns the line number (starting at 0) of the current cursor position.- Returns:
 
 - 
getGUIHelpprotected String getGUIHelp() 
 - 
createHelpMessageprotected String createHelpMessage(String functionHelp, String text, String example) 
 - 
keyPressedpublic void keyPressed(KeyEvent e) NOTEThis is not just a text area, it is anRSyntaxTextAreawhich 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:
- keyPressedin interface- KeyListener
- Overrides:
- keyPressedin class- KeyAdapter
- Parameters:
- e-
 
 - 
doQuitprotected void doQuit(boolean forceQuit) 
 - 
doSaveprotected void doSave() 
 
- 
 
-