ilog.views.gantt.graphic
Class IlvGanttSheet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--ilog.views.IlvManagerView
                    |
                    +--ilog.views.gantt.graphic.IlvGanttSheet

public class IlvGanttSheet
extends IlvManagerView
implements IlvVerticalExpandable, IlvTimeScrollable

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.

IlvGanttSheet

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.


Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int CASCADE_ACTIVITY_LAYOUT
          The activity graphics in a Gantt row will be displayed in cascade.
static int PRETTY_ACTIVITY_LAYOUT
          This field is similar to CASCADE_ACTIVITY_LAYOUT, except that the z-order, the order in which the activity graphics are displayed, is adjusted so that activity graphics that have a smaller y position are displayed first.
static int SIMPLE_ACTIVITY_LAYOUT
          The activity graphics in a Gantt row will be arranged to have the same y position and the same height.
static int TILE_ACTIVITY_LAYOUT
          The activity graphics in a Gantt row will be tiled.
 
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
 
Constructor Summary
IlvGanttSheet()
          Creates a new IlvGanttSheet.
 
Method Summary
 Iterator activityGraphicsIterator()
          Returns an iterator over all the activity graphics in the Gantt sheet.
 void addTimeScrollListener(TimeScrollListener listener)
          Adds the specified listener to receive time scroll events from this Gantt sheet.
 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.
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.
 Collection getActivityGraphics()
          Returns a collection of all the activity graphics in the Gantt sheet.
 IlvActivityGraphic[] getActivityGraphics(IlvActivity activity)
          Returns an array of the activity graphics representing the specified activity in the Gantt sheet.
 int 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.
 Collection getConstraintGraphics()
          Returns a collection of all the constraint graphics in the Gantt sheet.
 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.
 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.
 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.
 IlvTimeConverter getTimeConverter()
          Returns the time converter.
 IlvGanttGridRenderer getVerticalGrid()
          Returns the vertical grid renderer of the Gantt sheet.
 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 isConstraintLayerVisible()
          Returns whether the constraint layer is visible.
 boolean isDisplayingConstraints()
          Returns whether the Gantt sheet is displaying constraints.
 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 isParentActivityMoveable()
          Deprecated. Use isParentActivityMovable() instead.
 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 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 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 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(int activityLayout)
          Sets the activity layout used for activity rows in the sheet.
 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 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 setConstraintLayerVisible(boolean visible)
          Changes the visibility of the 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 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 setParentActivityMoveable(boolean movable)
          Deprecated. Use setParentActivityMovable(boolean) instead.
 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 the row height.
 void setTimeConverter(IlvTimeConverter timeConverter)
          Sets the time converter.
 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.
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.
 
Methods inherited from class ilog.views.IlvManagerView
addInteractorListener, addManagerChangedListener, addNotify, addTransformer, addTransformerListener, addViewDecoration, computeBBox, computeBBox, ensureVisible, ensureVisible, fitTransformerToContent, fitTransformerToContent, getBackgroundPattern, getBackgroundPatternLocation, getCursor, getDefaultGhostColor, getDefaultXORColor, getGrid, getInteractor, getManager, getMaximumSize, getMaxZoomXFactor, getMaxZoomYFactor, getMinimumSize, getMinZoomXFactor, getMinZoomYFactor, getPreferredSize, getRedrawMode, getRegion, getTransformer, getTripleBufferedLayerCount, getViewDecoration, getViewDecorationCount, imageUpdate, interactorChanged, invalidateRect, invalidateTripleBuffer, invalidateView, isAntialiasing, isAtZoomXFactorLimit, isAtZoomYFactorLimit, isAutoFitToContents, isDoubleBuffering, isEventDispatching, isKeepingAspectRatio, isOptimizedTranslation, isTransparent, isVisible, managerChanged, popInteractor, processEvent, processKeyEvent, pushInteractor, pushInteractor, reDrawViews, removeAllInteractors, removeInteractorListener, removeManagerChangedListener, removeNotify, removeTransformerListener, removeViewDecoration, repaint, repaint, setAntialiasing, setAutoFitToContents, setBackground, setBackgroundPattern, setBackgroundPatternLocation, setBounds, setCursor, setDefaultGhostColor, setDefaultXORColor, setDoubleBuffering, setEventDispatching, setGrid, setInteractor, setKeepingAspectRatio, setManager, setMaximumSize, setMaxZoomXFactor, setMaxZoomYFactor, setMinimumSize, setMinZoomXFactor, setMinZoomYFactor, setOptimizedTranslation, setPreferredSize, setRedrawMode, setTransformer, setTransparent, setTripleBufferedLayerCount, setVisible, setZoomFactorRange, snapToGrid, update, visibleRect, zoom
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIMPLE_ACTIVITY_LAYOUT

