Java Reference
In-Depth Information
Parent Side
, and
Content Pane
. The
Resize Constraint
gives options of
how the node is allowed to be resized, with the default being
NSEW
, which allows
it to be resized using all eight points (each of the handles shown when selected).
Affixed Parent Side
is used primarily for port-type elements that are nodes
attached to the side of another node. The default value for this property is
NONE
.
The
Content Pane
property is currently not used.
TIP
With some modification, you can leverage the
Content Pane
in the gen-
erated code.The intention is to allow a
Figure
to specify child elements.
In the generated
EditPart
, locate the
setupContentPane()
method
and mark it
@generated NOT
to prevent overwriting on regeneration.
if
(nodeShape
instanceof
<GeneratedFigure>) {
nodeShape = ((<GeneratedFigure>)nodeShape)
.<figureAccessorName>();
}
Introduce code such as this to assign the proper child
Figure
using the
generated accessor.
Diagram Labels
Diagram Label
extends
Node
in the graphical definition model and, therefore,
has all of its properties. Additionally, it has the following properties:
Element
Icon
,
Accessor
,
External
, and
Container
.
Element Icon
is a Boolean
property that indicates whether the label uses an icon image to complement its
text. The
Accessor
obtains the figure instance from the parent
EditPart
. An
External
label does not require such an
Accessor
because the figure is not
contained within another—for example, link labels are always external.
Therefore, the
External
property is set to
false
automatically if an accessor is
selected for a
Diagram Label
.
Connections
Connection
s are simple diagram elements that have no additional properties.
The figure reference, a name, and whatever facets you chose to add as children
are sufficient to define a connection.
Search WWH ::
Custom Search