public class EngineController extends Object implements PrologEngineListener
Modifier and Type | Field and Description |
---|---|
AbstractAction |
engineStateAction |
com.declarativa.interprolog.EngineController.PauseContinueAction |
pauseContinueAction |
static String |
STOP_MESSAGE |
com.declarativa.interprolog.EngineController.AbortAction |
stopAction |
Constructor and Description |
---|
EngineController(SubprocessEngine pausableEngine,
boolean autoHints) |
Modifier and Type | Method and Description |
---|---|
void |
availabilityChanged(AbstractPrologEngine source)
In addition to being messaged by the engine, this method also gets called by this controller when entering/leave pause
|
void |
disableWhenBusy(Action item) |
void |
disableWhenBusy(Component item)
This component or menu item should be enabled only when the engine is available or paused.
|
void |
disableWhenBusyOrPaused(Action item) |
void |
disableWhenBusyOrPaused(Component item) |
void |
disableWhenPaused(Component item) |
boolean |
isInPause() |
void |
javaMessaged(AbstractPrologEngine source)
The Java side is starting processing a javaMessage Prolog goal (callback) request
|
static void |
myMessage(Object target,
String method)
For those annoying situations where anonymous classes do not expose their simple methods (void result and no args) elsewhere ;-)
|
void |
queryEnded()
The user query ended
|
void |
queryStarted()
The user has started a query
|
void |
setColorsForFields(Color busyColor,
Color idleOrPausedColor,
Color needsMoreInputColor) |
void |
setHintsForFields(String busyHint,
String idleOrPausedHint,
String needsMoreInputHint) |
void |
setLabelsForState(String busy,
String idleOrPaused,
String needsMoreInputLabel) |
void |
setUItoBusy() |
void |
setUItoNeedsMoreInput() |
void |
setUItoPausedOrIdle() |
void |
stop() |
String |
willWork(AbstractPrologEngine source)
Prolog is asking the Java layer permission to continue; return non null (a reason/message) if you want to abort the Prolog computation.
|
public final AbstractAction engineStateAction
public final com.declarativa.interprolog.EngineController.PauseContinueAction pauseContinueAction
public final com.declarativa.interprolog.EngineController.AbortAction stopAction
public static final String STOP_MESSAGE
public EngineController(SubprocessEngine pausableEngine, boolean autoHints)
pausableEngine
- optional; if not null will be sent break requestsautoHints
- if true query entry fields will have a hint injected according to engine statecom.xsb.xj.util.XJEngineController
public void queryStarted()
public void queryEnded()
public String willWork(AbstractPrologEngine source)
PrologEngineListener
willWork
in interface PrologEngineListener
source
- the Prolog engine that is asking permissionAbstractPrologEngine.setTimedCallIntervall(int)
public void setUItoBusy()
public void setUItoPausedOrIdle()
public void setUItoNeedsMoreInput()
public void javaMessaged(AbstractPrologEngine source)
PrologEngineListener
javaMessaged
in interface PrologEngineListener
source
- the engine being messaged by Prologpublic void availabilityChanged(AbstractPrologEngine source)
availabilityChanged
in interface PrologEngineListener
source
- an enginepublic void disableWhenBusy(Component item)
item
- some componentpublic void disableWhenBusyOrPaused(Component item)
public void disableWhenBusyOrPaused(Action item)
public void disableWhenPaused(Component item)
public void disableWhenBusy(Action item)
public void setHintsForFields(String busyHint, String idleOrPausedHint, String needsMoreInputHint)
public void setColorsForFields(Color busyColor, Color idleOrPausedColor, Color needsMoreInputColor)
public void setLabelsForState(String busy, String idleOrPaused, String needsMoreInputLabel)
public static void myMessage(Object target, String method)
target
- method
- public boolean isInPause()
public void stop()