public static final int SIMPLE_ACTIVITY_LAYOUT
The activity graphics in a Gantt row will be arranged to have the same y position and the same height.
See Also:
IlvGanttRow.getActivityHeight(), IlvGanttRow.getTopMargin(), CASCADE_ACTIVITY_LAYOUT, TILE_ACTIVITY_LAYOUT, PRETTY_ACTIVITY_LAYOUT, getActivityLayout(), setActivityLayout(int)

TILE_ACTIVITY_LAYOUT

public static final int TILE_ACTIVITY_LAYOUT
The activity graphics in a Gantt row will be tiled. The height of the activity graphics may have to be adjusted to avoid having activity graphics overlap.
See Also:
SIMPLE_ACTIVITY_LAYOUT, CASCADE_ACTIVITY_LAYOUT, PRETTY_ACTIVITY_LAYOUT, getActivityLayout(), setActivityLayout(int)

CASCADE_ACTIVITY_LAYOUT

public static final int CASCADE_ACTIVITY_LAYOUT
The activity graphics in a Gantt row will be displayed in cascade. The y position of the activity graphics may have to be adjusted to avoid the overlapping of activity graphics with the same y position. The z-order, which is the order in which the activity graphics are displayed, remains unchanged.
See Also:
SIMPLE_ACTIVITY_LAYOUT, CASCADE_ACTIVITY_LAYOUT, TILE_ACTIVITY_LAYOUT, PRETTY_ACTIVITY_LAYOUT, getActivityLayout(), setActivityLayout(int)

PRETTY_ACTIVITY_LAYOUT

public static final int PRETTY_ACTIVITY_LAYOUT
This field is similar to CASCADE_ACTIVITY_LAYOUT, except that the z-order, the order in which the activity graphics are displayed, is adjusted so that activity graphics that have a smaller y position are displayed first.
See Also:
SIMPLE_ACTIVITY_LAYOUT, CASCADE_ACTIVITY_LAYOUT, TILE_ACTIVITY_LAYOUT, getActivityLayout(), setActivityLayout(int)
Constructor Detail

IlvGanttSheet

public IlvGanttSheet()
Creates a new IlvGanttSheet.
Method Detail

getGanttConfiguration

public final IlvGanttConfiguration getGanttConfiguration()
Returns the Gantt configuration that is managing this sheet.

getGanttModel

public final IlvGanttModel getGanttModel()
Returns the data model that this sheet is displaying.
Since:
JViews 5.5

getActivityRendererFactory

public IlvActivityRendererFactory getActivityRendererFactory()
Returns the activity-renderer factory used to create activity graphics. The default value is an instance of IlvDefaultActivityRendererFactory.
See Also:
setActivityRendererFactory(ilog.views.gantt.graphic.IlvActivityRendererFactory)

setActivityRendererFactory

public void setActivityRendererFactory(IlvActivityRendererFactory factory)
Sets the activity-renderer factory used to create activity graphics.
See Also:
getActivityRendererFactory()

getConstraintGraphicFactory

public IlvConstraintGraphicFactory getConstraintGraphicFactory()
Returns the constraint-graphics factory used to create constraint graphics. The default value is an instance of IlvDefaultConstraintGraphicFactory.
Since:
JViews 3.5
See Also:
setConstraintGraphicFactory(ilog.views.gantt.graphic.IlvConstraintGraphicFactory)

