ptolemy.vergil.actor
Class IOPortController.EntityPortRenderer

java.lang.Object
  extended by ptolemy.vergil.actor.IOPortController.EntityPortRenderer
All Implemented Interfaces:
NodeRenderer
Direct Known Subclasses:
MatchResultViewer.MatchResultPortController.Renderer, TransformationEditor.TransformationPortController.Renderer
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.


Constructor Summary
IOPortController.EntityPortRenderer()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOPortController.EntityPortRenderer

public IOPortController.EntityPortRenderer()
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 interface NodeRenderer
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).