This node controller provides interaction techniques for nodes that are
locations. This is common when the node has some concept of its
graphical location, but does not know about the figure that it
is associated with. This class provides the connection between the
figure's notion of location and the node's concept of location.
When nodes are drawn, they are automatically placed at the
coordinate given by the location. A LocatableNodeDragInteractor
is used to update the location of the node as the figure moves.
public static final java.awt.Color CLASS_ELEMENT_HIGHLIGHT_COLOR
A fourth argument would this highlight translucent, which would enable
combination with other highlights. However, this causes printing to
PDF to rasterize, which significantly degrades the quality of the
graphic output. Used to have value 200.
protected boolean _decoratable
A flag indicating that the figures associated with this
controller can be decorated to indicate that they are derived.
Some derived classes (like IOPortController) override this
to suppress such decoration. This is true by default.
Return true if the node is associated with a desired location.
In this base class, return true if the the node's semantic object is
an instance of Locatable.
node - The node.
True if the node is associated with a desired location.
public void locateFigure(java.lang.Object node)
Move the node's figure to the location specified in the node's
semantic object, if that object is an instance of Locatable.
If the semantic object is not a location, then do nothing.
If the figure associated with the semantic object is an instance
of TerminalFigure, then modify the location to ensure that the
connect site snaps to grid.
nf - The figure that should be a CompositeFigure itself, or be a
TerminalFigure whose getFigure() method returns a CompositeFigure.
The CompositeFigure, or null of it cannot be found.
protected boolean _hide(java.lang.Object node)
In this base class, return true if the specified node contains a
parameter named "_hide" with value true or an attribute that is not
a parameter named "_hide". Derived classes can override this method
to provide more sophisticated methods of choosing which nodes to
Return true if the property of the specified name is set for
the specified object. A property is specified if the specified
object contains an attribute with the specified name and that
attribute is either not a boolean-valued parameter, or it is
a boolean-valued parameter with value true.
Render the specified node. This overrides the base class to
return an invisible figure if the node contains a parameter
named "_hide" with value true. This overrides the base class
to assign a location and to highlight the node if it is an
inherited object, and hence cannot be deleted.