setConstraintGraphicFactory

public void setConstraintGraphicFactory(IlvConstraintGraphicFactory factory)
Sets the constraint-graphics factory used to create constraint graphics.
Since:
JViews 3.5
See Also:
getConstraintGraphicFactory()

getConstraintFactory

public IlvConstraintFactory getConstraintFactory()
Returns the constraint factory used for creating constraints. This factory is usually used by IlvMakeConstraintInteractor.
See Also:
setConstraintFactory(ilog.views.gantt.IlvConstraintFactory)

setConstraintFactory

public void setConstraintFactory(IlvConstraintFactory factory)
Set the constraint factory for constraint creation. This factory will be used by IlvMakeConstraintInteractor.
See Also:
getConstraintFactory()

getActivityFactory

public IlvActivityFactory getActivityFactory()
Returns the activity factory for creating activities. This factory is usually used by IlvMakeActivityInteractor.
See Also:
setActivityFactory(ilog.views.gantt.IlvActivityFactory)

setActivityFactory

public void setActivityFactory(IlvActivityFactory factory)
Sets the activity factory for creating activities. This factory is usually used by IlvMakeActivityInteractor.
See Also:
getActivityFactory()

getReservationFactory

public IlvReservationFactory getReservationFactory()
Returns the reservation factory for creating reservations. This factory is usually used by IlvMakeActivityInteractor.
See Also:
setReservationFactory(ilog.views.gantt.IlvReservationFactory)

setReservationFactory

public void setReservationFactory(IlvReservationFactory factory)
Sets the reservation factory for creating reservations. This factory is usually used by IlvMakeActivityInteractor.
See Also:
getReservationFactory()

getResourceFactory

public IlvResourceFactory getResourceFactory()
Returns the registered resource factory for creating resources.
See Also:
setResourceFactory(ilog.views.gantt.IlvResourceFactory)

setResourceFactory

public void setResourceFactory(IlvResourceFactory factory)
Registers the resource factory for creating resources.
See Also:
getResourceFactory()

isDisplayingConstraints

public boolean isDisplayingConstraints()
Returns whether the Gantt sheet is displaying constraints. The default value is true for an IlvGanttConfiguration that has a row type of ACTIVITY_ROWS, as in a Gantt chart. The default value is false for a configuration that has a row type of RESOURCE_ROWS, as in a Schedule chart.
Since:
JViews 5.0
See Also:
setDisplayingConstraints(boolean)

setDisplayingConstraints

public void setDisplayingConstraints(boolean enable)
Sets whether the Gantt sheet is displaying constraints. The default value is true for an IlvGanttConfiguration that has a row type of ACTIVITY_ROWS, as in a Gantt chart. The default value will be false for a configuration that has a row type of RESOURCE_ROWS, as in a Schedule chart.

Displaying constraints in a resource-oriented Schedule chart is only guaranteed to work correctly if each activity participates in 0 or 1 reservations. If an activity participates in 2 or more reservations, the Schedule chart will not display constraints in an intuitive manner. The Gantt sheet does not check to ensure that this is the case. It is up to the data model to adhere to this restriction.

Parameters:
enable - Indicates whether to display constraints.
Since:
JViews 5.0
See Also:
isDisplayingConstraints()

isConstraintLayerVisible

public boolean isConstraintLayerVisible()
Returns whether the constraint layer is visible. The default value is true.
See Also:
setConstraintLayerVisible(boolean)

setConstraintLayerVisible

public void setConstraintLayerVisible(boolean visible)
Changes the visibility of the constraint graphic layer.
Parameters:
visible - The visibility of the constraint layer.
See Also:
isConstraintLayerVisible()

setExpandableGanttConfigurationImpl

public void setExpandableGanttConfigurationImpl(IlvGanttConfiguration ganttConfig)
Sets the Gantt configuration that this Gantt sheet is coordinating with. This method is invoked when the sheet is added to the configuration through its addVerticalExpandable method. The sheet initially synchronizes 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 Gantt sheet 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 IlvVerticalExpandable's internal implementation and is not a public API. Only the Gantt configuration should invoke this method.

