Package ptolemy.vergil.pdfrenderer
Class PDFIcon
- java.lang.Object
- 
- ptolemy.kernel.util.NamedObj
- 
- ptolemy.kernel.util.Attribute
- 
- ptolemy.vergil.icon.EditorIcon
- 
- ptolemy.vergil.icon.DynamicEditorIcon
- 
- ptolemy.vergil.pdfrenderer.PDFIcon
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- Changeable,- Debuggable,- DebugListener,- Derivable,- IconAttribute,- ModelErrorHandler,- MoMLExportable,- Moveable,- Nameable
 
 public class PDFIcon extends DynamicEditorIcon An icon that displays a specified PDF page.This class uses pdf-renderer, obtainable from https://pdf-renderer.dev.java.net/. This is an "an open source, all Java library which renders PDF documents to the screen using Java2D." By using this icon, an actor or attribute in Vergil can be defined by a PDF file. Using this icon requires that PDFRenderer.jar in the classpath, it is usually found in $PTII/lib/PDFRenderer.jar. - Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Red (johnr)
- Pt.ProposedRating:
- Yellow (eal)
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObjNamedObj.ContainedObjectsIterator
 
- 
 - 
Field Summary- 
Fields inherited from class ptolemy.vergil.icon.DynamicEditorIcon_figures
 - 
Fields inherited from class ptolemy.vergil.icon.EditorIcon_containerToBe, _iconCache
 - 
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
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone(Workspace workspace)Clone the object into the specified workspace.FigurecreateBackgroundFigure()Create a new default background figure, which is an instance of PDFFigure.voidsetPage(com.sun.pdfview.PDFPage page)Specify an PDF page to display.voidsetScale(double scalePercentage)Specify a scaling percentage of the PDF page.- 
Methods inherited from class ptolemy.vergil.icon.DynamicEditorIcon_addLiveFigure, _liveFigureIterator, _trimLiveFigures
 - 
Methods inherited from class ptolemy.vergil.icon.EditorIcon_createDefaultBackgroundFigure, _isPropertySet, _recreateFigure, createFigure, createIcon, getContainerOrContainerToBe, setContainerToBe
 - 
Methods inherited from class ptolemy.kernel.util.Attribute_checkContainer, _getContainedObject, _propagateExistence, 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, attributeChanged, 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
 
- 
 
- 
- 
- 
Constructor Detail- 
PDFIconpublic PDFIcon(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException Create a new icon with the given name in the given container.- Parameters:
- container- The container.
- name- The name of the attribute.
- Throws:
- IllegalActionException- If the attribute is not of an acceptable class for the container.
- NameDuplicationException- If the name coincides with an attribute already in the container.
 
 
- 
 - 
Method Detail- 
clonepublic java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException Clone the object into the specified workspace. The new object is not added to the directory of that workspace (you must do this yourself if you want it there). The result is an object with no container.- Overrides:
- clonein class- DynamicEditorIcon
- Parameters:
- workspace- The workspace for the cloned object.
- Returns:
- The new Attribute.
- Throws:
- java.lang.CloneNotSupportedException- Not thrown in this base class
- See Also:
- NamedObj.exportMoML(Writer, int, String),- NamedObj.setDeferringChangeRequests(boolean)
 
 - 
createBackgroundFigurepublic Figure createBackgroundFigure() Create a new default background figure, which is an instance of PDFFigure.- Overrides:
- createBackgroundFigurein class- EditorIcon
- Returns:
- A figure representing the specified PDF page.
 
 - 
setPagepublic void setPage(com.sun.pdfview.PDFPage page) Specify an PDF page to display.- Parameters:
- page- The PDF page to display.
 
 - 
setScalepublic void setScale(double scalePercentage) Specify a scaling percentage of the PDF page.- Parameters:
- scalePercentage- The scale percentage.
 
 
- 
 
-