Package ptolemy.vergil.basic.export.web
Class ParameterDisplayIconScript
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.kernel.util.AbstractSettableAttribute
-
- ptolemy.data.expr.Variable
-
- ptolemy.data.expr.Parameter
-
- ptolemy.data.expr.StringParameter
-
- ptolemy.vergil.basic.export.web.WebContent
-
- ptolemy.vergil.basic.export.web.Script
-
- ptolemy.vergil.basic.export.web.IconScript
-
- ptolemy.vergil.basic.export.web.DefaultIconScript
-
- ptolemy.vergil.basic.export.web.ParameterDisplayIconScript
-
- All Implemented Interfaces:
java.lang.Cloneable
,HasTypeConstraints
,Typeable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
,Settable
,ValueListener
,WebExportable
public class ParameterDisplayIconScript extends DefaultIconScript
A parameter specifying default JavaScript actions to associate with icons in model. Putting this into a model causes an action to be associated with each icon (as specified by the include and instancesOf parameters) that, on moving the mouse over the icon, displays in a table the parameters of the corresponding Ptolemy II object. The table is displayed in a tooltip.This parameter is designed to be included in a Configuration file to specify global default behavior for export to Web. Just put it in the top level of the Configuration, and this behavior will be provided by default.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
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.vergil.basic.export.web.DefaultIconScript
include, instancesOf
-
Fields inherited from class ptolemy.vergil.basic.export.web.IconScript
endText, jQueryLibraries, startText
-
Fields inherited from class ptolemy.vergil.basic.export.web.Script
evaluateScript, eventType, script
-
Fields inherited from class ptolemy.vergil.basic.export.web.WebContent
_icon, displayText, height, width
-
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
-
-
Constructor Summary
Constructors Constructor Description ParameterDisplayIconScript(NamedObj container, java.lang.String name)
Create an instance of this parameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_provideDefaultAttributes(NamedObj object, WebExporter exporter)
Override the base class to provide the parameter table for the specified object.protected void
_provideElements(WebExporter exporter)
Provide default content to the specified web exporter to be included in a web page for the container of this object for objects that do not override onmouseover.static java.lang.String
getParameterTable(NamedObj object)
Get an HTML table describing the parameters of the object.boolean
isOverwriteable()
Override base class since content here should only be added if it does not exist already.-
Methods inherited from class ptolemy.vergil.basic.export.web.DefaultIconScript
_provideAttributes
-
Methods inherited from class ptolemy.vergil.basic.export.web.Script
getMimeType
-
Methods inherited from class ptolemy.vergil.basic.export.web.WebContent
attributeChanged, clone, provideContent
-
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, 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
getDisplayName
-
Methods inherited from interface ptolemy.vergil.basic.export.web.WebExportable
getMimeType, provideContent
-
-
-
-
Constructor Detail
-
ParameterDisplayIconScript
public ParameterDisplayIconScript(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Create an instance of this parameter.- Parameters:
container
- The container.name
- The name.- Throws:
IllegalActionException
- If the superclass throws it.NameDuplicationException
- If the superclass throws it.
-
-
Method Detail
-
isOverwriteable
public boolean isOverwriteable()
Override base class since content here should only be added if it does not exist already.- Specified by:
isOverwriteable
in interfaceWebExportable
- Overrides:
isOverwriteable
in classScript
- Returns:
- False, since default content should only be added if no content already exists
-
getParameterTable
public static java.lang.String getParameterTable(NamedObj object)
Get an HTML table describing the parameters of the object.- Parameters:
object
- The Ptolemy object to return a table for.- Returns:
- An HTML table displaying the parameter values for the specified object, or the string "Has no parameters" if the object has no parameters.
-
_provideDefaultAttributes
protected void _provideDefaultAttributes(NamedObj object, WebExporter exporter) throws IllegalActionException
Override the base class to provide the parameter table for the specified object. Provide default content to the specified web exporter to be included in a web page for the container of this object for objects that do not override onmouseover. This class provides an area attribute of type "onmouseover" that displays the parameter values of the object and one of type "onmouseout" that clears that display.- Overrides:
_provideDefaultAttributes
in classDefaultIconScript
- Parameters:
exporter
- The exporter to which to provide the content.object
- The object which provides the content.- Throws:
IllegalActionException
- If there is a problem creating the content or if there is a name duplication with the created attributes
-
_provideElements
protected void _provideElements(WebExporter exporter) throws IllegalActionException
Provide default content to the specified web exporter to be included in a web page for the container of this object for objects that do not override onmouseover. This class provides an HTML table containing parameter names and values, plus a placeholder <div> tag which the script writes information in upon onmouseover().- Overrides:
_provideElements
in classIconScript
- Parameters:
exporter
- The exporter to which to provide the content.- Throws:
IllegalActionException
- If evaluating the value of this parameter fails.
-
-