Java Reference
In-Depth Information
We set default values in our diagram preferences in Section 4.3.5, “Diagram
Preferences.”
We can delete the original rectangle figure descriptor assigned to the
Node
Topic
and select our new rounded rectangle descriptor. As with the original
TopicFigure
, we need to add a
Child Access
to the
Figure Descriptor
and set its
Figure
to our
TopicNameFigure
. In the
TopicName Diagram
Label
, set the label's
Accessor
property to the
getFigureTopicNameFigure
Child Access
created earlier for the
Topic
's name label. The label currently
has its
Element Icon
property set to
true
. This is the default, but because the
icon adds no information at this point, it's just noise; set this property to
false
,
and do the same for the
RelationshipType
and
RelationshipName
labels.
To provide a reasonable default size for our
Topic
nodes, we add a
Default
Size Facet
element to its
Node
element, with a child
Dimension
element. We
give it a default size of
Dx = 80
,
Dy = 40
. That's it for our
Topic
node.
We also want to change the look of our relationship links. We want to use a
dashed line and open arrow decoration on the target for our relationships, and
just a solid line with no decoration for our subtopic. Later, we'll add a circle
decoration to the target of our subtopic link, but that requires writing some
custom code. For now, change the name of our
Polyline Decoration
to
RelationshipTargetDecoration
and select this decoration as the
Target
Decoration
for our
RelationshipFigure
. Change the
Line Kind
of our
RelationshipFigure
to
LINE_DASH
and remove the target decoration from
our Subtopics connection figure.
Table 4-5 shows the current state of the graphical definition; only properties
that changed from their default values are shown.
Table 4-5
Mindmap Relationship Link Mappings
Element
Property
Value
Canvas
Name
mindmap
Figure Gallery
Name
Default
Polyline Decoration
Name
RelationshipTargetDecoration
Figure Descriptor
Name
TopicSubtopicsFigure
Polyline Connection
Name
TopicSubtopicsFigure
Target Decoration
unset
Figure Descriptor
Name
RelationshipFigure
(continues)
Search WWH ::
Custom Search