Interface WebExporter

  • All Known Implementing Classes:
    ExportHTMLAction

    public interface WebExporter
    Interface for an object that provides a web exporting service for a Ptolemy II model.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Edward A. Lee, Elizabeth Latronico
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Method Detail

      • defineAttribute

        boolean defineAttribute​(WebAttribute webAttribute,
                                boolean overwrite)
        Add the given web content as a new attribute. If onceOnly is true, then if identical content has already been added, then it is not added again.
        Parameters:
        webAttribute - The WebAttribute containing the content to add.
        overwrite - If true, overwrite any previously defined value for the specified attribute. If false, then do nothing if there is already an attribute with the specified name.
        Returns:
        True if the specified attribute and value was defined (i.e., if there was a previous value, it was overwritten).
      • defineElement

        void defineElement​(WebElement webElement,
                           boolean onceOnly)
        Add the given web content as a new element to the specified position. The position is expected to be one of "head", "start", or "end", where anything else is interpreted as equivalent to "end". If onceOnly is true, then if identical content has already been added to the specified position, then it is not added again.
        Parameters:
        webElement - The WebElement containing the content to add and the position.
        onceOnly - True to prevent duplicate content.
      • getExportParameters

        ExportParameters getExportParameters()
        During invocation an export, return the parameters of the export. If not currently doing an export, return null.
        Returns:
        The directory being written to.
      • getFrame

        PtolemyFrame getFrame()
        The frame (window) being exported.
        Returns:
        The frame being exported.
      • setTitle

        void setTitle​(java.lang.String title,
                      boolean showInHTML)
        Set the title to be used for the page being exported.
        Parameters:
        title - The title.
        showInHTML - True to produce an HTML title prior to the model image.