Package org.qdl_lang.gui
Class SwingTerminal
- java.lang.Object
- 
- org.qdl_lang.gui.SwingTerminal
 
- 
- All Implemented Interfaces:
- TerminalInterface
 - Direct Known Subclasses:
- QDLSASTerminal
 
 public class SwingTerminal extends Object implements TerminalInterface Created by Jeff Gaynor 
 on 8/9/22 at 7:12 AM
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classSwingTerminal.QDLHistoryKeyAdapterThis listens for ctrl+up or down arrows and will scroll through the input/outputs in tandem
 - 
Field SummaryFields Modifier and Type Field Description protected JFrameframeprotected static StringsyntaxEditStyle
 - 
Constructor SummaryConstructors Constructor Description SwingTerminal()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JComponent$$$getRootComponent$$$()voidclearCurrentLine()Map<String,String>getCharMap()StringBuffergetCurrentLine()org.fife.ui.rsyntaxtextarea.RSyntaxTextAreagetInput()JPanelgetMainPanel()JTextAreagetOutput()JPanelgetPanel1()JLabelgetPrompt()QDLSwingIOgetQdlSwingIO()StringgetResultText()WorkspaceCommandsgetWorkspaceCommands()protected voidinit()Initialize this with internal state, such as the listeners andDataforQDLSwingIO.static voidmain(String[] args)protected voidrunQDL()voidsetPrompt(String text)voidsetResultText(String x)org.fife.ui.autocomplete.DefaultCompletionProvidersetup(JFrame frame1, List<String> functions)protected voidsetupListeners()This is called in thesetup(JFrame, List)method.protected voidsetupWS(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)Sets up this terminal to run QDL.voidsetWorkspaceCommands(WorkspaceCommands workspaceCommands)protected voidshowHelp(String title, String message)Show's help for the selected area.voidshutdown()
 
- 
- 
- 
Method Detail- 
getMainPanelpublic JPanel getMainPanel() 
 - 
getPanel1public JPanel getPanel1() 
 - 
getInputpublic org.fife.ui.rsyntaxtextarea.RSyntaxTextArea getInput() 
 - 
getOutputpublic JTextArea getOutput() 
 - 
getPromptpublic JLabel getPrompt() 
 - 
setPromptpublic void setPrompt(String text) - Specified by:
- setPromptin interface- TerminalInterface
 
 - 
getCurrentLinepublic StringBuffer getCurrentLine() - Specified by:
- getCurrentLinein interface- TerminalInterface
 
 - 
clearCurrentLinepublic void clearCurrentLine() - Specified by:
- clearCurrentLinein interface- TerminalInterface
 
 - 
setupListenersprotected void setupListeners() This is called in thesetup(JFrame, List)method. Override as needed.
 - 
initprotected void init() Initialize this with internal state, such as the listeners andDataforQDLSwingIO. Should be called in constructor.
 - 
$$$getRootComponent$$$public JComponent $$$getRootComponent$$$() 
 - 
showHelpprotected void showHelp(String title, String message) Show's help for the selected area. Note that this allows for editing and copy paste to the main window (standard Swing dialog does not)- Parameters:
- title-
- message-
 
 - 
setResultTextpublic void setResultText(String x) - Specified by:
- setResultTextin interface- TerminalInterface
 
 - 
getResultTextpublic String getResultText() - Specified by:
- getResultTextin interface- TerminalInterface
 
 - 
getQdlSwingIOpublic QDLSwingIO getQdlSwingIO() 
 - 
getCharMappublic Map<String,String> getCharMap() - Specified by:
- getCharMapin interface- TerminalInterface
 
 - 
setuppublic org.fife.ui.autocomplete.DefaultCompletionProvider setup(JFrame frame1, List<String> functions) 
 - 
setupWSprotected void setupWS(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws ThrowableSets up this terminal to run QDL.- Throws:
- Throwable
 
 - 
getWorkspaceCommandspublic WorkspaceCommands getWorkspaceCommands() 
 - 
setWorkspaceCommandspublic void setWorkspaceCommands(WorkspaceCommands workspaceCommands) 
 - 
shutdownpublic void shutdown() - Specified by:
- shutdownin interface- TerminalInterface
 
 
- 
 
-