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 Summary
Nested Classes Modifier and Type Class Description class
SwingTerminal.QDLHistoryKeyAdapter
This listens for ctrl+up or down arrows and will scroll through the input/outputs in tandem
-
Field Summary
Fields Modifier and Type Field Description protected JFrame
frame
protected static String
syntaxEditStyle
-
Constructor Summary
Constructors Constructor Description SwingTerminal()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JComponent
$$$getRootComponent$$$()
void
clearCurrentLine()
Map<String,String>
getCharMap()
StringBuffer
getCurrentLine()
org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
getInput()
JPanel
getMainPanel()
JTextArea
getOutput()
JPanel
getPanel1()
JLabel
getPrompt()
QDLSwingIO
getQdlSwingIO()
String
getResultText()
WorkspaceCommands
getWorkspaceCommands()
protected void
init()
Initialize this with internal state, such as the listeners andData
forQDLSwingIO
.static void
main(String[] args)
protected void
runQDL()
void
setPrompt(String text)
void
setResultText(String x)
void
setup(JFrame frame1, List<String> functions)
protected void
setupListeners()
This is called in thesetup(JFrame, List)
method.protected void
setupWS(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
Sets up this terminal to run QDL.void
setWorkspaceCommands(WorkspaceCommands workspaceCommands)
protected void
showHelp(String title, String message)
Show's help for the selected area.void
shutdown()
-
-
-
Method Detail
-
getMainPanel
public JPanel getMainPanel()
-
getPanel1
public JPanel getPanel1()
-
getInput
public org.fife.ui.rsyntaxtextarea.RSyntaxTextArea getInput()
-
getOutput
public JTextArea getOutput()
-
getPrompt
public JLabel getPrompt()
-
setPrompt
public void setPrompt(String text)
- Specified by:
setPrompt
in interfaceTerminalInterface
-
getCurrentLine
public StringBuffer getCurrentLine()
- Specified by:
getCurrentLine
in interfaceTerminalInterface
-
clearCurrentLine
public void clearCurrentLine()
- Specified by:
clearCurrentLine
in interfaceTerminalInterface
-
setupListeners
protected void setupListeners()
This is called in thesetup(JFrame, List)
method. Override as needed.
-
init
protected void init()
Initialize this with internal state, such as the listeners andData
forQDLSwingIO
. Should be called in constructor.
-
$$$getRootComponent$$$
public JComponent $$$getRootComponent$$$()
-
showHelp
protected 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
-
-
setResultText
public void setResultText(String x)
- Specified by:
setResultText
in interfaceTerminalInterface
-
getResultText
public String getResultText()
- Specified by:
getResultText
in interfaceTerminalInterface
-
getQdlSwingIO
public QDLSwingIO getQdlSwingIO()
-
getCharMap
public Map<String,String> getCharMap()
- Specified by:
getCharMap
in interfaceTerminalInterface
-
setupWS
protected void setupWS(edu.uiuc.ncsa.security.util.cli.InputLine inputLine) throws Throwable
Sets up this terminal to run QDL.- Throws:
Throwable
-
getWorkspaceCommands
public WorkspaceCommands getWorkspaceCommands()
-
setWorkspaceCommands
public void setWorkspaceCommands(WorkspaceCommands workspaceCommands)
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceTerminalInterface
-
-