Specified by:
setExpandableGanttConfigurationImpl in interface IlvVerticalExpandable
Parameters:
ganttConfig - The Gantt configuration that this Gantt sheet is being added to, or null if this sheet is being removed from its Gantt configuration.

ganttModelChanged

public void ganttModelChanged(GanttModelChangedEvent event)
Invoked by the Gantt configuration when the data model has been replaced.
Specified by:
ganttModelChanged in interface IlvVerticalExpandable
Parameters:
event - The event.

rowsInserted

public void rowsInserted(RowsInsertedEvent event)
Invoked by the Gantt configuration when children have been inserted into the same parent node in the data tree.
Parameters:
event - The event.

rowsRemoved

public void rowsRemoved(RowsRemovedEvent event)
Invoked by the Gantt configuration when children have been removed from the same parent node in the data tree.
Parameters:
event - The event.

rowMoved

public void rowMoved(RowMovedEvent event)
Invoked by the Gantt configuration when a node has been moved within the data tree.
Parameters:
event - The event.

rowExpanded

public void rowExpanded(RowExpandedEvent event)
Invoked by the Gantt configuration when a node has been expanded in the data tree.
Parameters:
event - The event.

rowCollapsed

public void rowCollapsed(RowCollapsedEvent event)
Invoked by the Gantt configuration when a node has been collapsed in the data tree.
Parameters:
event - The event.

rowHeightChanged

public void rowHeightChanged(RowHeightChangedEvent event)
This method is invoked by the Gantt configuration when the row height has been changed.
Parameters:
event - The event.
Since:
JViews 3.5

getGanttRowCount

public int getGanttRowCount()
Returns the number of Gantt rows contained in this sheet, both visible and hidden.

ganttRowIterator

public Iterator ganttRowIterator()
Returns an iterator over all of the Gantt rows in this sheet, both visible and hidden.
Since:
JViews 3.5

getVisibleGanttRowCount

public int getVisibleGanttRowCount()
Returns the number of visible rows in this Gantt sheet.

getVisibleGanttRowAt

public IlvGanttRow getVisibleGanttRowAt(int index)
Returns the visible Gantt row at the given position. If index is 0, this function returns the first visible Gantt row. It returns null if there is no visible Gantt row at the specified position.
Parameters:
index - The row index.

getVisibleGanttRowIndex

public int getVisibleGanttRowIndex(IlvGanttRow ganttRow)
Returns the index of the given visible Gantt row.
Parameters:
ganttRow - The Gantt row.
Returns:
The index of the Gantt row. If the Gantt row is not in the Gantt sheet or is not visible, this function returns -1.

getGanttRowByIdentifier

public IlvGanttRow getGanttRowByIdentifier(IlvHierarchyNode node)
Returns the Gantt row identified by the given hierarchy node. This hierarchy node can be an activity or a resource.
Parameters:
node - The given node.
Returns:
The Gantt row identified by the given node.

ganttRowFromPosition

public IlvGanttRow ganttRowFromPosition(int y)
Returns the Gantt row from the specified y position in the sheet. The y position is defined in pixels.
Returns:
A Gantt row or null if there is no row at this position.

getGraphic

public IlvGraphic getGraphic(Point2D p)
Returns the graphic located at the specified point in the Gantt sheet; otherwise, it returns null. In a Gantt chart, where the rows are organized by activities, the graphic can be an activity graphic or a constraint graphic. In a Schedule chart, where the rows are organized by resources, the graphic can be a reservation graphic or a constraint graphic.
Parameters:
p - The point, relative to the display area.
Since:
JViews 5.5

getGraphicsInside

public Collection getGraphicsInside(Rectangle2D rect)
Returns a collection of the graphics that are inside the specified rectangle of the Gantt sheet. In a Gantt chart, where the rows are organized by activities, the graphics can be activity graphics and/or constraint graphics. In a Schedule chart, where the rows are organized by resources, the graphics can be reservation graphics or constraint graphics.
Parameters:
rect - The rectangle, relative to the display area.
Since:
JViews 5.5

