Class SimpleTableau.TopFactory

    • Method Detail

      • createTableau

        public Tableau createTableau​(Effigy effigy)
                              throws java.lang.Exception
        Create a tableau to run the model associated with the specified effigy. The top-level effigy, as returned by Effigy.masterEffigy(), is the one that is run. If that effigy already contains a tableau named "simpleTableau", then return that tableau; otherwise, create a new instance of SimpleTableau for the top effigy, and name it "simpleTableau". If the specified effigy is not an instance of PtolemyEffigy, then do not create a tableau and return null. It is the responsibility of callers of this method to check the return value and call show().
        Overrides:
        createTableau in class SimpleTableau.Factory
        Parameters:
        effigy - The model effigy.
        Returns:
        A new run tableau if the effigy is a PtolemyEffigy, or null otherwise.
        Throws:
        java.lang.Exception - If the factory should be able to create a tableau for the effigy, but something goes wrong.