Class LiveLink

  • All Implemented Interfaces:
    java.lang.Cloneable, Editable, HasTypeConstraints, Typeable, FileOrURLAccessor, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable, Settable, ValueListener

    public class LiveLink
    extends FileParameter
    implements Editable
    An attribute that provides a link to a specified URL. This can be contained by any Ptolemy II object, and when a user double clicks on the icon for that object, the result is to open the specified URL. To set the URL, you either Alt-double click on the container, right click on an icon for this parameter and select Configure, or right click on the container and select Configure.

    A common way to use this attribute is to put a text annotation in a model with text something like "See also Foo", where "Foo" is the name of another related model. Drag an instance of this LiveLink attribute onto the text annotation. Alt double click (or right click and select Configure) on the text annotation to set the file name for the model Foo to link to a file or a URL to link to a web page. The file name can be relative to the location of the model containing the annotation. It can also have any of the forms supported by FileParameter. For example, a file name can begin with $PTII, indicating that the file is in the Ptolemy II installation tree.

    The default URL is "http://ptolemy.org#in_browser", which is the home page of the Ptolemy Project with an additional annotation indicating that the page should be opened in a browser. The suffix "#in_browser" will always be interpreted this way. Without this suffix, Vergil will be used to open the URL. Note that Vergil's HTML viewer does not handle many modern pages well.

    See also ptolemy.vergil.basic.export.web.IconLink.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Edward A. Lee
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Yellow (eal)
    • Method Detail

      • createEditor

        public void createEditor()
        Create an editor. This editor will have no parent window.
        Specified by:
        createEditor in interface Editable
      • createEditor

        public void createEditor​(NamedObj object)
        Create an editor for configuring the specified object. This editor will have no parent window.
        Specified by:
        createEditor in interface Editable
        Parameters:
        object - The object to configure.
      • createEditor

        public void createEditor​(NamedObj object,
                                 java.awt.Frame parent)
        Create a doc viewer for the specified object with the specified parent window.
        Specified by:
        createEditor in interface Editable
        Parameters:
        object - The object to configure, which is required to an instance of DocAttribute.
        parent - The parent window, which is required to be an instance of TableauFrame.