public class ConsolePanelCLIPS extends ConsoleRouterCLIPS implements javax.swing.event.CaretListener
NOTE: Minimal changes from original release, oriented to make integration over the Agent Graphic Interface and, inserting a Shell-Engine Console at run-time. (2015)
Modifier and Type | Field and Description |
---|---|
private int |
caretOffset |
(package private) java.util.ArrayList<java.lang.String> |
commandHistory |
(package private) int |
currentCommand |
(package private) int |
currentCommandCount |
private java.lang.Thread |
executionThread |
(package private) static int |
history_Commands_Max |
private boolean |
isExecuting |
(package private) int |
maxCommandCount |
buffer, clips, jta, readInputBuffer, readInputLength, readInputPosition
Constructor and Description |
---|
ConsolePanelCLIPS(java.lang.Object theEnv)
It establishes the CLIPS-router over itself.
|
Modifier and Type | Method and Description |
---|---|
void |
balanceParentheses() |
void |
caretUpdate(javax.swing.event.CaretEvent e) |
protected void |
caretUpdateAction(int dot,
int mark,
ConsolePanelCLIPS theRouter) |
void |
commandCheck() |
void |
copy() |
void |
executeCommand() |
void |
expandInputBuffer(char theChar) |
boolean |
getExecuting() |
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
private void |
moveSelectionToEnd() |
void |
paste() |
void |
print(java.lang.String routerName,
java.lang.String printString) |
void |
setExecuting(boolean value) |
private void |
switchCommand(int oldCommand,
int newCommand) |
private void |
updateCommandHistory() |
bufferAppend, bufferStatus, bufferUpdate, exit, getBanner, getBuffer, getchar, getJTextArea, getName, getPriority, keyReleased, query, resetBuffer, retainedeBuffer, setReadInputBuffer, startBuffer, stopBuffer, ungetchar
private java.lang.Thread executionThread
private boolean isExecuting
static final int history_Commands_Max
int maxCommandCount
int currentCommandCount
int currentCommand
private int caretOffset
java.util.ArrayList<java.lang.String> commandHistory
public ConsolePanelCLIPS(java.lang.Object theEnv)
NOTE: From command-line console, inside an Agent-Stage or inside an Agent-Monitor instances, it is possible to set the reference to Router through:
# > myEngine .setRouter( myShell );
theEnv
- CLIPS instance reference.public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
keyPressed
in class ConsoleRouterCLIPS
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
keyTyped
in class ConsoleRouterCLIPS
public void balanceParentheses()
public void commandCheck()
public void print(java.lang.String routerName, java.lang.String printString)
print
in interface net.sf.clipsrules.jni.Router
print
in class ConsoleRouterCLIPS
routerName
- Name of router for the CLIPS instance.printString
- The character of stream from router.public void copy()
public void paste()
public void expandInputBuffer(char theChar)
theChar
- Character to covert to UTF-8 schema.private void moveSelectionToEnd()
public boolean getExecuting()
public void setExecuting(boolean value)
value
- Denote that CLIPS Engine its inside a cycle of processing.private void updateCommandHistory()
private void switchCommand(int oldCommand, int newCommand)
public void executeCommand()
public void caretUpdate(javax.swing.event.CaretEvent e)
caretUpdate
in interface javax.swing.event.CaretListener
protected void caretUpdateAction(int dot, int mark, ConsolePanelCLIPS theRouter)
dot
- Final location of caret.mark
- Previous location of caret.theRouter
- Name of router which receives the data.