public class UserInteractiveShell extends TypedAtomicActor implements Placeable, ShellInterpreter
| Modifier and Type | Class and Description |
|---|---|
class |
UserInteractiveShell.ShellFrame
The frame that is created by an instance of ShellTableau.
|
class |
UserInteractiveShell.ShellTableau
Version of ExpressionShellTableau that records the size of the display
when it is closed.
|
Entity.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
TypedIOPort |
input
The input port.
|
TypedIOPort |
output
The output port.
|
DoubleShellTextAreaPanel |
shellPanel
The shell window object.
|
_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
UserInteractiveShell(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_exportMoMLContents(java.io.Writer output,
int depth)
Write a MoML description of the contents of this object.
|
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace.
|
java.lang.String |
evaluateCommand(java.lang.String command)
Evaluate the specified command.
|
void |
fire()
Read and display the input, then wait for user input and produce the user
data on the output.
|
java.lang.String |
getOutput()
Get the output string to be sent.
|
void |
initialize()
If the shell has not already been created, create it.
|
boolean |
isCommandComplete(java.lang.String command)
Return true if the specified command is complete (ready to be
interpreted).
|
void |
place(java.awt.Container container)
Specify the container into which this shell should be placed.
|
boolean |
postfire()
Override the base class to return false if the user has typed "quit" or
"exit".
|
void |
setContainer(CompositeEntity container)
Override the base class to remove the shell from its graphical container
if the argument is null.
|
void |
setOutput(java.lang.String value)
Specify an output string to be sent.
|
void |
stop()
Override the base class to call notifyAll() to get out of any waiting.
|
void |
wrapup()
Override the base class to make the shell uneditable.
|
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stopFire, terminate_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName_addPort, _description, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, isStrict, iterate, prefire, stopFire, terminateaddInitializable, preinitialize, removeInitializabledescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic TypedIOPort input
public TypedIOPort output
public DoubleShellTextAreaPanel shellPanel
public UserInteractiveShell(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container - The container.name - The name of this actor.IllegalActionException - If the actor cannot be contained by the proposed
container.NameDuplicationException - If the container already has an actor with this name.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone in class TypedAtomicActorworkspace - The workspace for the new object.java.lang.CloneNotSupportedException - If a derived class has an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String),
NamedObj.setDeferringChangeRequests(boolean)public java.lang.String evaluateCommand(java.lang.String command) throws java.lang.Exception
evaluateCommand in interface ShellInterpretercommand - The command.java.lang.Exception - If something goes wrong processing the command.ShellTextArea.returnResult(String)public void fire() throws IllegalActionException
fire in interface Executablefire in class AtomicActor<TypedIOPort>IllegalActionException - If producing the output causes an exception.public java.lang.String getOutput()
public void initialize() throws IllegalActionException
initialize in interface Initializableinitialize in class AtomicActor<TypedIOPort>IllegalActionException - If the parent class throws it.public boolean isCommandComplete(java.lang.String command)
isCommandComplete in interface ShellInterpretercommand - The command.public void place(java.awt.Container container)
public boolean postfire() throws IllegalActionException
postfire in interface Executablepostfire in class AtomicActor<TypedIOPort>IllegalActionException - If the superclass throws it.public void setContainer(CompositeEntity container) throws IllegalActionException, NameDuplicationException
setContainer in class AtomicActor<TypedIOPort>container - The proposed container.IllegalActionException - If the base class throws it.NameDuplicationException - If the base class throws it.ComponentEntity.getContainer()public void setOutput(java.lang.String value)
value - An output string to be sent.getOutput()public void stop()
stop in interface Executablestop in class AtomicActor<TypedIOPort>public void wrapup() throws IllegalActionException
wrapup in interface Initializablewrapup in class AtomicActor<TypedIOPort>IllegalActionException - If the parent class throws it.protected void _exportMoMLContents(java.io.Writer output, int depth) throws java.io.IOException
_exportMoMLContents in class Entity<TypedIOPort>output - The output stream to write to.depth - The depth in the hierarchy, to determine indenting.java.io.IOException - If an I/O error occurs.NamedObj.exportMoML(Writer, int)