public class ThinletConsole extends Thinlet implements OutputListener, QueryListener
write/1).Container.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description | 
|---|
ThinletConsole(alice.tuprologx.ide.IDE ide)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
acceptSolution()
Accept the found solution to the current goal, showing it on the console
 and closing all the possible open alternatives. 
 | 
void | 
addPropertyChangeListener(PropertyChangeListener listener)  | 
void | 
clearOutput()  | 
void | 
enableClearOutput()  | 
protected void | 
enableSolutionCommands(boolean flag)
Enable or disable solution-related buttons. 
 | 
protected void | 
enableSolveCommands(boolean flag)
Enable or disable the possibility of asking for goals to be solved. 
 | 
protected void | 
enableStopButton(boolean flag)  | 
protected String | 
getGoal()
Get the goal entered in the input field. 
 | 
void | 
getNextSolution()
Try to solve the next open alternative for the current goal. 
 | 
String | 
getStatusMessage()
Get the console status as a  
java.lang.String message. | 
void | 
newQueryResultAvailable(QueryEvent event)  | 
void | 
onOutput(OutputEvent event)  | 
void | 
removePropertyChangeListener(PropertyChangeListener listener)  | 
void | 
setEngine(Prolog engine)
Set the Prolog engine referenced by the console. 
 | 
void | 
setInputField(alice.tuprologx.ide.InputField inputField)
Set the input field used by the console to retrieve queries. 
 | 
void | 
setStatusMessage(String message)
Set the console status. 
 | 
protected void | 
showSolution(String solution)
Show a solution to the current goal in the apposite solution area. 
 | 
void | 
solve()
Get the goal in the query field, feed a Prolog engine with it, and
 display the solution provided. 
 | 
void | 
stopEngine()  | 
add, add, add, characters, create, destroy, endElement, find, find, getBoolean, getChoice, getClass, getCount, getCount, getDesktop, getDOMAttribute, getDOMCount, getDOMNode, getDOMText, getIcon, getIcon, getIcon, getInteger, getItem, getItem, getItems, getItems, getParent, getPreferredSize, getProperty, getSelectedIndex, getSelectedItem, getSelectedItems, getString, isFocusTraversable, paint, parse, parse, parse, parse, parseDOM, parseXML, processEvent, putProperty, remove, removeAll, removeAll, requestFocus, run, setBoolean, setChoice, setColors, setFont, setIcon, setInteger, setMethod, setString, startElement, updateadd, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic void solve()
public void setEngine(Prolog engine)
engine - an alice.tuprolog.Prolog engine.public void setInputField(alice.tuprologx.ide.InputField inputField)
inputField - the input field we want the console to use.public void setStatusMessage(String message)
message - The message describing the new status of the console.public String getStatusMessage()
java.lang.String message.java.lang.String message.public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in class Containerpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in class Componentprotected String getGoal()
protected void showSolution(String solution)
solution - The solution to be shown.protected void enableSolutionCommands(boolean flag)
flag - true if the buttons have to be enabled, false otherwise.protected void enableStopButton(boolean flag)
protected void enableSolveCommands(boolean flag)
flag - true if the query device has to be enabled, false otherwise.public void getNextSolution()
public void acceptSolution()
public void stopEngine()
public void onOutput(OutputEvent event)
onOutput in interface OutputListenerpublic void newQueryResultAvailable(QueryEvent event)
newQueryResultAvailable in interface QueryListenerpublic void enableClearOutput()
public void clearOutput()
Copyright © 2015. All rights reserved.