Package ptolemy.vergil.actor
Class IOPortController.EntityPortRenderer
- java.lang.Object
-
- ptolemy.vergil.actor.IOPortController.EntityPortRenderer
-
- All Implemented Interfaces:
NodeRenderer
- Enclosing class:
- IOPortController
public class IOPortController.EntityPortRenderer extends java.lang.Object implements NodeRenderer
Render the ports of components as triangles. Multiports are rendered hollow, while single ports are rendered filled in black. ParameterPort is filled in grey. PublisherPort and SubscriberPort are filled with cyan.
-
-
Constructor Summary
Constructors Constructor Description EntityPortRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Figure
_decoratePortFigure(java.lang.Object node, Figure figure)
Decorate the figure according to the properties of the node.Figure
render(java.lang.Object n)
Render a visual representation of the given node.
-
-
-
Method Detail
-
render
public Figure render(java.lang.Object n)
Render a visual representation of the given node. If the StringAttribute _color of the node is set then use that color to render the node. If the StringAttribute _explanation of the node is set then use it to set the tooltip.- Specified by:
render
in interfaceNodeRenderer
- Parameters:
n
- The node to render.- Returns:
- The persistent object that is drawn on the screen.
- See Also:
NodeRenderer.render(java.lang.Object)
-
_decoratePortFigure
protected Figure _decoratePortFigure(java.lang.Object node, Figure figure)
Decorate the figure according to the properties of the node. This method does nothing, but subclasses may override this method to decorate the port's figure (e.g., add highlighting color).- Parameters:
node
- The node.figure
- The port's figure before decoration.- Returns:
- The port's figure after decoration (which may or may not be the figure given in the parameter).
-
-