getGraphicsIntersects

public Collection getGraphicsIntersects(Rectangle2D rect)
Returns a collection of the graphics that intersect the specified rectangle of the Gantt sheet. In a Gantt chart, where the rows are organized by activities, the graphics can be activity graphics and/or constraint graphics. In a Schedule chart, where the rows are organized by resources, the graphics can be reservation graphics or constraint graphics.
Parameters:
rect - The rectangle, relative to the display area.
Since:
JViews 5.5

activityGraphicsIterator

public Iterator activityGraphicsIterator()
Returns an iterator over all the activity graphics in the Gantt sheet. The iteration includes both the graphics that are visible and those that are hidden. The iterator will traverse over a copy of the collection of graphics.
Returns:
An iterator over the IlvActivityGraphics.
Since:
JViews 5.5

getActivityGraphics

public Collection getActivityGraphics()
Returns a collection of all the activity graphics in the Gantt sheet. The collection of graphics includes both those that are visible and those that are hidden. The collection will be a copy of the graphics in the sheet.
Returns:
The collection of IlvActivityGraphics.
Since:
JViews 5.5

getActivityGraphics

public IlvActivityGraphic[] getActivityGraphics(IlvActivity activity)
Returns an array of the activity graphics representing the specified activity in the Gantt sheet. The array of graphics includes both those that are visible and those that are hidden.
Parameters:
activity - The activity.
Returns:
The array of graphics or null if no activity graphics are found.

getActivityGraphic

public IlvActivityGraphic getActivityGraphic(IlvActivity activity)
Returns the first activity graphic representing the specified activity in the Gantt sheet. The graphic may be visible or it may be hidden.
Parameters:
activity - The activity.
Returns:
The activity's graphic or null if none could be found.
Since:
JViews 5.5

setActivityRenderer

public void setActivityRenderer(IlvActivity activity,
                                IlvActivityRenderer renderer)
Changes the activity renderer for all the activity graphics representing the specified activity in the Gantt sheet. This includes both the activity graphics that are visible and those that are hidden.
Parameters:
activity - The activity.
renderer - The new activity renderer.

getReservationGraphic

public IlvReservationGraphic getReservationGraphic(IlvReservation reservation)
Returns the IlvReservationGraphic representing the given IlvReservation.

setReservationRenderer

public 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.
Parameters:
reservation - The specified activity.
renderer - The new activity renderer.

constraintGraphicsIterator

public Iterator constraintGraphicsIterator()
Returns an iterator over all the constraint graphics in the Gantt sheet. The iterator will traverse over a copy of the collection of graphics.
Returns:
An iterator over the IlvConstraintGraphics.
Since:
JViews 5.5

getConstraintGraphics

public Collection getConstraintGraphics()
Returns a collection of all the constraint graphics in the Gantt sheet. The collection will be a copy of the graphics in the sheet.
Returns:
The collection of IlvConstraintGraphics.
Since:
JViews 5.5

getConstraintGraphic

public IlvConstraintGraphic getConstraintGraphic(IlvConstraint constraint)
Returns the constraint graphic representing the specified constraint in the Gantt sheet.
Parameters:
constraint - The constraint.

replaceConstraintGraphic

public void replaceConstraintGraphic(IlvConstraintGraphic oldGraphic,
                                     IlvConstraintGraphic newGraphic,
                                     boolean redraw)
Replaces a constraint graphic in the Gantt sheet with another one.
Parameters:
oldGraphic - The old constraint graphic that must be in this Gantt sheet.
newGraphic - The new constraint graphic.
redraw - If true, the graphics are redrawn.
Since:
JViews 5.5

getTimeConverter

public IlvTimeConverter getTimeConverter()
Returns the time converter.
See Also:
setTimeConverter(ilog.views.gantt.graphic.IlvTimeConverter)

setTimeConverter

public void setTimeConverter(IlvTimeConverter timeConverter)
Sets the time converter.
See Also:
getTimeConverter()

getActivityLayout

