Class FileEditorTableauFactory

  • All Implemented Interfaces:
    java.lang.Cloneable, Changeable, Configurable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class FileEditorTableauFactory
    extends TableauFactory
    This class is an attribute that creates an editor to edit a specified file or URL given by an attribute in the container of this attribute. It is similar to TextEditorTableauFactory, but instead of editing an attribute in the container, it edits a file or URL referenced by that attribute. The file or URL must be given in the container by an instance of FileParameter. If the file or URL does not exist, then it attempts to create the file and open it.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Edward A. Lee
    See Also:
    TextEditorTableauFactory, FileParameter
    Pt.AcceptedRating:
    Red (ptolemy)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • attributeName

        public StringAttribute attributeName
        The name of the file attribute giving the file name or URL.
    • Method Detail

      • createTableau

        public Tableau createTableau​(Effigy effigy)
                              throws java.lang.Exception
        Create a tableau for the specified effigy. The tableau will be created with a new unique name with the specified effigy as its container. If this factory cannot create a tableau for the given effigy (it is not an instance of PtolemyEffigy), then return null.
        Overrides:
        createTableau in class TableauFactory
        Parameters:
        effigy - The component effigy.
        Returns:
        A tableau for the effigy, or null if one cannot be created.
        Throws:
        java.lang.Exception - If the factory should be able to create a Tableau for the effigy, but something goes wrong.