public interface IlvVerticalExpansionMaster
IlvVerticalExpansionMaster
defines the behavior of a class that can track
the expand/collapse status of an IlvGanttConfiguration
's data tree and the
rows that each activity or resource
is displayed on. It is the responsibility of the vertical expansion master to receive
data model and expand/collapse notifications from the IlvVerticalDisplayController
, update its internal state, and then request
the vertical display controller to republish the updated information as an
event to all of the Gantt configuration's registered IlvVerticalExpandable
user interface components and VerticalExpansionListener
s.
An IlvVerticalExpansionMaster
is responsible for publishing the
following events by invoking the IlvVerticalDisplayController
's appropriate
fireXXXEvent()
method:
GanttModelChangedEvent
RowsInsertedEvent
RowsRemovedEvent
RowMovedEvent
RowExpandedEvent
RowCollapsedEvent
RootRowVisibilityChangedEvent
An IlvVerticalExpansionMaster
is associated with a Gantt configuration
and its display controller by calling the
IlvGanttConfiguration.setVerticalExpansionMaster(ilog.views.gantt.IlvVerticalExpansionMaster)
method.
Modifier and Type | Method and Description |
---|---|
void |
ganttModelChanged(GanttModelChangedEvent event)
Invoked by the Gantt configuration when the data model has been replaced.
|
IlvHierarchyNode |
getFirstVisibleRow()
Returns the first visible row in the tree or
null if no rows are
visible. |
IlvHierarchyNode |
getRootVisibleRow()
Deprecated.
Beginning with Rogue Wave JViews 8.5, use
getFirstVisibleRow()
instead. |
IlvHierarchyNode |
getRow(int rowIndex)
Returns the row that is visible on the specified row index.
|
int |
getRowCount()
Return the number of rows that are currently visible.
|
int |
getRowIndex(IlvHierarchyNode row)
Return the row index that the specified row is displayed on.
|
boolean |
isExpanded(IlvHierarchyNode row)
Return whether the specified row is currently expanded.
|
boolean |
isRootRowVisible()
Returns
true if the root row of the tree is visible, or
false if the root row's children are the highest level visible rows. |
boolean |
isVisible(IlvHierarchyNode row)
Return whether the specified row is visible.
|
void |
rowCollapsed(IlvHierarchyNode node)
Invoked by the Gantt configuration when a node has been collapsed in the
data tree.
|
void |
rowExpanded(IlvHierarchyNode node)
Invoked by the Gantt configuration when a node has been expanded in the
data tree.
|
void |
rowMoved(IlvHierarchyNode node,
IlvHierarchyNode oldParent,
int oldIndex,
IlvHierarchyNode newParent,
int newIndex)
Invoked by the Gantt configuration when a node has been moved within the
data tree.
|
void |
rowsInserted(IlvHierarchyNode parent,
IlvHierarchyNode[] children,
int[] childIndices)
Invoked by the Gantt configuration when children have been inserted into a
common parent node in the data tree.
|
void |
rowsRemoved(IlvHierarchyNode parent,
IlvHierarchyNode[] children,
int[] childIndices)
Invoked by the Gantt configuration when children have been removed from a
common parent node in the data tree.
|
void |
setExpansionMasterGanttConfigurationImpl(IlvGanttConfiguration ganttConfig)
Set the Gantt configuration that this expansion master is coordinating
with.
|
void |
setRootRowVisible(boolean rootVisible)
Sets whether the root row of the tree is visible, or whether the root row's children
should be the highest level visible rows.
|
void setExpansionMasterGanttConfigurationImpl(IlvGanttConfiguration ganttConfig)
setVerticalExpansionMaster()
method.
The expansion master should initially synchronize its display with the
Gantt configuration at this point. Note however, that the Gantt
configuration may or may not have a valid data model at this time and this
must be taken into account. The expansion master will be subsequently
informed when a data model is set or replaced via the
ganttModelChanged
event.
Warning: This method is considered to be part of an
IlvVerticalExpansionMaster
's internal implementation and is
not a public API. Only the Gantt configuration should invoke this method.
ganttConfig
- the Gantt configuration that this expansion master
is being added to, or null
if this expansion master is being
removed from its Gantt configurationIlvGanttConfiguration.setVerticalExpansionMaster(ilog.views.gantt.IlvVerticalExpansionMaster)
@Deprecated IlvHierarchyNode getRootVisibleRow()
getFirstVisibleRow()
instead.null
if no rows are
visible.IlvHierarchyNode getFirstVisibleRow()
null
if no rows are
visible. If the data model contains at least a root row and the root row is set visible, then this method will return the root
row. If the root row is set not visible, then this method will return the first child
of the root row, if it exists in the data model. This method is equivalent to
calling getRow(0)
.isRootRowVisible()
,
setRootRowVisible(boolean)
boolean isRootRowVisible()
true
if the root row of the tree is visible, or
false
if the root row's children are the highest level visible rows.
This method returns the value of the rootRowVisible
property and is
independent of whether the data model has a root row to be displayed. The default
value is true
.true
if the root row of the tree is visible, or
false
if the root row's children are the highest level visible
rows.setRootRowVisible(boolean)
,
getFirstVisibleRow()
void setRootRowVisible(boolean rootVisible)
rootVisible
- true
to make the root row of the tree visible, or
false
to make the root row's children the highest
level visible rows.isRootRowVisible()
,
getFirstVisibleRow()
int getRowCount()
IlvHierarchyNode getRow(int rowIndex)
null
is returned.rowIndex
- The rowIndex.null
if
rowIndex < 0
or rowIndex >= getRowCount()
.int getRowIndex(IlvHierarchyNode row)
row
- the rowrow
is visible on, where 0 is the
first row, or -1 if row
is not visibleboolean isExpanded(IlvHierarchyNode row)
false
is returned.row
- the rowfalse
if the row has no children, is collapsed, or
any of its ancestors are collapsed. true
if the row and all
of its ancestors are expanded.boolean isVisible(IlvHierarchyNode row)
row
- the rowtrue
if the row is visible, otherwise
false
void ganttModelChanged(GanttModelChangedEvent event)
null
root node). However,
separate rowsInserted
or rowsRemoved
events will
not be invoked by the Gantt configuration as a result of the data
model change being reported.event
- the eventvoid rowsInserted(IlvHierarchyNode parent, IlvHierarchyNode[] children, int[] childIndices)
parent
- the parent node which has had children inserted. If the
insertion being reported is the hierarchy's root node, parent
should be null
, children
should be a single
element array containing the root node, and childIndices
should be a single element array with childIndices[0]=0
.children
- the array of child IlvHierarchyNode
's that
have been inserted. The nodes must be arranged in parallel with
childIndices
, ordered according to their indices within
their common parent node from lowest to highest.childIndices
- an int
array of the child node indices
arranged in parallel with children
, ordered from lowest to
highest. The indices point to the final locations in the parent node where
the children were inserted.void rowsRemoved(IlvHierarchyNode parent, IlvHierarchyNode[] children, int[] childIndices)
parent
- the parent node which has had children removed. If the
deletion being reported is the hierarchy's root node, parent
should be null
, children
should be a single
element array containing the root node, and childIndices
should be a single element array with childIndices[0]=0
.children
- the array of child IlvHierarchyNode
's that
have been removed. The nodes must be arranged in parallel with
childIndices
, ordered according to their indices within
their common parent node from lowest to highest.childIndices
- an int
array of the child node indices
arranged in parallel with children
, ordered from lowest to
highest. The indices point to the original locations in the parent node
where the children were removed.void rowMoved(IlvHierarchyNode node, IlvHierarchyNode oldParent, int oldIndex, IlvHierarchyNode newParent, int newIndex)
node
- the node that has been movedoldParent
- node
's previous parentoldIndex
- node
's index within oldParent
before it was movednewParent
- node
's new parentnewIndex
- node
's index within newParent
after it has been movedvoid rowExpanded(IlvHierarchyNode node)
node
- the expanded nodevoid rowCollapsed(IlvHierarchyNode node)
node
- the collapsed node© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.