Class TokenTableau

    • Constructor Detail

      • TokenTableau

        public TokenTableau​(Effigy container,
                            java.lang.String name)
                     throws IllegalActionException,
                            NameDuplicationException
        Construct a new tableau for the model represented by the given effigy. This constructor creates a default editor frame, which is an instance of TextEditor.
        Parameters:
        container - The container.
        name - The name.
        Throws:
        IllegalActionException - If the container does not accept this entity (this should not occur).
        NameDuplicationException - If the name coincides with an attribute already in the container.
    • Method Detail

      • append

        public void append​(Token token)
                    throws IllegalActionException
        Append the specified token to the display. If the display is not a TextEditor, do nothing. Subclasses should override this with display-specific actions.
        Parameters:
        token - The token to append.
        Throws:
        IllegalActionException - If the token is not acceptable (not thrown in this base class).
      • append

        public void append​(java.util.List list)
                    throws IllegalActionException
        Append the specified tokens to the display.
        Parameters:
        list - A list of tokens.
        Throws:
        IllegalActionException - If the tokens are not acceptable (not thrown in this base class).
      • canDisplay

        public static boolean canDisplay​(Token token)
        Return true if this tableau can display the specified token.
        Parameters:
        token - A candidate token to display.
        Returns:
        True, since this tableau can display any token.
      • clear

        public void clear()
        Clear the display.
      • createFrame

        public void createFrame​(TableauFrame frame)
                         throws IllegalActionException
        Create a text editor frame to view the data. This can be overridden in derived classes to create more specialized viewers/editors. If the specified frame is not an instance of TextEditor, then it is replaced with a text editor. This is called in the constructor.
        Parameters:
        frame - The frame to use, or null if none is specified.
        Throws:
        IllegalActionException - If the frame cannot be created.