Package ptolemy.vergil.basic.export.web
Class WebExportParameters
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.vergil.basic.export.web.WebExportParameters
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class WebExportParameters extends Attribute
Container for parameters that customize web export.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Christopher Brooks and Edward A. Lee
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description ColorAttribute
backgroundColor
Background color.Parameter
copyJavaScriptFiles
If true, then make an exported web page stand alone.FileParameter
directoryToExportTo
The directory to export to.StringParameter
imageFormat
The image format to use, which can be one of "gif" (the default), "png", or "jpg".Parameter
openCompositesBeforeExport
If true, hierarchically open all composite actors in the model before exporting (so that these also get exported, and hyperlinks to them are created).Parameter
runBeforeExport
If true, run the model before exporting (to open plotter or other display windows that get exported).Parameter
showInBrowser
If true, open a web browser to display the resulting export.Parameter
usePtWebsite
If true, use the server-side includes of the Ptolemy website.-
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
-
-
Constructor Summary
Constructors Constructor Description WebExportParameters(NamedObj container, java.lang.String name)
Construct an attribute with the given name contained by the specified entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attributeChanged(Attribute attribute)
React to a change in an attribute.ExportParameters
getExportParameters()
Return the current parameter values in a data structure.boolean
parametersChanged()
Return true if the parameter values are different from the defaults.-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, 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, toString, uniqueName, validateSettables, workspace
-
-
-
-
Field Detail
-
backgroundColor
public ColorAttribute backgroundColor
Background color. By default this is blank, which indicates to use the background color of the model.
-
copyJavaScriptFiles
public Parameter copyJavaScriptFiles
If true, then make an exported web page stand alone. Instead of referencing JavaScript and image files on the ptolemy.org website, if this parameter is true, then the required files will be copied into the target directory. This is a boolean that defaults to false.
-
directoryToExportTo
public FileParameter directoryToExportTo
The directory to export to. If a relative name is given, then it is relative to the location of the model file. By default, this is blank, which will result in writing to a directory with name equal to the sanitized name of the model, and the directory will be contained in the same location where the model that contains this attribute is stored.
-
imageFormat
public StringParameter imageFormat
The image format to use, which can be one of "gif" (the default), "png", or "jpg".
-
openCompositesBeforeExport
public Parameter openCompositesBeforeExport
If true, hierarchically open all composite actors in the model before exporting (so that these also get exported, and hyperlinks to them are created). This is a boolean that defaults to false.
-
runBeforeExport
public Parameter runBeforeExport
If true, run the model before exporting (to open plotter or other display windows that get exported). Note that it is important the model have a finite run. This is a boolean that defaults to false.
-
showInBrowser
public Parameter showInBrowser
If true, open a web browser to display the resulting export. This is a boolean that defaults to true.
-
usePtWebsite
public Parameter usePtWebsite
If true, use the server-side includes of the Ptolemy website. This is a boolean that defaults to false. This parameter is marked as an expert parameter, so by default, it is not visible.
-
-
Constructor Detail
-
WebExportParameters
public WebExportParameters(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct an attribute with the given name contained by the specified entity.- Parameters:
container
- The container.name
- The name of this attribute.- Throws:
IllegalActionException
- If the attribute is not of an acceptable class for the container, or if the name contains a period.NameDuplicationException
- If the name coincides with an attribute already in the container.
-
-
Method Detail
-
attributeChanged
public void attributeChanged(Attribute attribute) throws IllegalActionException
React to a change in an attribute. This method updates the local data structure provided bygetExportParameters()
.- Overrides:
attributeChanged
in classNamedObj
- Parameters:
attribute
- The attribute that changed.- Throws:
IllegalActionException
- If the change is not acceptable to this container (not thrown in this base class).
-
getExportParameters
public ExportParameters getExportParameters()
Return the current parameter values in a data structure. If a file name has not been specified, then substitute the sanitized model name.- Returns:
- The current parameter values.
-
parametersChanged
public boolean parametersChanged()
Return true if the parameter values are different from the defaults.- Returns:
- True if the parameter values are different from the defaults.
-
-