public class IlvGanttConfiguration extends Object
IlvGanttConfiguration
is the central facade for a
coordinated set of Gantt UIs that display information from the
same data model. IlvGanttConfiguration
is also a central
location for interested listeners to subscribe to any event in the Gantt
system.
In addition to providing centralized routing and distribution of events
published by the various components that make up the Gantt system,
IlvGanttConfiguration
is responsible for firing the following
events:
GanttModelChanged
event is fired as an
aboutToChange event when the data model is about to be replaced and
is fired again as a changed event once the data model has been
replaced.
Modifier and Type | Field and Description |
---|---|
static int |
ACTIVITY_ROWS
Each row represents an activity.
|
static int |
DEFAULT_ROW_HEIGHT
The default row height for Gantt configurations.
|
static int |
RESOURCE_ROWS
Each row represents a resource.
|
Constructor and Description |
---|
IlvGanttConfiguration(IlvGanttModel ganttModel,
int rowType)
Constructs a new
IlvGanttConfiguration that contains
the specified data model and is organized by the specified type of
horizontal rows. |
IlvGanttConfiguration(int rowType)
Constructs a new
IlvGanttConfiguration that will be
organized by the specified type of horizontal rows. |
Modifier and Type | Method and Description |
---|---|
void |
addActivityHierarchyListener(ActivityHierarchyListener listener)
Adds the specified listener to receive activity hierarchy events from this
configuration.
|
void |
addActivityListener(ActivityListener listener)
Adds the specified listener to receive activity events from this
configuration.
|
void |
addConstraintListener(ConstraintListener listener)
Adds the specified listener to receive constraint events from this
configuration.
|
void |
addGanttModelListener(GanttModelListener listener)
Adds the specified listener to receive notifications when this
configuration's
Gantt model has been changed. |
void |
addListener(GenericEventListener listener)
Add the specified
listener so that it will receive all events
routed and published by this configuration. |
void |
addListener(GenericEventListener listener,
Class eventType)
Adds the specified
listener so that it will receive events
published by this configuration that are instances of the specified
eventType . |
void |
addReservationListener(ReservationListener listener)
Adds the specified listener to receive reservation events from this
configuration.
|
void |
addResourceHierarchyListener(ResourceHierarchyListener listener)
Adds the specified listener to receive resource hierarchy events from this
configuration.
|
void |
addResourceListener(ResourceListener listener)
Adds the specified listener to receive resource events from this
configuration.
|
void |
addSelectable(IlvGanttSheet sheet)
Adds the specified Gantt sheet component to be coordinated with the
selection management policy of this configuration.
|
void |
addSelectable(IlvJTable table)
Adds the specified table component to be coordinated with the
selection management policy of this configuration.
|
void |
addSelectable(IlvJTree tree)
Adds the specified tree component to be coordinated with the
selection management policy of this configuration.
|
void |
addSelectionListener(SelectionListener listener)
Adds the specified listener to receive selection events from this
configuration.
|
void |
addTimeScrollable(IlvTimeScrollable ts)
Adds an
IlvTimeScrollable object to be coordinated by this
configuration. |
void |
addTimeScrollListener(TimeScrollListener listener)
Adds the specified listener to receive time scroll events from this
configuration.
|
void |
addVerticalExpandable(IlvVerticalExpandable expandable)
Adds the specified expandable UI component to be coordinated with this
configuration.
|
void |
addVerticalExpansionListener(VerticalExpansionListener listener)
Adds the specified listener to receive vertical expansion events from this
configuration.
|
void |
addVerticalScrollable(IlvVerticalScrollable scrollable)
Adds the specified vertically scrollable UI component to be coordinated
with this configuration.
|
void |
addVerticalScrollListener(VerticalScrollListener listener)
Adds the specified listener to receive vertical scroll events from this
configuration.
|
void |
cacheAllReservations()
Sets the time interval of the reservation cache to include all of the reservations
that are associated with the already cached resources.
|
void |
collapseRow(IlvHierarchyNode row)
Ensures that the specified row is collapsed.
|
int |
computeVerticalScrollPosition(int rowDelta)
Returns the position that will cause this configuration and its associated
vertically scrollable components to scroll
up or down by the specified number of rows. |
void |
deSelectAllRows()
Deselects all of the currently selected rows.
|
void |
expandAllRows()
Ensures that all rows in this configuration are expanded and visible.
|
void |
expandAllRows(IlvHierarchyNode row)
Ensures that the specified row and all its children are expanded
and visible.
|
void |
expandRow(IlvHierarchyNode row)
Ensures that the specified row is expanded and visible.
|
protected GanttModelChangedEvent |
fireGanttModelAboutToChange(IlvGanttModel newModel)
Fires a
ganttModelAboutToChange event. |
protected void |
fireGanttModelChanged(IlvGanttModel oldModel)
Fires a
ganttModelChanged event. |
IlvCacheManager |
getCacheManager()
Returns the cache manager of this configuration.
|
IlvHierarchyNode |
getDisplayedRowAtPosition(int position)
Returns the row at the specified vertical position relative to the
display area.
|
int |
getDisplayedRowIndexAtPosition(int position)
Returns the row index at the specified vertical position relative
to the display area.
|
IlvHierarchyNode |
getFirstVisibleRow()
Returns the first visible row in the tree or
null if no rows are
visible. |
IlvGanttModel |
getGanttModel()
Returns the Gantt data model of the configuration.
|
int |
getMaxVerticalPosition()
Returns the maximum vertical position that this configuration and its
associated
vertically scrollable components
can display. |
Date |
getMaxVisibleTime()
Returns the maximum time that the configuration and its associated
time scrollable objects can show in
bounded scrolling mode. |
IlvDuration |
getMinVisibleDuration()
Returns the minimum duration that the configuration and its associated
time scrollable objects can show. |
Date |
getMinVisibleTime()
Returns the minimum time that the configuration and its associated
time scrollable objects can show in
bounded scrolling mode. |
float |
getReservationCacheLoadFactor()
Returns the factor by which the reservation cache's time interval is
expanded.
|
float |
getReservationCacheLoadThreshold()
Returns the threshold that will trigger the reservation cache's time
interval to be expanded.
|
IlvHierarchyNode |
getRootRow()
Returns the root row of the data model or
null if the data
model has no rows. |
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 |
getRowHeight()
Returns the row height used when all rows are set to have the same height.
|
int |
getRowHeight(IlvHierarchyNode row)
Returns the height of the specified row.
|
int |
getRowIndex(IlvHierarchyNode row)
Returns the row index that the specified row is displayed on.
|
int |
getRowType()
Returns an
int that represents the row organization of this
configuration. |
IlvConstraint[] |
getSelectedConstraints()
Returns the constraints that are currently selected.
|
IlvGraphic[] |
getSelectedGraphics()
Returns the currently selected graphics in the Gantt sheet.
|
IlvReservation[] |
getSelectedReservations()
Returns the reservations that are currently selected.
|
IlvHierarchyNode[] |
getSelectedRows()
Returns the rows that are selected.
|
IlvVerticalDisplayController |
getVerticalDisplayController()
Returns this configuration's vertical display controller.
|
int |
getVerticalExtent()
Returns the extent of the vertical range displayed by this configuration
and its associated
vertically scrollable
components. |
int |
getVerticalPosition()
Returns the beginning of the vertical range displayed by this
configuration and its associated
vertically
scrollable components. |
IlvDuration |
getVisibleDuration()
Returns the duration of the time interval displayed by the configuration
and its associated
time scrollable objects. |
IlvTimeInterval |
getVisibleInterval()
Returns the time interval displayed by the configuration and its associated
time scrollable objects. |
int |
getVisibleIntervalAnimationSteps()
Returns the number of steps in the animation of changes to the
visible interval of the configuration. |
IlvHierarchyNode |
getVisibleRowAtPosition(int position)
Returns the row at the specified vertical position, relative to the
first visible row at
position = 0 . |
Rectangle |
getVisibleRowBounds(IlvHierarchyNode row)
Returns the vertical bounds of the specified row as the y and
height fields of a rectangle.
|
Rectangle |
getVisibleRowBounds(int row)
Returns the vertical bounds of the specified row as the y and
height fields of a rectangle.
|
int |
getVisibleRowCount()
Returns the number of rows that are currently
visible . |
int |
getVisibleRowIndexAtPosition(int position)
Returns the row index at the specified vertical position, relative
to the first visible row at
position = 0 . |
Date |
getVisibleTime()
Returns the beginning of the time interval displayed by the configuration
and its associated
time scrollable objects. |
boolean |
isFixedRowHeight()
Tests if all rows are set to have the same fixed height.
|
boolean |
isGraphicSelected(IlvGraphic graphic)
Returns whether the specified graphic is currently selected in the Gantt
sheet.
|
boolean |
isReservationCachingEnabled()
Returns whether reservation caching is currently enabled.
|
boolean |
isRootRowVisible()
Returns the value of the
rootRowVisible property. |
boolean |
isRowExpanded(IlvHierarchyNode row)
Returns whether the specified row and all of its ancestors are currently
expanded.
|
boolean |
isRowSelected(IlvHierarchyNode row)
Returns whether the specified row is selected.
|
boolean |
isRowVisible(IlvHierarchyNode row)
Returns whether the specified row is visible.
|
boolean |
isSelectionAdjusting()
Tests if we are currently selecting or canceling the selection of a series of
objects.
|
void |
makeRowDisplayed(IlvHierarchyNode row)
Ensures that the specified row is displayed.
|
void |
makeRowVisible(IlvHierarchyNode row)
Ensures that the specified row is visible.
|
void |
removeGanttModelListener(GanttModelListener listener)
Removes the specified listener so that it will no longer receive
notifications when this configuration's
Gantt model
has been changed. |
void |
removeListener(EventListener listener)
Removes the specified
listener so that it no longer receives any events
published by this configuration. |
void |
removeSelectable(IlvGanttSheet sheet)
Removes the specified Gantt sheet component so that it is no longer
coordinated with the selection management policy of this configuration.
|
void |
removeSelectable(IlvJTable table)
Removes the specified table component so that it is no longer coordinated
with the selection management policy of this configuration.
|
void |
removeSelectable(IlvJTree tree)
Removes the specified tree component so that it is no longer coordinated
with the selection management policy of this configuration.
|
void |
removeSelectionListener(SelectionListener listener)
Removes the specified listener so that it will no longer receive selection
events from this configuration.
|
void |
removeTimeScrollable(IlvTimeScrollable ts)
Removes an
IlvTimeScrollable object so that it is no longer
coordinated by this configuration. |
void |
removeTimeScrollListener(TimeScrollListener listener)
Removes the specified listener so that it will no longer receive time
scroll events from this configuration.
|
void |
removeVerticalExpandable(IlvVerticalExpandable expandable)
Removes the specified expandable UI component so that it will no longer be
coordinated with this configuration.
|
void |
removeVerticalExpansionListener(VerticalExpansionListener listener)
Removes the specified listener so that it will no longer receive vertical
expansion events from this configuration.
|
void |
removeVerticalScrollable(IlvVerticalScrollable scrollable)
Removes the specified vertically scrollable UI component so that it will
no longer be coordinated with this configuration.
|
void |
removeVerticalScrollListener(VerticalScrollListener listener)
Removes the specified listener so that it will no longer receive vertical
scroll events from this configuration.
|
Iterator<IlvGraphic> |
selectedGraphicsIterator()
Returns an iterator over the currently selected graphics in the Gantt
sheet.
|
Iterator<IlvHierarchyNode> |
selectedRowsIterator()
Returns an iterator over the currently selected rows.
|
void |
selectRow(IlvHierarchyNode row,
boolean selected)
Selects or deselects the specified row.
|
void |
selectRow(int index,
boolean selected)
Selects or deselects the row having the specified index.
|
void |
setGanttModel(IlvGanttModel ganttModel)
Sets the Gantt data model of the configuration.
|
void |
setMaxVerticalPosition(int max)
Sets the maximum vertical position that this configuration and its
associated
vertically scrollable components
can display. |
void |
setMaxVisibleTime(Date max)
Sets the maximum time that the configuration and its associated
time scrollable objects can show in
bounded scrolling mode. |
void |
setMinVisibleDuration(IlvDuration duration)
Sets the minimum duration that the configuration and its associated
time scrollable objects can show. |
void |
setMinVisibleTime(Date min)
Sets the minimum time that the configuration and its associated
time scrollable objects can show in
bounded scrolling mode. |
void |
setReservationCacheLoadFactor(float loadFactor)
Sets the factor by which the reservation cache's time interval is
expanded.
|
void |
setReservationCacheLoadThreshold(float loadThreshold)
Sets the threshold that will trigger the reservation cache's time
interval to be expanded.
|
void |
setReservationCachingEnabled(boolean enabled)
Sets whether reservation caching is currently enabled.
|
void |
setRootRowVisible(boolean rootVisible)
Sets whether the root row of the tree is visible, or whether the children
of the root row should be the highest level visible rows.
|
void |
setRowHeight(IlvHierarchyNode row,
int rowHeight)
Sets the height of the specified row.
|
void |
setRowHeight(int rowHeight)
Sets all rows to have the same height.
|
void |
setSelectionAdjusting(boolean selectionAdjusting)
Starts a series of selection events.
|
void |
setVerticalExpansionMaster(IlvVerticalExpansionMaster expansionMaster)
Sets the object that will track the expand/collapse status of the
hierarchical tree for this configuration.
|
void |
setVerticalExtent(int extent)
Sets the extent of the vertical range displayed by this configuration and
its associated
vertically scrollable
components. |
void |
setVerticalPosition(int position)
Sets the beginning of the vertical range displayed by this configuration
and its associated
vertically scrollable
components. |
void |
setVisibleDuration(IlvDuration duration)
Sets the duration of the time interval displayed by the configuration and
its associated
time scrollable objects. |
void |
setVisibleInterval(Date time,
IlvDuration duration)
Sets the time interval displayed by the configuration and its associated
time scrollable objects. |
void |
setVisibleIntervalAnimationSteps(int steps)
Sets the number of steps in the animation of changes to the
visible interval of the configuration. |
void |
setVisibleTime(Date time)
Sets the beginning of the time interval displayed by the configuration and
its associated
time scrollable objects. |
void |
validateRowHeights()
Validates the heights of all rows, that is, ensures that they are all
up-to-date.
|
Iterator<IlvHierarchyNode> |
visibleRowsIterator()
Returns an iterator that traverses all of the visible rows.
|
Iterator<IlvHierarchyNode> |
visibleRowsIterator(IlvHierarchyNode rootRow)
Returns an iterator that traverses only the visible rows in the specified subtree of
rows.
|
public static final int ACTIVITY_ROWS
public static final int RESOURCE_ROWS
public static final int DEFAULT_ROW_HEIGHT
IlvVerticalDisplayController.DEFAULT_ROW_HEIGHT
. The default value
is 20
.public IlvGanttConfiguration(int rowType)
IlvGanttConfiguration
that will be
organized by the specified type of horizontal rows.rowType
- The type of horizontal rows being displayed. The value must
be either ACTIVITY_ROWS
or RESOURCE_ROWS
.ACTIVITY_ROWS
,
RESOURCE_ROWS
public IlvGanttConfiguration(IlvGanttModel ganttModel, int rowType)
IlvGanttConfiguration
that contains
the specified data model and is organized by the specified type of
horizontal rows.ganttModel
- The Gantt data model being displayed.rowType
- The type of horizontal rows being displayed. The value must
be either ACTIVITY_ROWS
or RESOURCE_ROWS
.ACTIVITY_ROWS
,
RESOURCE_ROWS
public IlvGanttModel getGanttModel()
public void setGanttModel(IlvGanttModel ganttModel)
ganttModel
- The Gantt data model.public void addGanttModelListener(GanttModelListener listener)
Gantt model
has been changed. Note
that this is not the same as being notified when elements within the
Gantt model have been modified.listener
- The listener that will be subscribed to subsequent
Gantt model events.removeGanttModelListener(ilog.views.gantt.event.GanttModelListener)
public void removeGanttModelListener(GanttModelListener listener)
Gantt model
has been changed.listener
- The listener that will be unsubscribed from receiving
Gantt model events.addGanttModelListener(ilog.views.gantt.event.GanttModelListener)
protected GanttModelChangedEvent fireGanttModelAboutToChange(IlvGanttModel newModel)
ganttModelAboutToChange
event. Returns the event after
dispatching it to all listeners.newModel
- The proposed new data model of the configuration.protected void fireGanttModelChanged(IlvGanttModel oldModel)
ganttModelChanged
event.oldModel
- The previous data model of the configuration.public IlvVerticalDisplayController getVerticalDisplayController()
public int getRowType()
int
that represents the row organization of this
configuration. This will be one of the constants: ACTIVITY_ROWS
or RESOURCE_ROWS
.ACTIVITY_ROWS
or RESOURCE_ROWS
.public IlvHierarchyNode getRootRow()
null
if the data
model has no rows. This method will return the root row of the data model
regardless of its visibility status. To take visibility into account, use
the getFirstVisibleRow()
method instead. The type
of the returned row will match the row organization of this configuration.
In other words, if getRowType
is
ACTIVITY_ROWS
, the returned row will be an IlvActivity
.
If getRowType
is RESOURCE_ROWS
, the returned
row will be an IlvResource
.public boolean isRowExpanded(IlvHierarchyNode row)
true
implies that row
has
children that are visible. If the row has no children or it, or if any of
its ancestors are not expanded, this method returns false
.
This implies that the row has no visible children. The type of
row
must match the row organization of this configuration.
That is, if getRowType
returns ACTIVITY_ROWS
,
then row
must be an IlvActivity
. If
getRowType
returns RESOURCE_ROWS
, then
row
must be an IlvResource
.row
- The row.true
is returned.expandRow(ilog.views.gantt.IlvHierarchyNode)
,
expandAllRows()
,
expandAllRows(IlvHierarchyNode)
,
collapseRow(ilog.views.gantt.IlvHierarchyNode)
public void expandRow(IlvHierarchyNode row)
getRowType
is
ACTIVITY_ROWS
, then row must be an IlvActivity
. If
getRowType
is RESOURCE_ROWS
, then row
must be an IlvResource
.row
- The row.isRowExpanded(ilog.views.gantt.IlvHierarchyNode)
,
expandAllRows()
,
expandAllRows(IlvHierarchyNode)
,
collapseRow(ilog.views.gantt.IlvHierarchyNode)
public void expandAllRows(IlvHierarchyNode row)
getRowType
is ACTIVITY_ROWS
, then row must be an
IlvActivity
.
If getRowType
is RESOURCE_ROWS
, then
row must be an IlvResource
.row
- The row to be expanded.isRowExpanded(ilog.views.gantt.IlvHierarchyNode)
,
expandRow(ilog.views.gantt.IlvHierarchyNode)
,
expandAllRows()
,
collapseRow(ilog.views.gantt.IlvHierarchyNode)
public void expandAllRows()
public void collapseRow(IlvHierarchyNode row)
row
- The row. The type of the specified row must match the row
organization of this configuration. In other words, if
getRowType
is ACTIVITY_ROWS
, then row
must be an IlvActivity
. If getRowType
is
RESOURCE_ROWS
, then row must be an IlvResource
.isRowExpanded(ilog.views.gantt.IlvHierarchyNode)
,
expandRow(ilog.views.gantt.IlvHierarchyNode)
,
expandAllRows()
,
expandAllRows(IlvHierarchyNode)
public void validateRowHeights()
public boolean isFixedRowHeight()
true
is
returned.setRowHeight(int)
,
setRowHeight(IlvHierarchyNode, int)
public int getRowHeight()
setRowHeight(IlvHierarchyNode, int)
method, this value will be
the height of the rows whose height has not been customized. The
default value is 20
.setRowHeight(int)
,
setRowHeight(IlvHierarchyNode, int)
public int getRowHeight(IlvHierarchyNode row)
row
- The row. The type of row
must match the row
organization of this configuration. That is, if
getRowType
returns
ACTIVITY_ROWS
, row
must be an
IlvActivity
. If getRowType
returns RESOURCE_ROWS
, row
must be an
IlvResource
.setRowHeight(int)
,
setRowHeight(IlvHierarchyNode,int)
public void setRowHeight(int rowHeight)
setRowHeight(IlvHierarchyNode, int)
, this value is used as
the height for those rows whose height has not been customized.rowHeight
- The row height.getRowHeight()
,
getRowHeight(IlvHierarchyNode)
public void setRowHeight(IlvHierarchyNode row, int rowHeight)
row
- The row. The type of row
must match the row
organization of this configuration. That is, if
getRowType
returns ACTIVITY_ROWS
,
row
must be an IlvActivity
. If
getRowType
returns
RESOURCE_ROWS
, then row
must be an
IlvResource
instance.rowHeight
- The row height.getRowHeight()
,
getRowHeight(IlvHierarchyNode)
,
setRowHeight(int)
@Deprecated public IlvHierarchyNode getRootVisibleRow()
getFirstVisibleRow()
instead.null
if no rows are
visible. The type of the returned row will match the row organization of this
configuration. In other words, if getRowType
is ACTIVITY_ROWS
, then the returned row will be an IlvActivity
. If getRowType
is RESOURCE_ROWS
, then the returned row will be an
IlvResource
.public 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, this method will return the
root row. If the root row is set not visible, this method will return the
first child of the root row, if it exists in the data model. The type of
the returned row will match the row organization of this configuration.
That is, if getRowType
returns ACTIVITY_ROWS
, then the returned
row will be an IlvActivity
. If getRowType
is
RESOURCE_ROWS
, then the returned row will be an
IlvResource
. This method is equivalent to calling
getRow(0)
.getRootRow()
,
isRootRowVisible()
,
setRootRowVisible(boolean)
public boolean isRootRowVisible()
rootRowVisible
property.
This method is independent of whether the data model has a root row to be
displayed. The default value is true
.true
is
returned, if the children of the root row are the highest level of visible
rows, false
is returned.setRootRowVisible(boolean)
,
getFirstVisibleRow()
,
getRootRow()
public void setRootRowVisible(boolean rootVisible)
rootVisible
- Set to true
to make the root row of the
tree visible. Set to false
to make the children of the root
row the highest level visible rows.isRootRowVisible()
,
getFirstVisibleRow()
,
getRootRow()
public int getRowIndex(IlvHierarchyNode row)
getRowType
is ACTIVITY_ROWS
, then
row must be an IlvActivity
.
If getRowType
is RESOURCE_ROWS
, then
row must be an IlvResource
.row
- The row.public IlvHierarchyNode getRow(int rowIndex)
null
is returned.rowIndex
- The row index.null
if
rowIndex < 0
or rowIndex >=
getVisibleRowCount()
.public int getVisibleRowCount()
visible
. A visible row is one that has all of its ancestors expanded.
A visible row is not necessarily in the display area.public boolean isRowVisible(IlvHierarchyNode row)
getRowType
is ACTIVITY_ROWS
, then row
must be an IlvActivity
. If getRowType
is
RESOURCE_ROWS
, then row must be an IlvResource
.row
- The row.true
if the row is visible, and false
otherwise.public Iterator<IlvHierarchyNode> visibleRowsIterator(IlvHierarchyNode rootRow)
getRowType
is ACTIVITY_ROWS
, then rootRow must be an IlvActivity
. If getRowType
is RESOURCE_ROWS
, then rootRow must be an
IlvResource
.rootRow
- The root row of the subtree.visibleRowsIterator()
public Iterator<IlvHierarchyNode> visibleRowsIterator()
visibleRowsIterator(IlvHierarchyNode)
public void makeRowVisible(IlvHierarchyNode row)
expanded
. The
type of the specified row must match the row organization of this
configuration. In other words, if getRowType
is
ACTIVITY_ROWS
, then row must be an IlvActivity
. If
getRowType
is RESOURCE_ROWS
, then row
must be an IlvResource
.row
- The row.public Rectangle getVisibleRowBounds(int row)
first visible row
at
y = 0
and do not take the current vertical scroll position
into account. If the row is not visible, null
is returned.row
- The row.null
if
row < 0
or row >= getVisibleRowCount()
.public Rectangle getVisibleRowBounds(IlvHierarchyNode row)
first visible row
at
y = 0
and do not take the current vertical scroll position
into account. If the row is not visible, null
is returned.
The type of the specified row must match the row organization of
this configuration. In other words, if getRowType
is
ACTIVITY_ROWS
, then row must be an IlvActivity
.
If getRowType
is RESOURCE_ROWS
, then
row must be an IlvResource
.
row
- The row.null
if row is not visible.public int getVisibleRowIndexAtPosition(int position)
position = 0
. This method does
not take the current vertical scroll position into account and returns -1
if rowIndex < 0
or rowIndex >=
getVisibleRowCount()
.position
- The vertical position of interest.getVisibleRowAtPosition(int)
,
getDisplayedRowIndexAtPosition(int)
,
getDisplayedRowAtPosition(int)
public IlvHierarchyNode getVisibleRowAtPosition(int position)
position = 0
. This method does not take
the current vertical scroll position into account and returns
null
if the position does not correspond to a visible row.
The type of the returned row will match the row organization of this
configuration. In other words, if getRowType
is
ACTIVITY_ROWS
, then the returned row will be an
IlvActivity
. If getRowType
is
RESOURCE_ROWS
, then the returned row will be an
IlvResource
.position
- The vertical position of interest.null
if the
position is out of range.getVisibleRowIndexAtPosition(int)
,
getDisplayedRowIndexAtPosition(int)
,
getDisplayedRowAtPosition(int)
public int getDisplayedRowIndexAtPosition(int position)
rowIndex < 0
or row >= getVisibleRowCount()
.position
- The vertical position of interest, relative to the display
area.getVisibleRowIndexAtPosition(int)
,
getVisibleRowAtPosition(int)
,
getDisplayedRowAtPosition(int)
public IlvHierarchyNode getDisplayedRowAtPosition(int position)
getRowType
is
ACTIVITY_ROWS
, then the returned row will be an
IlvActivity
. If getRowType
is
RESOURCE_ROWS
, then the returned row will be an
IlvResource
.
This method returns null
if the position does not correspond
to a visible row.position
- The vertical position of interest, relative to the display
area.null
if the position is out of range.getVisibleRowIndexAtPosition(int)
,
getVisibleRowAtPosition(int)
,
getDisplayedRowIndexAtPosition(int)
public void makeRowDisplayed(IlvHierarchyNode row)
visible
and is
scrolled into the display area. The type of the specified row must
match the row organization of this configuration. In other words, if
getRowType
is ACTIVITY_ROWS
, then row
must be an IlvActivity
.
If getRowType
is RESOURCE_ROWS
, then
row must be an IlvResource
.row
- The row.public int computeVerticalScrollPosition(int rowDelta)
vertically scrollable
components to scroll
up or down by the specified number of rows.
The value returned by this method can then be applied using the
setVerticalPosition(int)
method to scroll up or down.rowDelta
- The number of rows to scroll vertically. Set a negative
value to scroll up or a positive numbers to scroll down.public void addVerticalExpandable(IlvVerticalExpandable expandable)
expandable
- The expandable UI component.setVerticalExpansionMaster(ilog.views.gantt.IlvVerticalExpansionMaster)
public void removeVerticalExpandable(IlvVerticalExpandable expandable)
expandable
- The expandable UI component to remove.public void setVerticalExpansionMaster(IlvVerticalExpansionMaster expansionMaster)
expansionMaster
- The vertical expansion master.public void addVerticalExpansionListener(VerticalExpansionListener listener)
listener
- The listener that will be subscribed to subsequent
vertical expansion events.public void removeVerticalExpansionListener(VerticalExpansionListener listener)
listener
- The listener that will be unsubscribed from receiving
vertical expansion events.public int getMaxVerticalPosition()
vertically scrollable
components
can display.setMaxVerticalPosition(int)
public void setMaxVerticalPosition(int max)
vertically scrollable
components
can display.
The current vertical position
and
extent
are trimmed to fit the new 0-max range.
A maxVerticalPositionChanged event
is then fired to all
registered listeners
.
If max < 0
an IllegalArgumentException
will
be thrown.max
- The maximum vertical position.getMaxVerticalPosition()
public int getVerticalPosition()
vertically
scrollable
components.setVerticalPosition(int)
public void setVerticalPosition(int position)
vertically scrollable
components. The specified value is compared against the
max
displayable value and is trimmed if
necessary. A verticalPositionChanged event
is then fired to all
registered listeners
.position
- The new vertical position.getVerticalPosition()
,
computeVerticalScrollPosition(int)
public int getVerticalExtent()
vertically scrollable
components.setVerticalExtent(int)
public void setVerticalExtent(int extent)
vertically scrollable
components. The specified value is compared against the
max
displayable value and is trimmed if
necessary. A verticalExtentChanged event
is then fired to all
registered listeners
.extent
- The new vertical extent.getVerticalExtent()
public void addVerticalScrollable(IlvVerticalScrollable scrollable)
scrollable
- The scrollable UI component.public void removeVerticalScrollable(IlvVerticalScrollable scrollable)
scrollable
- The scrollable UI component to remove.public void addVerticalScrollListener(VerticalScrollListener listener)
listener
- The listener that will be subscribed to subsequent
vertical scroll events.removeVerticalScrollListener(ilog.views.gantt.event.VerticalScrollListener)
public void removeVerticalScrollListener(VerticalScrollListener listener)
listener
- The listener that will be unsubscribed from receiving
vertical scroll events.addVerticalScrollListener(ilog.views.gantt.event.VerticalScrollListener)
public Date getMinVisibleTime()
time scrollable
objects can show in
bounded scrolling mode.null
if the configuration
is in unbounded scrolling mode.setMinVisibleTime(java.util.Date)
public void setMinVisibleTime(Date min)
time scrollable
objects can show in
bounded scrolling mode. The current visible time
and duration
are trimmed to fit the new
min-max interval by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A minVisibleTimeChanged event
is then fired to all
registered listeners
.
If min > maxVisibleTime
an
IllegalArgumentException
will be thrown.min
- The minimum visible time or null
to set the
configuration to unbounded scrolling mode.getMinVisibleTime()
public Date getMaxVisibleTime()
time scrollable
objects can show in
bounded scrolling mode.null
if the configuration
is in unbounded scrolling mode.setMaxVisibleTime(java.util.Date)
public void setMaxVisibleTime(Date max)
time scrollable
objects can show in
bounded scrolling mode. The current visible
time
and duration
are
trimmed to fit the new min-max interval by calling the
IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A
maxVisibleTimeChanged
event
is then fired to all registered
listeners
. If max < minVisibleTime
an
IllegalArgumentException
will be thrown.max
- The maximum visible time or null
to set the
configuration to unbounded scrolling mode.getMaxVisibleTime()
public IlvDuration getMinVisibleDuration()
time scrollable
objects can show.
This value indicates the
maximum zoom level that can be displayed. The default value is 1 minute.setMinVisibleDuration(ilog.views.gantt.IlvDuration)
public void setMinVisibleDuration(IlvDuration duration)
time scrollable
objects can show.
This specifies the maximum zoom level that can be displayed. A
minVisibleDurationChanged event
is fired to all registered listeners
.duration
- The minimum visible duration.getMinVisibleDuration()
public Date getVisibleTime()
time scrollable
objects.setVisibleTime(java.util.Date)
public void setVisibleTime(Date time)
time scrollable
objects.
The specified time value is compared against the
min
and max
visible
times and is trimmed if necessary by calling the
IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A
VisibleTimeChangedEvent
is then fired to all
registered listeners
. If you are changing
both the visible time and duration, it is preferable to use the
setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)
method instead.time
- The new time value.getVisibleTime()
public IlvDuration getVisibleDuration()
time scrollable
objects.setVisibleDuration(ilog.views.gantt.IlvDuration)
public void setVisibleDuration(IlvDuration duration)
time scrollable
objects.
The specified duration is compared against the
min
and max
visible
times and is trimmed if necessary by calling the
IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A
VisibleDurationChangedEvent
is then fired to all
registered listeners
. If you are changing
both the visible time and duration, it is preferable to use the
setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)
method instead.duration
- The new duration value.getVisibleDuration()
public IlvTimeInterval getVisibleInterval()
time scrollable
objects.setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)
public void setVisibleInterval(Date time, IlvDuration duration)
time scrollable
objects. The specified
interval is compared against the min
and
max
visible times and is trimmed if necessary
by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. This method
then fires an adjusting VisibleTimeChangedEvent
followed by a
VisibleDurationChangedEvent
to all
registered listeners
.time
- The new time value.duration
- The new duration value.getVisibleInterval()
public final int getVisibleIntervalAnimationSteps()
visible interval
of the configuration. The
default value of zero
indicates that animation is disabled.setVisibleIntervalAnimationSteps(int)
public final void setVisibleIntervalAnimationSteps(int steps)
visible interval
of the configuration. The
default value of zero
disables the animation.steps
- The number of animation steps, or 0 to disable animation.getVisibleIntervalAnimationSteps()
public void addTimeScrollable(IlvTimeScrollable ts)
IlvTimeScrollable
object to be coordinated by this
configuration.ts
- The time scrollable object.removeTimeScrollable(ilog.views.gantt.IlvTimeScrollable)
public void removeTimeScrollable(IlvTimeScrollable ts)
IlvTimeScrollable
object so that it is no longer
coordinated by this configuration.ts
- The time scrollable object.addTimeScrollable(ilog.views.gantt.IlvTimeScrollable)
public void addTimeScrollListener(TimeScrollListener listener)
listener
- The listener that will be subscribed to subsequent time
scroll events.removeTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)
public void removeTimeScrollListener(TimeScrollListener listener)
listener
- The listener that will be unsubscribed from receiving
time scroll events.addTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)
public IlvCacheManager getCacheManager()
public boolean isReservationCachingEnabled()
false
.setReservationCachingEnabled(boolean)
public void setReservationCachingEnabled(boolean enabled)
Gantt data model
currently {enabled
- true
to enable reservation caching, or false
to disable it.isReservationCachingEnabled()
public float getReservationCacheLoadThreshold()
queries the Gantt data model
for reservations that fall within the new
interval. The threshold is expressed as a fraction of the configuration's
current visible duration
.
Higher values mean that the reservation cache will query the data model
more frequently. A value of 0 means that the data model will not be queried
until the visible interval is scrolled
to the
current limits of the cache. The default value is 0.25.
For example, let us assume that the reservation cache has a time interval from May 1 to May 20, a duration of 20 days, the current visible interval is 8 days, and the reservationCacheLoadThreshold is 0.25. The reservation cache's time interval will be expanded, and therefore new reservations will be loaded from the data model, when the visible interval is scrolled to be within 2 days (0.25 * 8) of May 1 or May 20.
May 1 May 20 |<----------reservation cache--------->| -> |<-2 days ->| <-2 days | |<----visible--->| | | 8 days | threshold threshold
setReservationCacheLoadThreshold(float)
,
getReservationCacheLoadFactor()
,
setReservationCacheLoadFactor(float)
public void setReservationCacheLoadThreshold(float loadThreshold)
queries the Gantt data model
for reservations that fall within the new
interval. The threshold is expressed as a fraction of the configuration's
current visible duration
and
must be >=0. Higher values mean that the reservation cache will query
the data model more frequently. A value of 0 means that the data model will
not be queried until the visible interval is
scrolled
to the current limits of the cache. You
should not set a threshold that is larger than the
reservationCacheLoadFactor
because
the cache will still exceed the threshold after its interval is expanded.
For example, assume that the reservation cache has a time interval from May 1 to May 20, a duration of 20 days, the current visible interval is 8 days, and the reservationCacheLoadThreshold is 0.25. The reservation cache's time interval will be expanded, and therefore new reservations will be loaded from the data model, when the visible interval is scrolled to be within 2 days (0.25 * 8) of May 1 or May 20.
May 1 May 20 |<----------reservation cache--------->| -> |<-2 days ->| <-2 days | |<----visible--->| | | 8 days | threshold threshold
loadThreshold
- The reservation cache load threshold, as a fraction of the
current visible duration.getReservationCacheLoadThreshold()
,
getReservationCacheLoadFactor()
,
setReservationCacheLoadFactor(float)
public float getReservationCacheLoadFactor()
visible duration
. Both the cache start time
and end time are expanded by the same amount. Therefore, the cache's
interval is actually expanded by twice this value.
The default value is 1.5.
For example, assume that the configuration has a visible duration
of 10 days, has just been scrolled
to the visible
interval of June 1 to June 10, and the
reservationCacheLoadThreshold
has just been triggered. If the loadFactor is 0, the cache
will be expanded to include exactly the June 1 - June 10 interval. If the
loadFactor is 0.1, the cache will be expanded to include
the interval May 31 - June 11, which is 1 day longer (0.1 * 10) at both
ends than the visible interval.
setReservationCacheLoadFactor(float)
,
getReservationCacheLoadThreshold()
,
setReservationCacheLoadThreshold(float)
public void setReservationCacheLoadFactor(float loadFactor)
visible duration
. Both the cache start time
and end time are expanded by the same amount. Therefore, the cache's
interval is actually expanded by twice this value.
For example, assume that the configuration has a visible duration
of 10 days, has just been scrolled
to the visible
interval of June 1 to June 10, and the
reservationCacheLoadThreshold
has just been triggered. If the loadFactor is 0, the cache
will be expanded to include exactly the June 1 - June 10 interval. If the
the loadFactor is 0.1, the cache will be expanded to include
the interval May 31 - June 11, which is 1 day longer (0.1 * 10) at both
ends than the visible interval.
loadFactor
- The reservation cache load factor, as a multiple of the current
visible duration.getReservationCacheLoadFactor()
,
getReservationCacheLoadThreshold()
,
setReservationCacheLoadThreshold(float)
public void cacheAllReservations()
public void addSelectable(IlvJTree tree)
tree
- The tree component.public void addSelectable(IlvJTable table)
table
- The table component.public void addSelectable(IlvGanttSheet sheet)
sheet
- The Gantt sheet component.public void removeSelectable(IlvJTree tree)
tree
- The tree component to remove.public void removeSelectable(IlvJTable table)
table
- The table component to remove.public void removeSelectable(IlvGanttSheet sheet)
sheet
- The Gantt sheet component to remove.public boolean isRowSelected(IlvHierarchyNode row)
row
must match the row organization of this configuration. In other words, if
getRowType()
is ACTIVITY_ROWS
, then row
must
be an IlvActivity
. If getRowType()
is
RESOURCE_ROWS
, then row
must be an
IlvResource
.row
- The row.true
if the row is selected, and false
otherwise.public void selectRow(int index, boolean selected)
index
- The row index to select or deselect.selected
- true
to select the row or false
to deselect it.public void selectRow(IlvHierarchyNode row, boolean selected)
row
must
match the row organization of this configuration. In other words, if
getRowType()
is ACTIVITY_ROWS
, then row
must
be an IlvActivity
. If getRowType()
is
RESOURCE_ROWS
, then row
must be an
IlvResource
.row
- The row to select or deselect.selected
- Set to true
to select the row or false
to deselect it.public boolean isSelectionAdjusting()
true
is returned.setSelectionAdjusting(boolean)
public void setSelectionAdjusting(boolean selectionAdjusting)
true
when you want the following object
selection or deselection events to be considered as a single selection
event.selectionAdjusting
- Set to true
to indicate the start
of an adjustment session. Set to
false
to indicate the end of an
adjustment session.public void deSelectAllRows()
public IlvHierarchyNode[] getSelectedRows()
getRowType()
is ACTIVITY_ROWS
, then each row will be an
IlvActivity
.
If getRowType()
is RESOURCE_ROWS
, then each row will be an
IlvResource
.public Iterator<IlvHierarchyNode> selectedRowsIterator()
getRowType()
is ACTIVITY_ROWS
, then each row will be
an IlvActivity
. If getRowType()
is RESOURCE_ROWS
,
then each row will be an IlvResource
.public Iterator<IlvGraphic> selectedGraphicsIterator()
activities
, the selections can be
activity graphics
and/or constraint
graphics
. In a Schedule chart, where the rows are organized by
resources
, the selections can be
reservation graphics
and/or
constraint graphics
.public IlvGraphic[] getSelectedGraphics()
activities
,
the selections can be
activity graphics
and/or constraint
graphics
. In a Schedule chart, where the rows are organized by
resources
, the selections can be
reservation graphics
and/or
constraint graphics
.public boolean isGraphicSelected(IlvGraphic graphic)
graphic
- The graphic.public IlvConstraint[] getSelectedConstraints()
public IlvReservation[] getSelectedReservations()
public void addSelectionListener(SelectionListener listener)
listener
- The listener that will be subscribed to subsequent
selection events.public void removeSelectionListener(SelectionListener listener)
listener
- The listener that will be unsubscribed from receiving
selection events.public void addListener(GenericEventListener listener)
listener
so that it will receive all events
routed and published by this configuration.listener
- The listener that will be subscribed to all subsequent
events.public void addListener(GenericEventListener listener, Class eventType)
listener
so that it will receive events
published by this configuration that are instances of the specified
eventType
. This includes all events that derive from, inherit
from, or implement the specified type. This subscription is in addition to
any other subscriptions that listener
may already have with
this configuration.listener
- The listener that will be subscribed to subsequent
events.eventType
- The class of events that listener
is
interested in. If null
, then listener
will be
subscribed to all event types.public void addActivityHierarchyListener(ActivityHierarchyListener listener)
listener
may already have with this configuration.listener
- The listener that will be subscribed to subsequent
ActivityHierarchyListener
events.public void addActivityListener(ActivityListener listener)
listener
may already have with this configuration.listener
- The listener that will be subscribed to subsequent
ActivityListener
events.public void addResourceHierarchyListener(ResourceHierarchyListener listener)
listener
may already have with this configuration.listener
- The listener that will be subscribed to subsequent
ResourceHierarchyListener
events.public void addResourceListener(ResourceListener listener)
listener
may already have with this configuration.listener
- The listener that will be subscribed to subsequent
ResourceListener
events.public void addConstraintListener(ConstraintListener listener)
listener
may already have with this configuration.listener
- The listener that will be subscribed to subsequent
ConstraintListener
events.public void addReservationListener(ReservationListener listener)
listener
may already have with this configuration.listener
- The listener that will be subscribed to subsequent
ReservationListener
events.public void removeListener(EventListener listener)
listener
so that it no longer receives any events
published by this configuration.listener
- The listener that will be unsubscribed from receiving events.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.