Class InteractiveDialog

    • Field Detail

      • input

        public TypedIOPort input
        The input port. By default, this has undeclared type. If backward type inference is enabled, then it has type general. In either case, it can receive any data type. If it receives token of type string, it strips off the surrounding double quotes before displaying the value.
      • terminateWithNewline

        public Parameter terminateWithNewline
        If true, append a newline to each output string. This is a boolean that defaults to false.
      • userDialog

        public UserDialog userDialog
        The dialog window object.
    • Method Detail

      • evaluateCommand

        public java.lang.String evaluateCommand​(java.lang.String command)
                                         throws java.lang.Exception
        Record the specified command and request a firing to send it to the output.
        Specified by:
        evaluateCommand in interface ShellInterpreter
        Parameters:
        command - The command.
        Returns:
        Null to indicate that the command evaluation is not complete.
        Throws:
        java.lang.Exception - If something goes wrong processing the command.
        See Also:
        ShellTextArea.returnResult(String)
      • isCommandComplete

        public boolean isCommandComplete​(java.lang.String command)
        Return true if the specified command is complete (ready to be interpreted).
        Specified by:
        isCommandComplete in interface ShellInterpreter
        Parameters:
        command - The command.
        Returns:
        True.
      • place

        public void place​(java.awt.Container container)
        Specify the container into which this shell should be placed. This method needs to be called before the first call to initialize(). Otherwise, the shell will be placed in its own frame. The background of the plot is set equal to that of the container (unless it is null).
        Specified by:
        place in interface Placeable
        Parameters:
        container - The container into which to place the shell, or null to specify that a new shell should be created.
      • setDisplayName

        public void setDisplayName​(java.lang.String name)
        Set a name to present to the user.

        If the Plot window has been rendered, then the title of the Plot window will be updated to the value of the name parameter.

        Overrides:
        setDisplayName in class NamedObj
        Parameters:
        name - A name to present to the user.
        See Also:
        NamedObj.getDisplayName()
      • _customTypeConstraints

        protected java.util.Set<Inequality> _customTypeConstraints()
        Set the input port greater than or equal to BaseType.GENERAL in case backward type inference is enabled and the input port has no type declared.
        Overrides:
        _customTypeConstraints in class TypedAtomicActor
        Returns:
        A set of inequalities.
      • _exportMoMLContents

        protected void _exportMoMLContents​(java.io.Writer output,
                                           int depth)
                                    throws java.io.IOException
        Write a MoML description of the contents of this object. This overrides the base class to make sure that the current frame properties, if there is a frame, are recorded.
        Overrides:
        _exportMoMLContents in class Entity<TypedIOPort>
        Parameters:
        output - The output stream to write to.
        depth - The depth in the hierarchy, to determine indenting.
        Throws:
        java.io.IOException - If an I/O error occurs.
        See Also:
        NamedObj.exportMoML(Writer, int)