ptolemy.actor.gui.style
Class PasswordStyle

java.lang.Object
  extended byptolemy.kernel.util.NamedObj
      extended byptolemy.kernel.util.Attribute
          extended byptolemy.actor.gui.style.ParameterEditorStyle
              extended byptolemy.actor.gui.style.PasswordStyle
All Implemented Interfaces:
Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Nameable, java.io.Serializable

public class PasswordStyle
extends ParameterEditorStyle

This attribute annotates user settable attributes to specify an arbitrary type-in password style for configuring the containing attribute. This style can be used with any Settable attribute.

Since:
Ptolemy II 4.0
Version:
$Id: PasswordStyle.java,v 1.7.2.1 2004/06/18 00:48:54 cxh Exp $
Author:
Christopher Hylands Brooks, based on PasswordStyle by Steve Neuendorffer
See Also:
EditorPaneFactory, ParameterEditorStyle, Serialized Form
Accepted Rating:
Red (johnr)
Proposed Rating:
Red (eal)

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
PasswordStyle()
          Construct an attribute in the default workspace with an empty string as its name.
PasswordStyle(NamedObj container, java.lang.String name)
          Construct an attribute with the specified container and name.
PasswordStyle(Workspace workspace)
          Construct an attribute in the given workspace with an empty string as its name.
 
Method Summary
 boolean acceptable(Settable param)
          Return true if this style is acceptable for the given parameter.
 void addEntry(PtolemyQuery query)
          Create a new password entry in the given query associated with the attribute containing this style.
 
Methods inherited from class ptolemy.actor.gui.style.ParameterEditorStyle
setContainer
 
Methods inherited from class ptolemy.kernel.util.Attribute
_getContainedObject, _propagateExistence, clone, getContainer, 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

PasswordStyle

public PasswordStyle()
Construct an attribute in the default workspace with an empty string as its name. The object is added to the directory of the workspace. Increment the version number of the workspace.


PasswordStyle

public PasswordStyle(Workspace workspace)
Construct an attribute in the given workspace with an empty string as its name. The object is added to the directory of the workspace. Increment the version number of the workspace.


PasswordStyle

public PasswordStyle(NamedObj container,
                     java.lang.String name)
              throws IllegalActionException,
                     NameDuplicationException
Construct an attribute with the specified container and name.

Parameters:
container - The container.
name - The name of the attribute.
Throws:
IllegalActionException - If the attribute is not of an acceptable attribute for the container, or if the container is not an instance of Settable.
NameDuplicationException - If the name coincides with an attribute already in the container.
Method Detail

acceptable

public boolean acceptable(Settable param)
Return true if this style is acceptable for the given parameter.

Specified by:
acceptable in class ParameterEditorStyle
Parameters:
param - The attribute that this annotates.
Returns:
True.

addEntry

public void addEntry(PtolemyQuery query)
Create a new password entry in the given query associated with the attribute containing this style. The name of the entry is the name of the attribute. Attach the attribute to the created entry.

Specified by:
addEntry in class ParameterEditorStyle
Parameters:
query - The query into which to add the entry.