Java Reference
In-Depth Information
G001
G002
F
G003
F
R001
R002
F
F
F
R004
R003
R006
F
R005
Figure 4-19
Requirements dependency diagram
4.4.5 ToolTips
Because we have decided not to clutter our dependency view by displaying only
the ID of each
Requirement
and
RequirementGroup
, we need to populate a
ToolTip with the
Requirement
's title. This provides a convenient way to browse
the diagram with the mouse but not have to select each element and look in the
Properties view to see its information. For now, we just display the
title
attrib-
ute value in a
Label
by modifying the
createMainFigure()
method of the
RequirementEditPart
class, as follows:
/**
* Creates figure for this edit part.
*
* Body of this method does not depend on settings in generation model,
* so you may safely remove <i>generated</i> tag and modify it.
*
* @generated
NOT
*/
protected NodeFigure createMainFigure() {
NodeFigure figure = createNodePlate();
figure.setLayoutManager(new StackLayout());
IFigure shape = createNodeShape();
figure.add(shape);
contentPane = setupContentPane(shape);
Search WWH ::
Custom Search