|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
ilog.views.IlvManagerView
ilog.views.gantt.graphic.IlvGanttSheet
public class IlvGanttSheet
The IlvGanttSheet class is a lightweight graphical component
that displays activities, constraints, and reservations. It can be added to
a Gantt configuration as an expandable slave component by invoking the
IlvGanttConfiguration.addVerticalExpandable(ilog.views.gantt.IlvVerticalExpandable) method.
This class is a subclass of the ILOG JViews IlvManagerView
class. It contains a JViews grapher (IlvGrapher) to display
the activities and constraints.
The activities displayed in the IlvGanttSheet are
JViews graphic object instances of the class IlvActivityGraphic
for the activities and IlvConstraintGraphic for the
constraints.
As this class is a view of a manager, you can set interactors
on it. These interactors provide different types of
interactions. The library includes predefined interactors to select and
edit the activities in the gantt sheet, such as
IlvGanttSelectInteractor, but you can create your own type
of interactor using IlvManagerViewInteractor.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ilog.views.IlvManagerView |
|---|
IlvManagerView.FitAreaCalculator |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
CASCADE_ACTIVITY_LAYOUT
Deprecated. Beginning with ILOG JViews 6.0 instantiate an IlvActivityLogisticLayout(IlvActivityLogisticLayout.CASCADE)
and call setActivityLayout(IlvActivityLayout). |
static int |
PRETTY_ACTIVITY_LAYOUT
Deprecated. Beginning with ILOG JViews 6.0 instantiate an IlvActivityLogisticLayout(IlvActivityLogisticLayout.PRETTY)
and call setActivityLayout(IlvActivityLayout). |
static int |
SIMPLE_ACTIVITY_LAYOUT
Deprecated. Beginning with ILOG JViews 6.0 instantiate an IlvActivitySimpleLayout and call
setActivityLayout(IlvActivityLayout). |
static int |
TILE_ACTIVITY_LAYOUT
Deprecated. Beginning with ILOG JViews 6.0 instantiate an IlvActivityLogisticLayout(IlvActivityLogisticLayout.TILE)
and call setActivityLayout(IlvActivityLayout). |
static String |
TIME_CONVERTER_PROPERTY
Identifies a change to the time converter of the Gantt sheet. |
| Fields inherited from class ilog.views.IlvManagerView |
|---|
DIRECT_REDRAW, THREADED_REDRAW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
IlvGanttSheet()
Creates a new IlvGanttSheet. |
|
| Method Summary | |
|---|---|
Iterator |
activityGraphicsIterator()
Returns an iterator over all the activity graphics
in the Gantt sheet. |
Iterator |
activityGraphicsIterator(IlvActivity activity)
Returns an iterator over the activity graphics
representing the specified activity in the Gantt sheet. |
void |
addTimeIndicator(IlvTimeIndicator timeIndicator)
Adds a time indicator to the Gantt sheet. |
void |
addTimeScrollListener(TimeScrollListener listener)
Adds the specified listener to receive time scroll events from this Gantt sheet. |
void |
beginRedrawSession(boolean redrawSheet)
Starts a redraw session that must be terminated by calling endRedrawSession(). |
Iterator |
constraintGraphicsIterator()
Returns an iterator over all the constraint graphics
in the Gantt sheet. |
IlvGanttGridContext |
createGridContext()
This function creates an IlvGanttGridContext for the
Gantt sheet. |
IlvTimeIndicatorContext |
createTimeIndicatorContext()
This function creates an IlvTimeIndicatorContext for the
Gantt sheet. |
void |
endRedrawSession()
Ends a redraw session that was begun by calling beginRedrawSession(boolean). |
protected void |
fireVisibleDurationChanged()
This method is called to fire a visible duration value modification. |
protected void |
fireVisibleTimeChanged(boolean adjusting)
This method is called to fire a time value modification. |
void |
ganttModelChanged(GanttModelChangedEvent event)
Invoked by the Gantt configuration when the data model has been replaced. |
IlvGanttRow |
ganttRowFromPosition(int y)
Returns the Gantt row from the specified y position in the sheet. |
Iterator |
ganttRowIterator()
Returns an iterator over all of the Gantt rows in this sheet, both visible and hidden. |
IlvActivityFactory |
getActivityFactory()
Returns the activity factory for creating activities. |
IlvActivityGraphic |
getActivityGraphic(IlvActivity activity)
Returns the first activity graphic representing
the specified activity in the Gantt sheet. |
int |
getActivityGraphicLayerIndex()
Returns the index of the layer that contains the activity graphics. |
Collection |
getActivityGraphics()
Returns a collection of all the activity graphics
in the Gantt sheet. |
IlvActivityGraphic[] |
getActivityGraphics(IlvActivity activity)
Deprecated. Beginning with ILOG JViews 6.0 you should use the activityGraphicsIterator(IlvActivity) method instead. It is
much more efficient than this method. |
IlvActivityLayout |
getActivityLayout()
Returns the activity layout used for activity rows in the sheet. |
IlvActivityRendererFactory |
getActivityRendererFactory()
Returns the activity-renderer factory used to create activity graphics. |
IlvConstraintFactory |
getConstraintFactory()
Returns the constraint factory used for creating constraints. |
IlvConstraintGraphic |
getConstraintGraphic(IlvConstraint constraint)
Returns the constraint graphic representing
the specified constraint in the Gantt sheet. |
IlvConstraintGraphicFactory |
getConstraintGraphicFactory()
Returns the constraint-graphics factory used to create constraint graphics. |
int |
getConstraintGraphicLayerIndex()
Deprecated. JViews 8.1 introduces the ability to have several layers of constraints within the Gantt sheet. Please use getDefaultConstraintGraphicLayerIndex. |
IlvConstraintGraphicLayerPolicy |
getConstraintGraphicLayerPolicy()
Returns the policy used to manage constraint graphics. |
Collection |
getConstraintGraphics()
Returns a collection of all the constraint graphics in the Gantt sheet. |
int |
getDefaultConstraintGraphicLayerIndex()
Returns the index of the default layer that contains the constraint graphics. |
IlvTimeIndicatorReshapeFeedback |
getDefaultTimeIndicatorReshapeFeedback()
Returns the default time indicator reshape feedback. |
IlvGanttConfiguration |
getGanttConfiguration()
Returns the Gantt configuration that is managing this sheet. |
IlvGanttModel |
getGanttModel()
Returns the data model that this sheet is displaying. |
IlvGanttRow |
getGanttRowByIdentifier(IlvHierarchyNode node)
Returns the Gantt row identified by the given hierarchy node. |
int |
getGanttRowCount()
Returns the number of Gantt rows contained in this sheet, both visible and hidden. |
IlvGraphic |
getGraphic(Point2D p)
Returns the graphic located at the specified point in the Gantt sheet; otherwise, it returns null. |
Collection |
getGraphicsInside(Rectangle2D rect)
Returns a collection of the graphics that are inside the specified rectangle of the Gantt sheet. |
Collection |
getGraphicsIntersects(Rectangle2D rect)
Returns a collection of the graphics that intersect the specified rectangle of the Gantt sheet. |
IlvGanttGridRenderer |
getHorizontalGrid()
Returns the horizontal grid renderer of the Gantt sheet. |
int |
getHorizontalGridLayerIndex()
Returns the index of the layer that contains the horizontal grid. |
Date |
getMaxVisibleTime()
Returns the maximum time that the Gantt sheet can show in bounded scrolling mode. |
Date |
getMinVisibleTime()
Returns the minimum time that the Gantt sheet can show in bounded scrolling mode. |
int |
getPosition(Date t)
Returns the x position in pixels that corresponds to the specified time. |
IlvReservationFactory |
getReservationFactory()
Returns the reservation factory for creating reservations. |
IlvReservationGraphic |
getReservationGraphic(IlvReservation reservation)
Returns the IlvReservationGraphic representing the given
IlvReservation. |
IlvResourceFactory |
getResourceFactory()
Returns the registered resource factory for creating resources. |
int |
getRowHeight()
Returns the row height used when all Gantt rows are set to have the same height. |
Date |
getTime(int x)
Returns the time that corresponds to the specified x position. |
IlvTimeConverter |
getTimeConverter()
Returns the time converter. |
IlvTimeIndicator |
getTimeIndicator(Date date)
Returns the time indicator graphic representing
the specified date, or the current date in the Gantt sheet. |
int |
getTimeIndicatorLayerIndex()
Returns the index of the layer that contains the time indicator graphics. |
Collection |
getTimeIndicators()
Returns a collection of all the time indicator graphics in the Gantt sheet. |
IlvGanttGridRenderer |
getVerticalGrid()
Returns the vertical grid renderer of the Gantt sheet. |
int |
getVerticalGridLayerIndex()
Returns the index of the layer that contains the vertical grid. |
IlvDuration |
getVisibleDuration()
Returns the duration of the time interval displayed by the Gantt sheet. |
IlvGanttRow |
getVisibleGanttRowAt(int index)
Returns the visible Gantt row at the given position. |
int |
getVisibleGanttRowCount()
Returns the number of visible rows in this Gantt sheet. |
int |
getVisibleGanttRowIndex(IlvGanttRow ganttRow)
Returns the index of the given visible Gantt row. |
IlvTimeInterval |
getVisibleInterval()
Returns the time interval displayed by the Gantt sheet. |
Date |
getVisibleTime()
Returns the beginning of the time interval displayed by the Gantt sheet. |
boolean |
isConstantZoomFactorOnWidthChange()
Returns whether the visible duration of the Gantt sheet is modified when its width changes in order to maintain a constant zoom factor. |
boolean |
isConstraintLayerVisible()
Deprecated. JViews 8.1 introduces the ability to have several layers of constraints within the Gantt sheet. Please use isDefaultConstraintLayerVisible. |
boolean |
isDefaultConstraintLayerVisible()
Returns whether the default constraint layer is visible. |
boolean |
isDisplayingConstraints()
Returns whether the Gantt sheet is displaying constraints. |
boolean |
isMultipleRowActivityGraphicsEnabled()
Returns whether activity graphics are
allowed to be drawn over multiple rows. |
boolean |
isParentActivityEditable()
If this function returns false, the activity graphics
representing parent activities are considered as not editable. |
boolean |
isParentActivityMovable()
If this function returns false, the activity graphics that
represent parent activities are considered as not movable. |
boolean |
isPopupMenusEnabled()
Returns true if popup menus are enabled for the Gantt sheet. |
boolean |
isRefreshMilestoneRenderer()
When the time interval of an activity becomes null, the
start and end times become identical. |
boolean |
isRefreshParentActivityRenderer()
When a leaf activity that has no children becomes a parent or vice versa, the renderer of the activity will be refreshed if this function returns true. |
boolean |
isTimeIndicatorLayerVisible()
Returns whether the time indicator layer is visible. |
boolean |
isToolTipsEnabled()
Returns true if tooltips are enabled for the Gantt sheet. |
void |
paint(Graphics g)
When this function is called for the first time, it calculates the transformer of the Gantt sheet for the visible time and the visible duration. |
void |
print(Graphics dst,
IlvRect area,
IlvTransformer t)
Prints the contents of the Gantt sheet to the specified Graphics. |
void |
print(Graphics dst,
Rectangle viewport,
IlvTransformer t)
Prints the contents of the Gantt sheet to the specified Graphics. |
void |
removeTimeIndicator(IlvTimeIndicator timeIndicator)
Removes a time indicator from the Gantt sheet. |
void |
removeTimeScrollListener(TimeScrollListener listener)
Removes the specified listener so that it will no longer receive time scroll events from this Gantt sheet. |
void |
replaceConstraintGraphic(IlvConstraintGraphic oldGraphic,
IlvConstraintGraphic newGraphic,
boolean redraw)
Replaces a constraint graphic in the Gantt
sheet with another one. |
void |
replaceTimeIndicator(IlvTimeIndicator oldGraphic,
IlvTimeIndicator newGraphic,
boolean redraw)
Replaces an time indicator graphic in the
Gantt sheet with another one. |
void |
rowCollapsed(RowCollapsedEvent event)
Invoked by the Gantt configuration when a node has been collapsed in the data tree. |
void |
rowExpanded(RowExpandedEvent event)
Invoked by the Gantt configuration when a node has been expanded in the data tree. |
void |
rowHeightChanged(RowHeightChangedEvent event)
This method is invoked by the Gantt
configuration when the row height has been changed. |
void |
rowMoved(RowMovedEvent event)
Invoked by the Gantt configuration when a node has been moved within the data tree. |
void |
rowsInserted(RowsInsertedEvent event)
Invoked by the Gantt configuration when children have been inserted into the same parent node in the data tree. |
void |
rowsRemoved(RowsRemovedEvent event)
Invoked by the Gantt configuration when children have been removed from the same parent node in the data tree. |
void |
setActivityFactory(IlvActivityFactory factory)
Sets the activity factory for creating activities. |
void |
setActivityLayout(IlvActivityLayout activityLayout)
Sets the activity layout used for activity rows in the sheet. |
void |
setActivityLayout(int activityLayout)
Deprecated. Beginning with ILOG JViews 6.0 use setActivityLayout(IlvActivityLayout) instead. |
void |
setActivityRenderer(IlvActivity activity,
IlvActivityRenderer renderer)
Changes the activity renderer for all the activity graphics
representing the specified activity in the Gantt sheet. |
void |
setActivityRendererFactory(IlvActivityRendererFactory factory)
Sets the activity-renderer factory used to create activity graphics. |
void |
setConstantZoomFactorOnWidthChange(boolean enabled)
Sets whether the visible duration of the Gantt sheet will be modified when its width changes in order to maintain a constant zoom factor. |
void |
setConstraintFactory(IlvConstraintFactory factory)
Set the constraint factory for constraint creation. |
void |
setConstraintGraphicFactory(IlvConstraintGraphicFactory factory)
Sets the constraint-graphics factory used to create constraint graphics. |
void |
setConstraintGraphicLayerPolicy(IlvConstraintGraphicLayerPolicy policy)
Sets the policy that is used to manage constraint graphics. |
void |
setConstraintLayerVisible(boolean visible)
Deprecated. JViews 8.1 introduces the ability to have several layers of constraints within the Gantt sheet. Please use setDefaultConstraintLayerVisible. |
void |
setDefaultConstraintLayerVisible(boolean visible)
Changes the visibility of the default constraint graphic layer. |
void |
setDisplayingConstraints(boolean enable)
Sets whether the Gantt sheet is displaying constraints. |
void |
setExpandableGanttConfigurationImpl(IlvGanttConfiguration ganttConfig)
Sets the Gantt configuration that this Gantt sheet is coordinating with. |
void |
setHorizontalGrid(IlvGanttGridRenderer grid)
Sets the horizontal grid renderer for the Gantt sheet. |
void |
setMaxVisibleTime(Date max)
Sets the maximum time that the Gantt sheet can show in bounded scrolling mode. |
void |
setMinVisibleTime(Date min)
Sets the minimum time that the Gantt sheet can show in bounded scrolling mode. |
void |
setMultipleRowActivityGraphicsEnabled(boolean enable)
Enables or disables the capability of activity
graphics to be drawn over multiple rows. |
void |
setParentActivityEditable(boolean editable)
Defines whether the parent activity graphics are editable or not. |
void |
setParentActivityMovable(boolean movable)
Defines whether the parent activity graphics are movable or not. |
void |
setPopupMenusEnabled(boolean enable)
Sets whether popup menus are enabled for the Gantt sheet. |
void |
setRefreshMilestoneRenderer(boolean update)
Defines whether an activity renderer should be refreshed when the activity time interval changes from null to non-null
or vice versa. |
void |
setRefreshParentActivityRenderer(boolean update)
Defines whether an activity renderer should be refreshed or not when the activity changes from a leaf activity to a parent activity or vice versa. |
void |
setReservationFactory(IlvReservationFactory factory)
Sets the reservation factory for creating reservations. |
void |
setReservationRenderer(IlvReservation reservation,
IlvActivityRenderer renderer)
This method first finds the reservation graphic that represents the specified reservation and then changes the activity renderer of the reservation graphic. |
void |
setResourceFactory(IlvResourceFactory factory)
Registers the resource factory for creating resources. |
void |
setRowHeight(int rowHeight)
Sets all Gantt rows to have the same height. |
void |
setTimeConverter(IlvTimeConverter timeConverter)
Sets the time converter. |
void |
setTimeIndicatorLayerVisible(boolean visible)
Changes the visibility of the time indicator layer. |
void |
setToolTipsEnabled(boolean enable)
Sets whether tooltips are enabled for the Gantt sheet. |
void |
setVerticalGrid(IlvGanttGridRenderer grid)
Sets the vertical grid renderer for the Gantt sheet. |
void |
setVisibleDuration(IlvDuration duration)
Sets the duration of the time interval displayed by the Gantt sheet. |
void |
setVisibleInterval(Date time,
IlvDuration duration)
Sets the time interval displayed by the Gantt sheet. |
void |
setVisibleTime(Date time)
Sets the beginning of the time interval displayed by the Gantt sheet. |
void |
swapLayers(int layer1,
int layer2)
Swaps two layers and changes their indices. |
Iterator |
timeIndicatorsIterator()
Returns an iterator over all the time indicator graphics
in the Gantt sheet. |
protected void |
transformerChanged(IlvTransformer newTransformer,
IlvTransformer oldTransformer)
This method is called when the transformer changes. |
void |
translate(float deltax,
float deltay,
boolean redraw)
Translates the view. |
void |
verifyTransformer()
This function ensures that 1) the Gantt sheet does not zoom vertically; 2) there is no shown space above the visible Gantt rows; 3) if all visible Gantt rows can be displayed in the Gantt sheet, any vertical scrolling is canceled. |
protected void |
widthChanged(int width)
This method is invoked when the Gantt sheet's width has been modified. |