Class WebContent

    • Field Detail

      • displayText

        public StringParameter displayText
        Parameter giving the text to display in the Ptolemy model. This defaults to "Content for Export to Web".
      • height

        public Parameter height
        Parameter specifying the height of the editing box. This is an int that defaults to 20.
      • width

        public Parameter width
        Parameter specifying the width of the editing box. This is an int that defaults to 60.
    • Method Detail

      • clone

        public java.lang.Object clone​(Workspace workspace)
                               throws java.lang.CloneNotSupportedException
        Clone the object into the specified workspace.
        Overrides:
        clone in class Parameter
        Parameters:
        workspace - The workspace for the new object.
        Returns:
        A new NamedObj.
        Throws:
        java.lang.CloneNotSupportedException - If any of the attributes cannot be cloned.
        See Also:
        Object.clone()
      • provideContent

        public void provideContent​(WebExporter exporter)
                            throws IllegalActionException
        Provide content to the specified web exporter. This may include, for example, HTML pages and fragments, Javascript function definitions and calls, CSS styling, and more. Throw an IllegalActionException if something is wrong with the web content. Calls two methods, _provideAttributes() for generating content that would be an attribute of an element and _provideElements() for generating standalone elements. Note that attributes may refer to other elements; therefore, the provideContent() method always calls both _provideAttributes() and _provideElements(). For example, a HTML attribute for a Javascript method call: onclick="runMethod()" requires that a <script> function runMethod() { } </script> element be defined. Subclasses should override _provideAttributes() and _provideElements().
        Specified by:
        provideContent in interface WebExportable
        Parameters:
        exporter - The web exporter to be used
        Throws:
        IllegalActionException - If something is wrong with the web content.
      • _provideAttributes

        protected void _provideAttributes​(WebExporter exporter)
                                   throws IllegalActionException
        Generate attribute web content. Should call WebExporter's defineAttribute() method. Subclasses should override. Please also see WebAttribute
        Parameters:
        exporter - The WebExporter to write content to
        Throws:
        IllegalActionException - If there is a problem creating the web content.
      • _provideElements

        protected void _provideElements​(WebExporter exporter)
                                 throws IllegalActionException
        Generate element web content. Should call WebExporter's defineElement() method. Subclasses should override. Please also see WebElement
        Parameters:
        exporter - The WebExporter to write content to
        Throws:
        IllegalActionException - If there is a problem creating the web content.