Class TextEditorTableau.Factory

    • Field Detail

      • syntaxStyle

        public StringAttribute syntaxStyle
        The style of the text to be edited. This may or may not be supported. If the package "org.fife.ui.rsyntaxtextarea" is found in the classpath, then the supported styles include "text/plain", "text/c", "text/clojure", "text/cpp", "text/cs", "text/css", "text/dtd", "text/fortran", "text/groovy", "text/html", "text/java", "text/javascript", "text/json", "text/jsp", "text/latex", "text/makefile", "text/perl", "text/php", "text/properties", "text/python", "text/ruby", "text/sas", "text/scala", "text/sql", "text/tcl", "text/unix", "text/vb", "text/bat", and "text/xml".
    • Method Detail

      • createTableau

        public Tableau createTableau​(Effigy effigy)
                              throws java.lang.Exception
        If the specified effigy is a TextEffigy and it already contains a tableau named "textTableau", then return that tableau; otherwise, create a new instance of TextEditorTableau in the specified effigy, and name it "textTableau" and return that tableau. If the specified effigy is not an instance of TextEffigy, but contains an instance of TextEffigy, then open a tableau for that effigy. If it is a PtolemyEffigy, then create a text effigy with the MoML representation of the model. Finally, if is not a TextEffigy or a PtolemyEffigy, and it does not contain a TextEffigy, then attempt to open its URL and display its date by creating a text effigy, which will then be contained by the specified effigy. If all of this fails, 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 TableauFactory
        Parameters:
        effigy - The effigy.
        Returns:
        A text editor tableau, or null if one cannot be found or created.
        Throws:
        java.lang.Exception - If the factory should be able to create a tableau for the effigy, but something goes wrong.