public int getActivityLayout()
Returns the activity layout used for activity rows in the sheet.
See Also:
SIMPLE_ACTIVITY_LAYOUT, CASCADE_ACTIVITY_LAYOUT, TILE_ACTIVITY_LAYOUT, PRETTY_ACTIVITY_LAYOUT, setActivityLayout(int)

setActivityLayout

public void setActivityLayout(int activityLayout)
Sets the activity layout used for activity rows in the sheet.
See Also:
SIMPLE_ACTIVITY_LAYOUT, CASCADE_ACTIVITY_LAYOUT, TILE_ACTIVITY_LAYOUT, PRETTY_ACTIVITY_LAYOUT, getActivityLayout()

getHorizontalGrid

public IlvGanttGridRenderer getHorizontalGrid()
Returns the horizontal grid renderer of the Gantt sheet.
See Also:
setHorizontalGrid(ilog.views.gantt.graphic.grid.IlvGanttGridRenderer)

setHorizontalGrid

public void setHorizontalGrid(IlvGanttGridRenderer grid)
Sets the horizontal grid renderer for the Gantt sheet.
See Also:
getHorizontalGrid()

getVerticalGrid

public IlvGanttGridRenderer getVerticalGrid()
Returns the vertical grid renderer of the Gantt sheet.
See Also:
setVerticalGrid(ilog.views.gantt.graphic.grid.IlvGanttGridRenderer)

setVerticalGrid

public void setVerticalGrid(IlvGanttGridRenderer grid)
Sets the vertical grid renderer for the Gantt sheet.
See Also:
getVerticalGrid()

getRowHeight

public int getRowHeight()
Returns the row height.

setRowHeight

public void setRowHeight(int rowHeight)
Sets the row height.

getMinVisibleTime

public Date getMinVisibleTime()
Returns the minimum time that the Gantt sheet can show in bounded scrolling mode.
Specified by:
getMinVisibleTime in interface IlvTimeScrollable
Returns:
The minimum visible time or null if the Gantt sheet is in unbounded scrolling mode.
See Also:
setMinVisibleTime(java.util.Date)

setMinVisibleTime

public void setMinVisibleTime(Date min)
Sets the minimum time that the Gantt sheet 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.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. A minVisibleTimeChanged event is then fired to all registered listeners. If min > maxVisibleTime an IllegalArgumentException will be thrown.
Specified by:
setMinVisibleTime in interface IlvTimeScrollable
Parameters:
min - The minimum visible time or null to set the Gantt sheet to unbounded scrolling mode.
See Also:
getMinVisibleTime()

getMaxVisibleTime

public Date getMaxVisibleTime()
Returns the maximum time that the Gantt sheet can show in bounded scrolling mode.
Specified by:
getMaxVisibleTime in interface IlvTimeScrollable
Returns:
The maximum visible time or null if the Gantt sheet is in unbounded scrolling mode.
See Also:
setMaxVisibleTime(java.util.Date)

setMaxVisibleTime

public void setMaxVisibleTime(Date max)
Sets the maximum time that the Gantt sheet 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.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. A maxVisibleTimeChanged event is then fired to all registered listeners. If max < minVisibleTime an IllegalArgumentException will be thrown.
Specified by:
setMaxVisibleTime in interface IlvTimeScrollable
Parameters:
max - The maximum visible time or null to set the Gantt sheet to unbounded scrolling mode.
See Also:
getMaxVisibleTime()

getVisibleTime

public Date getVisibleTime()
Returns the beginning of the time interval displayed by the Gantt sheet.
Specified by:
getVisibleTime in interface IlvTimeScrollable
See Also:
setVisibleTime(java.util.Date)

setVisibleTime

public void setVisibleTime(Date time)
Sets the beginning of the time interval displayed by the Gantt sheet. 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.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. The subsequent change in the sheet's transformer then fires a VisibleTimeChangedEvent 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.
Specified by:
setVisibleTime in interface IlvTimeScrollable
Parameters:
time - The new time value.
See Also:
getVisibleTime()

getVisibleDuration

public IlvDuration getVisibleDuration()
Returns the duration of the time interval displayed by the Gantt sheet.
Specified by:
getVisibleDuration in interface IlvTimeScrollable
See Also:
setVisibleDuration(ilog.views.gantt.IlvDuration)

setVisibleDuration

public void setVisibleDuration(IlvDuration duration)
Sets the duration of the time interval displayed by the Gantt sheet. 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.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. The subsequent change in the sheet's transformer then fires a VisibleDurationChangedEvent 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.
Specified by:
setVisibleDuration in interface IlvTimeScrollable
Parameters:
duration - The new duration value.
See Also:
getVisibleDuration()

getVisibleInterval

public IlvTimeInterval getVisibleInterval()
Returns the time interval displayed by the Gantt sheet.
Specified by:
getVisibleInterval in interface IlvTimeScrollable
Since:
JViews 3.5
See Also:
setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)

setVisibleInterval

public void setVisibleInterval(Date time,
                               IlvDuration duration)
Sets the time interval displayed by the Gantt sheet. 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.IlvTimeScrollable, ilog.views.gantt.IlvTimeInterval) method. The subsequent change in the sheet's transformer then fires both a VisibleTimeChangedEvent and a VisibleDurationChangedEvent to all registered listeners.
Specified by:
setVisibleInterval in interface IlvTimeScrollable
Parameters:
time - The new time value.
duration - The new duration value.

addTimeScrollListener

public void addTimeScrollListener(TimeScrollListener listener)
Adds the specified listener to receive time scroll events from this Gantt sheet.
Specified by:
addTimeScrollListener in interface IlvTimeScrollable
Parameters:
listener - The listener that will be subscribed to subsequent time scroll events.
See Also:
removeTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)

removeTimeScrollListener

public void removeTimeScrollListener(TimeScrollListener listener)
Removes the specified listener so that it will no longer receive time scroll events from this Gantt sheet.
Specified by:
removeTimeScrollListener in interface IlvTimeScrollable
Parameters:
listener - The listener that will be unsubscribed from receiving time scroll events.
See Also:
addTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)

fireVisibleTimeChanged

protected void fireVisibleTimeChanged(boolean adjusting)
This method is called to fire a time value modification.

fireVisibleDurationChanged

protected void fireVisibleDurationChanged()
This method is called to fire a visible duration value modification.

paint

public 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. Then, the function calls the paint method of the super class.
Overrides:
paint in class IlvManagerView
See Also:
setVisibleTime(java.util.Date), setVisibleDuration(ilog.views.gantt.IlvDuration)

print

public void print(Graphics dst,
                  IlvRect area,
                  IlvTransformer t)
Prints the contents of the Gantt sheet to the specified Graphics. This method calls the print method of the attached IlvManager.
Parameters:
dst - The destination Graphics.
area - The rectangular area to print, in manager coordinates.
t - The transformer used to print the contents.
Since:
JViews 5.0
See Also:
IlvManager.print(java.awt.Graphics, ilog.views.IlvRect, ilog.views.IlvManagerView, ilog.views.IlvTransformer, boolean)

print

public void print(Graphics dst,
                  Rectangle viewport,
                  IlvTransformer t)
Prints the contents of the Gantt sheet to the specified Graphics. This method calls the print method of the attached IlvManager.
Parameters:
dst - The destination Graphics.
viewport - The view port in Graphics coordinates.
t - The transformer used to print the contents.
Since:
JViews 5.0
See Also:
IlvManager.print(java.awt.Graphics, ilog.views.IlvRect, ilog.views.IlvManagerView, ilog.views.IlvTransformer, boolean)

widthChanged

protected void widthChanged(int width)
This method is invoked when the Gantt sheet's width has been modified. It calculates the new visible duration displayed by the sheet.
Parameters:
width - The width of the Gantt sheet, less its horizontal insets.
Since:
JViews 3.5

verifyTransformer

public 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.
Overrides:
verifyTransformer in class IlvManagerView

transformerChanged

protected void transformerChanged(IlvTransformer newTransformer,
                                  IlvTransformer oldTransformer)
