|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.kernel.util.NamedObj ptolemy.kernel.util.Attribute ptolemy.kernel.util.SingletonAttribute ptolemy.kernel.util.Location ptolemy.moml.Vertex
public class Vertex
This attribute represents a waypoint in a relation. It extends Location, meaning that can be associated with a physical location in a visual rendition. It can optionally be associated with another instance of Vertex to indicate that there is a path from this one to the other one. Cyclic paths are not permitted, although currently that is not enforced by this class.
Red (reviewmoderator) |
Red (eal) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Nested classes/interfaces inherited from interface ptolemy.kernel.util.Settable |
---|
Settable.Visibility |
Field Summary | |
---|---|
private Vertex |
_linked
|
private java.util.LinkedList<Port> |
_ports
|
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.kernel.util.Settable |
---|
EXPERT, FULL, NONE, NOT_EDITABLE |
Constructor Summary | |
---|---|
Vertex(Relation container,
java.lang.String name)
Construct an attribute with the given name and position. |
|
Vertex(Workspace workspace)
Construct an attribute in the specified workspace with an empty string as a name. |
Method Summary | |
---|---|
protected void |
_exportMoMLContents(java.io.Writer output,
int depth)
Write a MoML description of the contents of this object, which in this base class is the attributes. |
void |
addLinkedPort(Port port)
Add the specified port to the list of ports linked to this vertex. |
void |
exportMoML(java.io.Writer output,
int depth,
java.lang.String name)
Write a MoML description of this object. |
Vertex |
getLinkedVertex()
Return the other vertex to which there is a path from this vertex, or null if there is none. |
java.util.List |
linkedPorts()
Get the list of ports linked to this vertex. |
void |
removeLinkedPort(Port port)
Remove the specified port from the list of ports linked to this vertex. |
void |
setLinkedVertex(Vertex vertex)
Set the other vertex to which there is a path from this vertex. |
java.lang.String |
toString()
Get a description of the class, which is the class name and the location in parentheses. |
Methods inherited from class ptolemy.kernel.util.Location |
---|
_propagateValue, addValueListener, clone, getDefaultExpression, getDisplayName, getExpression, getLocation, getValueAsString, getVisibility, removeValueListener, setExpression, setLocation, setVisibility, validate |
Methods inherited from class ptolemy.kernel.util.SingletonAttribute |
---|
setContainer |
Methods inherited from class ptolemy.kernel.util.Attribute |
---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getFullName, getName, getName, setName |
Field Detail |
---|
private Vertex _linked
private java.util.LinkedList<Port> _ports
Constructor Detail |
---|
public Vertex(Workspace workspace)
workspace
- The workspace that will list the attribute.public Vertex(Relation container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the vertex.
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 |
---|
public void addLinkedPort(Port port)
port
- The port to link.public void exportMoML(java.io.Writer output, int depth, java.lang.String name) throws java.io.IOException
exportMoML
in interface MoMLExportable
exportMoML
in class Location
output
- The output stream to write to.depth
- The depth in the hierarchy, to determine indenting.name
- The name to use instead of the current name.
java.io.IOException
- If an I/O error occurs.NamedObj.isPersistent()
public Vertex getLinkedVertex()
setLinkedVertex(Vertex)
public java.util.List linkedPorts()
public void removeLinkedPort(Port port)
port
- The port to remove.public void setLinkedVertex(Vertex vertex)
vertex
- The vertex to link to this one.getLinkedVertex()
public java.lang.String toString()
toString
in class Location
protected void _exportMoMLContents(java.io.Writer output, int depth) throws java.io.IOException
_exportMoMLContents
in class NamedObj
output
- The output stream to write to.depth
- The depth in the hierarchy, to determine indenting.
java.io.IOException
- If an I/O error occurs.NamedObj._exportMoMLContents(java.io.Writer, int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |