|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.gt.controller.DesignPatternImporter
public class DesignPatternImporter
An attribute that specifies the location of a design pattern and populates the container with that design pattern automatically. This attribute has the same effect of importing a design pattern into the current model with the menu item in the File menu of the Ptolemy environment, but it automatically imports the specified design pattern and does not require the model user to manually import it.
Red (tfeng) |
Yellow (tfeng) |
Nested Class Summary | |
---|---|
private class |
DesignPatternImporter.MoMLContentFilter
A moml filter that sets each created object to be non-persistent. |
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary | |
---|---|
private UndoStackAttribute |
_lastUndoStack
The last undo stack. |
private java.util.HashMap<java.lang.String,Token> |
_lastValues
The last values of the parameters to this importer, used to test whether attributes are changed and whether the container needs to be updated. |
FileParameter |
designPatternFile
The design pattern file. |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary | |
---|---|
DesignPatternImporter(NamedObj container,
java.lang.String name)
Construct an attribute with the given name contained by the specified entity. |
Method Summary | |
---|---|
void |
attributeChanged(Settable settable)
Update the design pattern. |
void |
setContainer(NamedObj container)
Set the container of this importer, and update the new container if it is not null. |
void |
update()
Update the container of this importer with the design pattern. |
void |
valueChanged(Settable settable)
React to change of an attribute and update the container of this importer. |
Methods inherited from class ptolemy.kernel.util.Attribute |
---|
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public FileParameter designPatternFile
private UndoStackAttribute _lastUndoStack
private java.util.HashMap<java.lang.String,Token> _lastValues
Constructor Detail |
---|
public DesignPatternImporter(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.
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 |
---|
public void attributeChanged(Settable settable)
settable
- The attribute changed.public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
setContainer
in class Attribute
container
- The new container.
IllegalActionException
- If thrown by the superclass.
NameDuplicationException
- If thrown by the superclass.Attribute.getContainer()
public void update()
public void valueChanged(Settable settable)
valueChanged
in interface ValueListener
settable
- The attribute changed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |