ilog.views.gantt.graphic
Class IlvGanttRow

java.lang.Object
  extended by ilog.views.gantt.graphic.IlvGanttRow

public class IlvGanttRow
extends Object

An IlvGanttRow object is the container for IlvActivityGraphics in an IlvGanttSheet. Each row in the IlvGanttSheet is managed by an IlvGanttRow object. IlvGanttRow is not an IlvGraphic subclass.


Method Summary
 boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
          Tests if the row contains the given IlvPoint.
 IlvActivityGraphic getActivityGraphic(IlvActivity activity)
          Returns the activity graphic representing the given activity.
 IlvActivityGraphic getActivityGraphic(IlvPoint p, IlvPoint tp, IlvTransformer t)
          Gets the activity graphic at the given position.
 IlvActivityGraphic getActivityGraphic(int index)
          Returns the activity graphic at the given index.
 int getActivityGraphicCount()
          Returns the number of activity graphics contained in this row.
 int getActivityGraphicIndex(IlvActivityGraphic graphic)
          Returns the index of the specified activity graphic.
 IlvActivityGraphic[] getActivityGraphics()
          Returns an array of the activity graphics in the row.
 float getActivityHeight()
          Deprecated. Beginning with ILOG JViews 6.0 the height of activity graphics is determined by the row's activity layout strategy.
 IlvActivityLayout getActivityLayout()
          Returns the activity layout of the row.
 float getBottom()
          Gets the bottom of the row.
 float getHeight()
          Returns the height of the row.
 Object getIdentifier()
          Returns the row's unique key identifier.
 IlvReservationGraphic getReservationGraphic(IlvReservation reservation)
          Returns the reservation graphic representing the given reservation.
 IlvTimeConverter getTimeConverter()
          Returns the time converter of the row.
 float getTop()
          Gets the top of the row.
 float getTopMargin()
          Deprecated. Beginning with ILOG JViews 6.0 you should use IlvActivitySimpleLayout.getTopMargin() instead}.
 boolean isVisible()
          Returns the visibility of the row.
 void setActivityGraphicIndex(IlvActivityGraphic graphic, int index)
          Sets the index of the specified activity graphic.
 void setActivityLayout(IlvActivityLayout activityLayout)
          Sets the activity layout of the row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIdentifier

public Object getIdentifier()
Returns the row's unique key identifier.

Returns:
The unique identifier.

getTimeConverter

public IlvTimeConverter getTimeConverter()
Returns the time converter of the row. If the Gantt row does not have its own time converter, this method will return the default time converter of its layer.

Returns:
The time converter.

getActivityGraphicCount

public int getActivityGraphicCount()
Returns the number of activity graphics contained in this row.

Returns:
The number of activity graphics in the row.

getActivityGraphic

public IlvActivityGraphic getActivityGraphic(int index)
Returns the activity graphic at the given index. The index indicates the z-order in which the activity graphic draws. Graphics at a higher index are drawn after graphics at a lower index.

Parameters:
index - The position of the activity graphic. The first graphic has a zero index.
Returns:
null if the specified index is not valid.
See Also:
getActivityGraphicIndex(ilog.views.gantt.graphic.IlvActivityGraphic), setActivityGraphicIndex(ilog.views.gantt.graphic.IlvActivityGraphic, int)

getActivityGraphics

public IlvActivityGraphic[] getActivityGraphics()
Returns an array of the activity graphics in the row. The ordering of the graphics in the array indicates the z-order in which the activity graphics draw. Graphics at a higher index in the array are drawn after graphics at a lower index.

Returns:
all the activity graphics on the Gantt row.
Since:
JViews 6.0

getActivityGraphic

public IlvActivityGraphic getActivityGraphic(IlvActivity activity)
Returns the activity graphic representing the given activity.

Parameters:
activity - The given activity
Returns:
The activity graphic, or null if not found.

getActivityGraphic

public IlvActivityGraphic getActivityGraphic(IlvPoint p,
                                             IlvPoint tp,
                                             IlvTransformer t)
Gets the activity graphic at the given position.

Parameters:
p - The point from where the search will start.
tp - The transformed p point
t - The transformer through which the set will be drawn.
Returns:
The object located at location p if there is one. Otherwise, this method it returns null.

getReservationGraphic

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

Parameters:
reservation - The reservation provided
Returns:
The reservation graphic.

getActivityGraphicIndex

public int getActivityGraphicIndex(IlvActivityGraphic graphic)
Returns the index of the specified activity graphic. The index indicates the z-order in which the activity graphic draws. Graphics at a higher index are drawn after graphics at a lower index.

Parameters:
graphic - The specified activity graphic that must be in this row.
Returns:
the index of the given activity graphic or -1 if the activity graphic is not in this row.
See Also:
setActivityGraphicIndex(ilog.views.gantt.graphic.IlvActivityGraphic, int)

setActivityGraphicIndex

public void setActivityGraphicIndex(IlvActivityGraphic graphic,
                                    int index)
Sets the index of the specified activity graphic. The index indicates the z-order in which the activity graphic will draw compared to other activity graphics in the row. Graphics at a higher index are drawn after graphics at a lower index.

Note: If the activity layout of the Gantt sheet is set to PRETTY_ACTIVITY_LAYOUT, this method has no effect because the Z-order of the activity graphics is computed by the activity layout.

Parameters:
graphic - The specified activity graphic that must be in this row.
index - The new index of the given activity graphic.
See Also:
getActivityGraphicIndex(ilog.views.gantt.graphic.IlvActivityGraphic), IlvGanttSheet.setActivityLayout(ilog.views.gantt.graphic.IlvActivityLayout)

getActivityLayout

public final IlvActivityLayout getActivityLayout()
Returns the activity layout of the row. If the Gantt row does not have its own activity layout, this method will return the default activity layout of its layer.

Since:
JViews 6.0

setActivityLayout

public void setActivityLayout(IlvActivityLayout activityLayout)
Sets the activity layout of the row.

Parameters:
activityLayout - The activity layout or null for the row to use the activity layout of the Gantt sheet.
Since:
JViews 6.0

getTopMargin

public float getTopMargin()
Deprecated. Beginning with ILOG JViews 6.0 you should use IlvActivitySimpleLayout.getTopMargin() instead}.

Returns the top margin of the row.


getActivityHeight

public float getActivityHeight()
Deprecated. Beginning with ILOG JViews 6.0 the height of activity graphics is determined by the row's activity layout strategy.

Returns the height of activity graphics in the row.


getTop

public float getTop()
Gets the top of the row.


getBottom

public float getBottom()
Gets the bottom of the row.


getHeight

public float getHeight()
Returns the height of the row.


contains

public boolean contains(IlvPoint p,
                        IlvPoint tp,
                        IlvTransformer t)
Tests if the row contains the given IlvPoint.


isVisible

public boolean isVisible()
Returns the visibility of the row.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.