ptolemy.vergil.kernel.attributes
Class DocumentationAttribute

java.lang.Object
  extended byptolemy.kernel.util.NamedObj
      extended byptolemy.kernel.util.Attribute
          extended byptolemy.vergil.kernel.attributes.DocumentationAttribute
All Implemented Interfaces:
Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Nameable, java.io.Serializable

public class DocumentationAttribute
extends Attribute

This attribute is a visible attribute that displays documentation when configured by double clicking on it or by invoking Configure in the context menu.

The method that causes the documentation to be displayed is createEditor, which is normally used to configure an attribute. This means that the DocumentationAttribute can't be configured. That is, if a double-click occurs or the Configure menu item is selected the documentation will be displayed, and the normal configure dialog will not be offered. Special provisions for "configuring" a DocumentationAttribute are described below.

The documentation is in a file specified by the FileParameter attribute with the name _documentation. The _documentation FileParameter can be on any object, including this DocumentationAttribute, in the containment hierarchy. (As explained below, the _documentation FileParameter will be found on the container of this DocumentationAttribute.) If a _documentation FileParameter can not be found a JFileChooser is presented. The resulting selection, if there is one, is then used to create a _documentation FileParameter on the container. There are two reasons for this. First, the documentation most likely applies to the container. I.e., this DocumentationAttribute isn't being documented, rather, the thing that this DocumentationAttribute is an attribute of is being documented. Second, the container most likely can be configured in the normal way. Since, the _documentation FileParameter will be on the container the specification for the file containing the documentation can be modified.

The DocumentationAttribute attribute can be found under more Utilities -> Decorative -> Documentation.

Since:
Ptolemy II 4.0
Version:
$Id: DocumentationAttribute.java,v 1.2 2004/04/21 22:51:23 rowland Exp $
Author:
Rowland R Johnson
See Also:
Serialized Form
Accepted Rating:
Red (rowland)
Proposed Rating:
Red (rowland)

Nested Class Summary
 
Nested classes inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
 
Field Summary
 
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
 
Constructor Summary
DocumentationAttribute(NamedObj container, java.lang.String name)
          Construct an icon with the attached this attached.
 
Methods inherited from class ptolemy.kernel.util.Attribute
_getContainedObject, _propagateExistence, clone, getContainer, setContainer, setName
 
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, uniqueName, validateSettables, workspace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocumentationAttribute

public DocumentationAttribute(NamedObj container,
                              java.lang.String name)
                       throws IllegalActionException,
                              NameDuplicationException
Construct an icon with the attached this attached.

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.