|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.vergil.actor.LinkController.LinkRenderer
public static class LinkController.LinkRenderer
Render a visual representation of a link.
Constructor Summary | |
---|---|
LinkController.LinkRenderer()
|
Method Summary | |
---|---|
Connector |
render(java.lang.Object edge,
Site tailSite,
Site headSite)
Render a visual representation of the given edge. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkController.LinkRenderer()
Method Detail |
---|
public Connector render(java.lang.Object edge, Site tailSite, Site headSite)
If a StringAttribute named "_color", or a ColorAttribute named "color" of the edge is set then use that color to draw the line.
If the attribute is named "_color", then the value of
the attribute is passed to
SVGUtilities.getColor(String)
, which
has accepts the following format: If the first character
is "#" or "0", then the value of the attribute is expected
to be in a format suitable for java.awt.Color.decode().
Otherwise, the value of the attribute is passed to checked
against a list of color names defined in
SVGUtilities
, if the color name is
not found, then the value of the attribute is passed to
java.awt.Color.getColor(String) and if there is no match,
then the color black is used.
If the attribute is named "color" and is a
ColorAttribute
, then the
javax.swing.JColorChooser gui will be offered as a way to
edit the color.
If the StringAttribute "_explanation" of the edge is set then use it to set the tooltip.
If the "_linkBendRadius" preference is read from the
PtolemyPreferences
and used to set
the bend radius. The default bend radius is 20.
render
in interface EdgeRenderer
edge
- The edge.tailSite
- The tail site.headSite
- The head site.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |