The
SubGraph
renderer displays subgraphs of the data model as expandable and
collapsible nodes. This renderer is useful if the data model is
hierarchical, that is, if it contains nodes that have subnodes and
sublinks.
An expandable node can be in one of two
states: expanded or collapsed. When it is expanded, its subobjects
are visible, and a frame is displayed around them. When the
expandable node is collapsed, its subobjects are hidden, and the
collapsed node looks like a simple node. You can customize the look
of the frame and of the collapsed node in the style sheet.
An expandable node can be collapsed and
re-expanded interactively by clicking in the icon displayed in its
upper-left corner.
The following table lists the properties of the
SubGraph
renderer.
Global properties of the SubGraph
renderer
Property
|
Type
|
Default
|
Description
|
---|---|---|---|
loadOnDemand
|
boolean
|
false
|
When set to
true
, the graphic objects inside a collapsed subgraph are created
only the first time the subgraph is expanded. This can be used
to reduce the startup time of an application.
|
savingExpandedState
|
boolean
|
false
|
If
true
, the state of subgraphs (expanded or collapsed) can be saved
to the data model.
|
subObjectsSelectionAllowed
|
boolean
|
true
|
Allows/forbids the selection of subnodes
and sublinks in an expanded node.
|
The following table lists the per-object rendering properties of
the
SubGraph
renderer.
Per-object properties of the SubGraph
renderer
Property
|
Type
|
Default
|
Description
|
---|---|---|---|
Expandable
|
boolean
|
true
|
This property determines whether a node becomes a subgraph. If
the value is
true
, the node is represented as a subgraph that can have children.
If the value is
false
, the node is represented as a standard node and its potential
children are displayed at the root level.
|
FrameGraphic
|
IlvGraphic
|
Specifies a custom graphic object for the frame. You can set
this property to the special value “
default”
to use a default manager frame (displayed as a rectangle with a
title bar).
|
|
FrameMargin
|
float, or float,float,float,float
|
10
|
Sets the margins between the frame and
the subobjects. If a single value is specified, it is used for
the four sides. If four values are specified, they represent
the left, top, right, and bottom margins.
|
InitiallyExpanded
|
boolean
|
true
|
Sets the initial state of the expandable
node.
|
MinusGraphic
|
IlvGraphic
|
Specifies a custom graphic object for
the “collapse” icon.
|
|
MinusGraphicPosition
|
int
|
TopLeft
|
Specifies the position of the “collapse” icon in the node’s
bounding box.The possible values are defined by the class IlvDirection.
|
PlusGraphic
|
IlvGraphic
|
Specifies a custom graphic object for
the “expand” icon.
|
|
PlusGraphicPosition
|
int
|
TopLeft
|
Specifies the position of the “expand” icon in the node’s
bounding box.The possible values are defined by the class IlvDirection.
|
Note
For compatibility with previous versions of Rogue Wave® JViews,
the name
ExpandCollapse
may be used in the style sheet instead of the name
SubGraph
. The two names are equivalent.
See the class IlvSubGraphRenderer for more details.