ptolemy.moml.filter
Class AddIcon

java.lang.Object
  extended by ptolemy.moml.filter.AddIcon
All Implemented Interfaces:
MoMLFilter

public class AddIcon
extends java.lang.Object
implements MoMLFilter

Certain actors have specialized icons that display the value of one of the parameters. This filter adds icons to those actors when necessary.

Since:
Ptolemy II 2.0
Version:
$Id: AddIcon.java,v 1.31 2006/08/21 03:04:09 cxh Exp $
Author:
Christopher Hylands, Edward A. Lee
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Constructor Summary
AddIcon()
           
 
Method Summary
 java.lang.String filterAttributeValue(NamedObj container, java.lang.String element, java.lang.String attributeName, java.lang.String attributeValue)
          If the attributeName is "class" and attributeValue names a class that has had its port names changed between releases, then substitute in the new port names.
 void filterEndElement(NamedObj container, java.lang.String elementName)
          Make modifications to the specified container, which is defined in a MoML element with the specified name.
 java.lang.String toString()
          Return a string that describes what the filter does.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddIcon

public AddIcon()
Method Detail

filterAttributeValue

public java.lang.String filterAttributeValue(NamedObj container,
                                             java.lang.String element,
                                             java.lang.String attributeName,
                                             java.lang.String attributeValue)
If the attributeName is "class" and attributeValue names a class that has had its port names changed between releases, then substitute in the new port names.

Specified by:
filterAttributeValue in interface MoMLFilter
Parameters:
container - The container for this attribute. in this method.
element - The XML element name.
attributeName - The name of the attribute.
attributeValue - The value of the attribute.
Returns:
the value of the attributeValue argument.

filterEndElement

public void filterEndElement(NamedObj container,
                             java.lang.String elementName)
                      throws java.lang.Exception
Make modifications to the specified container, which is defined in a MoML element with the specified name.

Specified by:
filterEndElement in interface MoMLFilter
Parameters:
container - The object created by this element.
elementName - The element name.
Throws:
java.lang.Exception - if there is a problem substituting in the new value.

toString

public java.lang.String toString()
Return a string that describes what the filter does.

Specified by:
toString in interface MoMLFilter
Overrides:
toString in class java.lang.Object
Returns:
the description of the filter that ends with a newline.