public class IlvActivityTileLayout extends IlvActivitySimpleLayout
IlvActivityTileLayout
class arranges concurrent activities within an Gantt row by subdividing the row into the minimum necessary subrows and
tiling the activity graphics. The tile layout has several options that configure how
the activities are arranged within the row:
rowHeight/subrowCount
. Optionally, the
subrows can maintain a constant height and the Gantt row height will change to
accommodate as rowHeight*subrowCount
. In this latter case, attempting to
set individual row heights on the chart will not work because the layout overrides this
behavior.Modifier and Type | Class and Description |
---|---|
static class |
IlvActivityTileLayout.DefaultTilingPolicy
A
DefaultTilingPolicy takes each given activity graphic and attempts to
place it into the first existing subrow that will accommodate it. |
static class |
IlvActivityTileLayout.GraphicBounds
GraphicBounds is a structure that maintains an association between an
activity graphic and its bounding box in the coordinates of the current view. |
static interface |
IlvActivityTileLayout.TilingPolicy
A
TilingPolicy controls how many subrows are created for each
Gantt row by the tile layout and how activities are assigned
to the subrows. |
DEFAULT_VERTICAL_MARGIN
Constructor and Description |
---|
IlvActivityTileLayout()
Creates a tile layout with a
IlvActivityTileLayout.DefaultTilingPolicy , that computes activity
overlap by comparing graphic bounding boxes and maintains a constant subrow height. |
IlvActivityTileLayout(boolean compareBoundingBoxes,
boolean constantRowHeight,
double topMargin,
double bottomMargin,
double subrowPadding)
Creates a tile layout with a
IlvActivityTileLayout.DefaultTilingPolicy and the specified layout
parameters. |
IlvActivityTileLayout(IlvActivityTileLayout.TilingPolicy tilingPolicy,
boolean compareBoundingBoxes,
boolean constantRowHeight)
Creates a tile layout with the specified layout parameters.
|
IlvActivityTileLayout(IlvActivityTileLayout.TilingPolicy tilingPolicy,
boolean compareBoundingBoxes,
boolean constantRowHeight,
double topMargin,
double bottomMargin,
double subrowPadding)
Creates a tile layout with the specified layout parameters.
|
IlvActivityTileLayout(IlvGanttSheet ganttSheet,
IlvActivityTileLayout.TilingPolicy tilingPolicy,
boolean compareBoundingBoxes,
boolean constantRowHeight,
double topMargin,
double bottomMargin,
double subrowPadding)
Creates a tile layout with the specified layout parameters.
|
IlvActivityTileLayout(IlvHierarchyChart chart)
Deprecated.
Since JViews 8.8, please use the constructor that does not take an
IlvHierarchyChart argument. |
IlvActivityTileLayout(IlvHierarchyChart chart,
boolean compareBoundingBoxes,
boolean constantRowHeight,
double topMargin,
double bottomMargin,
double subrowPadding)
Deprecated.
Since JViews 8.8, please use the constructor that does not take an
IlvHierarchyChart argument. |
IlvActivityTileLayout(IlvHierarchyChart chart,
IlvActivityTileLayout.TilingPolicy tilingPolicy,
boolean compareBoundingBoxes,
boolean constantRowHeight)
Deprecated.
Since JViews 8.8, please use the constructor that does not take an
IlvHierarchyChart argument. |
IlvActivityTileLayout(IlvHierarchyChart chart,
IlvActivityTileLayout.TilingPolicy tilingPolicy,
boolean compareBoundingBoxes,
boolean constantRowHeight,
double topMargin,
double bottomMargin,
double subrowPadding)
Deprecated.
Since JViews 8.8, please use the constructor that does not take an
IlvHierarchyChart argument. |
Modifier and Type | Method and Description |
---|---|
void |
arrange(IlvGanttRow row,
IlvActivityGraphic graphic)
This method is called to layout the position of a single activity graphic within a
row.
|
void |
arrange(IlvGanttRow row,
IlvActivityGraphic[] graphics)
This method is called to layout the position of all the activity graphics within a
row.
|
double |
getSubrowPadding()
Returns the padding inserted between subrows.
|
IlvActivityTileLayout.TilingPolicy |
getTilingPolicy()
Returns the tiling policy that controls how many subrows are created by the layout
for each Gantt row and how activities are assigned to the
subrows.
|
boolean |
isCompareBoundingBoxes()
Returns whether activity overlap is computed by comparing the graphic bounding boxes.
|
boolean |
isConstantRowHeight()
Returns whether each Gantt row maintains a constant height as it is subdivided into
subrows.
|
void |
setCompareBoundingBoxes(boolean compareBoundingBoxes)
Sets whether activity overlap is computed by comparing the graphic bounding boxes.
|
void |
setConstantRowHeight(boolean constantRowHeight)
Sets whether each Gantt row maintains a constant height as it is subdivided into
subrows.
|
void |
setSubrowPadding(double padding)
Sets the padding inserted between subrows.
|
void |
setTilingPolicy(IlvActivityTileLayout.TilingPolicy tilingPolicy)
Sets the tiling policy that controls how many subrows are created for each
Gantt row and how activities are assigned to the subrows.
|
getBottomMargin, getChannelVerticalBounds, getTopMargin, setBottomMargin, setTopMargin
public IlvActivityTileLayout()
IlvActivityTileLayout.DefaultTilingPolicy
, that computes activity
overlap by comparing graphic bounding boxes and maintains a constant subrow height.
The default top, bottom, and subrow margins of 2
are used. Note that
attempting to set individual row heights on the chart will not work because the
layout overrides this behavior.@Deprecated public IlvActivityTileLayout(IlvHierarchyChart chart)
IlvHierarchyChart
argument.IlvActivityTileLayout.DefaultTilingPolicy
, that computes activity
overlap by comparing graphic bounding boxes and maintains a constant subrow height.
The default top, bottom, and subrow margins of 2
are used. Note that
attempting to set individual row heights on the chart will not work because the
layout overrides this behavior.chart
- The chart that the layout will be set on.public IlvActivityTileLayout(boolean compareBoundingBoxes, boolean constantRowHeight, double topMargin, double bottomMargin, double subrowPadding)
IlvActivityTileLayout.DefaultTilingPolicy
and the specified layout
parameters.compareBoundingBoxes
- Indicates whether activity overlap is computed by
comparing the graphic bounding boxes. If
false
, activity overlap is computed by
comparing the activity time intervals.constantRowHeight
- Indicates whether the Gantt row maintains a constant
height as it is subdivided into subrows. This implies
that the height of each subrow will be rowHeight/subrowCount
.
If false
, the subrows will maintain a
constant height and the Gantt row height will change to
accommodate as rowHeight*subrowCount
. In
this case, attempting to set individual row heights on
the chart will not work because the layout will override
this behavior.topMargin
- The top row margin.bottomMargin
- The bottom row margin.subrowPadding
- The padding inserted between subrows.@Deprecated public IlvActivityTileLayout(IlvHierarchyChart chart, boolean compareBoundingBoxes, boolean constantRowHeight, double topMargin, double bottomMargin, double subrowPadding)
IlvHierarchyChart
argument.IlvActivityTileLayout.DefaultTilingPolicy
and the specified layout
parameters.chart
- The chart that the layout will be set on.compareBoundingBoxes
- Indicates whether activity overlap is computed by
comparing the graphic bounding boxes. If
false
, activity overlap is computed by
comparing the activity time intervals.constantRowHeight
- Indicates whether the Gantt row maintains a constant
height as it is subdivided into subrows. This implies
that the height of each subrow will be rowHeight/subrowCount
.
If false
, the subrows will maintain a
constant height and the Gantt row height will change to
accommodate as rowHeight*subrowCount
. In
this case, attempting to set individual row heights on
the chart will not work because the layout will override
this behavior.topMargin
- The top row margin.bottomMargin
- The bottom row margin.subrowPadding
- The padding inserted between subrows.public IlvActivityTileLayout(IlvActivityTileLayout.TilingPolicy tilingPolicy, boolean compareBoundingBoxes, boolean constantRowHeight)
tilingPolicy
- The tiling policy that controls how many subrows are
created for each Gantt row and
how activities are assigned to the subrows.compareBoundingBoxes
- Indicates whether activity overlap should be computed by
comparing the graphic bounding boxes. If
false
, activity overlap should be computed
by comparing the activity time intervals. This flag is a
hint to the tilingPolicy. The IlvActivityTileLayout.DefaultTilingPolicy
observes this flag, but other tiling policy
implementations may not.constantRowHeight
- Indicates whether the Gantt row maintains a constant
height as it is subdivided into subrows. This implies
that the height of each subrow will be rowHeight/subrowCount
.
If false
, the subrows will maintain a
constant height and the Gantt row height will change to
accommodate as rowHeight*subrowCount
. In
this case, attempting to set individual row heights on
the chart will not work because the layout will override
this behavior.@Deprecated public IlvActivityTileLayout(IlvHierarchyChart chart, IlvActivityTileLayout.TilingPolicy tilingPolicy, boolean compareBoundingBoxes, boolean constantRowHeight)
IlvHierarchyChart
argument.chart
- The chart that the layout will be set on.tilingPolicy
- The tiling policy that controls how many subrows are
created for each Gantt row and
how activities are assigned to the subrows.compareBoundingBoxes
- Indicates whether activity overlap should be computed by
comparing the graphic bounding boxes. If
false
, activity overlap should be computed
by comparing the activity time intervals. This flag is a
hint to the tilingPolicy. The IlvActivityTileLayout.DefaultTilingPolicy
observes this flag, but other tiling policy
implementations may not.constantRowHeight
- Indicates whether the Gantt row maintains a constant
height as it is subdivided into subrows. This implies
that the height of each subrow will be rowHeight/subrowCount
.
If false
, the subrows will maintain a
constant height and the Gantt row height will change to
accommodate as rowHeight*subrowCount
. In
this case, attempting to set individual row heights on
the chart will not work because the layout will override
this behavior.public IlvActivityTileLayout(IlvActivityTileLayout.TilingPolicy tilingPolicy, boolean compareBoundingBoxes, boolean constantRowHeight, double topMargin, double bottomMargin, double subrowPadding)
tilingPolicy
- The tiling policy that controls how many subrows are
created for each Gantt row and
how activities are assigned to the subrows.compareBoundingBoxes
- Indicates whether activity overlap should be computed by
comparing the graphic bounding boxes. If
false
, activity overlap should be computed
by comparing the activity time intervals. This flag is a
hint to the tilingPolicy. The IlvActivityTileLayout.DefaultTilingPolicy
observes this flag, but other tiling policy
implementations may not.constantRowHeight
- Indicates whether the Gantt row maintains a constant
height as it is subdivided into subrows. This implies
that the height of each subrow will be rowHeight/subrowCount
.
If false
, the subrows will maintain a
constant height and the Gantt row height will change to
accommodate as rowHeight*subrowCount
. In
this case, attempting to set individual row heights on
the chart will not work because the layout will override
this behavior.topMargin
- The top row margin.bottomMargin
- The bottom row margin.subrowPadding
- The padding inserted between subrows.@Deprecated public IlvActivityTileLayout(IlvHierarchyChart chart, IlvActivityTileLayout.TilingPolicy tilingPolicy, boolean compareBoundingBoxes, boolean constantRowHeight, double topMargin, double bottomMargin, double subrowPadding)
IlvHierarchyChart
argument.chart
- The chart that the layout will be set on.tilingPolicy
- The tiling policy that controls how many subrows are
created for each Gantt row and
how activities are assigned to the subrows.compareBoundingBoxes
- Indicates whether activity overlap should be computed by
comparing the graphic bounding boxes. If
false
, activity overlap should be computed
by comparing the activity time intervals. This flag is a
hint to the tilingPolicy. The IlvActivityTileLayout.DefaultTilingPolicy
observes this flag, but other tiling policy
implementations may not.constantRowHeight
- Indicates whether the Gantt row maintains a constant
height as it is subdivided into subrows. This implies
that the height of each subrow will be rowHeight/subrowCount
.
If false
, the subrows will maintain a
constant height and the Gantt row height will change to
accommodate as rowHeight*subrowCount
. In
this case, attempting to set individual row heights on
the chart will not work because the layout will override
this behavior.topMargin
- The top row margin.bottomMargin
- The bottom row margin.subrowPadding
- The padding inserted between subrows.public IlvActivityTileLayout(IlvGanttSheet ganttSheet, IlvActivityTileLayout.TilingPolicy tilingPolicy, boolean compareBoundingBoxes, boolean constantRowHeight, double topMargin, double bottomMargin, double subrowPadding)
ganttSheet
- The Gantt sheet that the layout will be set on.tilingPolicy
- The tiling policy that controls how many subrows are
created for each Gantt row and
how activities are assigned to the subrows.compareBoundingBoxes
- Indicates whether activity overlap should be computed by
comparing the graphic bounding boxes. If
false
, activity overlap should be computed
by comparing the activity time intervals. This flag is a
hint to the tilingPolicy. The IlvActivityTileLayout.DefaultTilingPolicy
observes this flag, but other tiling policy
implementations may not.constantRowHeight
- Indicates whether the Gantt row maintains a constant
height as it is subdivided into subrows. This implies
that the height of each subrow will be rowHeight/subrowCount
.
If false
, the subrows will maintain a
constant height and the Gantt row height will change to
accommodate as rowHeight*subrowCount
. In
this case, attempting to set individual row heights on
the chart will not work because the layout will override
this behavior.topMargin
- The top row margin.bottomMargin
- The bottom row margin.subrowPadding
- The padding inserted between subrows.public IlvActivityTileLayout.TilingPolicy getTilingPolicy()
setTilingPolicy(ilog.views.gantt.graphic.IlvActivityTileLayout.TilingPolicy)
public void setTilingPolicy(IlvActivityTileLayout.TilingPolicy tilingPolicy)
tilingPolicy
- The tiling policy that controls how many subrows are created for
each Gantt row and how activities are
assigned to the subrows.getTilingPolicy()
public boolean isCompareBoundingBoxes()
false
, activity overlap is computed by comparing the activity time
intervals.setCompareBoundingBoxes(boolean)
public void setCompareBoundingBoxes(boolean compareBoundingBoxes)
compareBoundingBoxes
- Indicates whether activity overlap is computed by
comparing the graphic bounding boxes. If
false
, activity overlap is computed by
comparing the activity time intervals.isCompareBoundingBoxes()
public boolean isConstantRowHeight()
rowHeight/subrowCount
. If false
, the subrows will maintain
a constant height and the Gantt row height will change to accommodate as
rowHeight*subrowCount
. In this case, attempting to set individual row
heights on the chart will not work because the layout will override this behavior.setConstantRowHeight(boolean)
public void setConstantRowHeight(boolean constantRowHeight)
constantRowHeight
- Indicates whether each Gantt row maintains a constant height
as it is subdivided into subrows. This implies that the
height of each subrow will be rowHeight/subrowCount
.
If false
, the subrows will maintain a constant
height and the Gantt row height will change to accommodate
as rowHeight*subrowCount
. In this case,
attempting to set individual row heights on the chart will
not work because the layout will override this behavior.isConstantRowHeight()
public double getSubrowPadding()
2
.setSubrowPadding(double)
public void setSubrowPadding(double padding)
padding
- The subrow padding.getSubrowPadding()
public void arrange(IlvGanttRow row, IlvActivityGraphic[] graphics)
arrange
in interface IlvActivityLayout
arrange
in class IlvActivitySimpleLayout
row
- The Gantt row that contains the graphics.graphics
- The array of 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. This method can rearrange the
graphics within the array to change their drawing order.public void arrange(IlvGanttRow row, IlvActivityGraphic graphic)
arrange
in interface IlvActivityLayout
arrange
in class IlvActivitySimpleLayout
row
- The Gantt row that contains the graphic.graphic
- The activity graphic to be arranged.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.