This method is called when the transformer changes. It notifies the listeners that the transformer has changed.
Parameters:
newTransformer - The new transformer.
oldTransformer - The previous transformer.
Overrides:
transformerChanged in class IlvManagerView
See Also:
IlvManagerView.addTransformerListener(ilog.views.event.TransformerListener), IlvManagerView.removeTransformerListener(ilog.views.event.TransformerListener)

translate

public void translate(float deltax,
                      float deltay,
                      boolean redraw)
Translates the view. This method translates the transformer of the view.
Parameters:
deltax - The x translation in the view coordinate system.
deltay - The y translation in the view coordinate system.
redraw - If true, the view is redrawn.
Overrides:
translate in class IlvManagerView

isToolTipsEnabled

public boolean isToolTipsEnabled()
Returns true if tooltips are enabled for the Gantt sheet. The default value is false.
Since:
JViews 3.5
See Also:
setToolTipsEnabled(boolean)

setToolTipsEnabled

public void setToolTipsEnabled(boolean enable)
Sets whether tooltips are enabled for the Gantt sheet.
Since:
JViews 3.5
See Also:
isToolTipsEnabled(), IlvToolTipManager

isParentActivityMovable

public boolean isParentActivityMovable()
If this function returns false, the activity graphics that represent parent activities are considered as not movable. These activity graphics can be selected but cannot be moved by interactors.
Since:
JViews 5.0
See Also:
setParentActivityMovable(boolean)

setParentActivityMovable

public void setParentActivityMovable(boolean movable)
Defines whether the parent activity graphics are movable or not. The call to this function does not affect the parent activity graphics that have already been added to the Gantt sheet. It affects only activity graphics that were added after the function was called.
Since:
JViews 5.0
See Also:
isParentActivityMovable()

isParentActivityMoveable

public boolean isParentActivityMoveable()
Deprecated. Use isParentActivityMovable() instead.
If this function returns false, the activity graphics that represent parent activities are considered as not movable. These activity graphics can be selected but cannot be moved by interactors.

setParentActivityMoveable

public void setParentActivityMoveable(boolean movable)
Deprecated. Use setParentActivityMovable(boolean) instead.
Defines whether the parent activity graphics are movable or not. The call to this function does not affect the parent activity graphics that have already been added to the Gantt sheet. It affects only activity graphics that were added after the function was called.

isParentActivityEditable

public boolean isParentActivityEditable()
If this function returns false, the activity graphics representing parent activities are considered as not editable. These activity graphics can be selected but cannot be resized by interactors.
See Also:
setParentActivityEditable(boolean)

setParentActivityEditable

public void setParentActivityEditable(boolean editable)
Defines whether the parent activity graphics are editable or not. The call to this function does not affect the parent activity graphics that have already been added to the Gantt sheet. It affects only the activity graphics that were added after the function was called.
See Also:
isParentActivityEditable()

isRefreshParentActivityRenderer

public 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. The activity renderer is refreshed by calling the createActivityRenderer() method of the Gantt sheet activity-renderer factory.
See Also:
setRefreshParentActivityRenderer(boolean)

setRefreshParentActivityRenderer

public 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.
See Also:
isRefreshParentActivityRenderer()

isRefreshMilestoneRenderer

public boolean isRefreshMilestoneRenderer()
When the time interval of an activity becomes null, the start and end times become identical. The activity is then called a milestone. If this function returns true, the activity renderer will be refreshed by calling the createActivityRenderer() method of the Gantt sheet activity-renderer factory.

Conversely, when a milestone becomes a normal activity, its renderer will be refreshed if this function returns true.

Note: This mechanism applies only to leaf activities that have no children.

See Also:
setRefreshMilestoneRenderer(boolean)

setRefreshMilestoneRenderer

public 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.
See Also:
isRefreshMilestoneRenderer()

createGridContext

public IlvGanttGridContext createGridContext()
This function creates an IlvGanttGridContext for the Gantt sheet. The created Gantt grid context can be used to draw grids for the Gantt sheet.
Since:
JViews 5.0