Class LiveLink
- java.lang.Object
-
- 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)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.data.expr.Variable
Variable.CircularDependencyError, Variable.VariableScope
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
Nested classes/interfaces inherited from interface ptolemy.kernel.util.Settable
Settable.Visibility
-
-
Field Summary
-
Fields inherited from class ptolemy.data.expr.Variable
_currentExpression, _needsEvaluation, _parserScope, _parseTreeValid, _suppressVariableSubstitution, _valueListeners
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
Fields inherited from interface ptolemy.kernel.util.Settable
EXPERT, FULL, NONE, NOT_EDITABLE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createEditor()
Create an editor.void
createEditor(NamedObj object)
Create an editor for configuring the specified object.void
createEditor(NamedObj object, java.awt.Frame parent)
Create a doc viewer for the specified object with the specified parent window.-
Methods inherited from class ptolemy.data.expr.FileParameter
asFile, asURL, clone, close, getBaseDirectory, isOutput, openForReading, openForWriting, openForWriting, setBaseDirectory
-
Methods inherited from class ptolemy.data.expr.StringParameter
stringValue
-
Methods inherited from class ptolemy.data.expr.Parameter
addChoice, exportMoML, getChoices, removeAllChoices, removeChoice
-
Methods inherited from class ptolemy.data.expr.Variable
_description, _evaluate, _getCurrentExpression, _notifyValueListeners, _parseIfNecessary, _propagate, _propagateToValueListeners, _propagateValue, _setToken, _setTokenAndNotify, addValueListener, attributeChanged, getDeclaredType, getExpression, getFreeIdentifiers, getParserScope, getScope, getScope, getToken, getType, getTypeTerm, getValueAsString, getVariable, getVisibility, invalidate, isKnown, isLazy, isStringMode, isSuppressVariableSubstitution, isTypeAcceptable, removeValueListener, reset, setContainer, setExpression, setLazy, setName, setParseTreeEvaluator, setStringMode, setSuppressVariableSubstitution, setToken, setToken, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, setUnknown, setValueListenerAsWeakDependency, setVisibility, stringRepresentation, toString, typeConstraintList, typeConstraints, validate, valueChanged
-
Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute
getDefaultExpression
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getFullName, getName, getName, setName
-
Methods inherited from interface ptolemy.kernel.util.Settable
addValueListener, getDefaultExpression, getDisplayName, getExpression, getValueAsString, getVisibility, removeValueListener, setExpression, setVisibility, validate
-
-
-
-
Constructor Detail
-
LiveLink
public LiveLink(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a factory with the specified container and name.- Parameters:
container
- The container.name
- The name of the factory.- Throws:
IllegalActionException
- If the factory is not of an acceptable attribute for the container.NameDuplicationException
- If the name coincides with an attribute already in the container.
-
-
Method Detail
-
createEditor
public void createEditor()
Create an editor. This editor will have no parent window.- Specified by:
createEditor
in interfaceEditable
-
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 interfaceEditable
- 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 interfaceEditable
- 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.
-
-