public class IlvVisibleTimeScaleRows extends Object
IlvVisibleTimeScaleRows
class provides a way to specify a
predicate associated to a list of rows.
A particular IlvVisibleTimeScaleRows
instance is tied to a
specific IlvTimeScale
.
IlvBasicTimeScaleVisibilityPolicy.addVisibleTimeScaleRows(ilog.views.gantt.scale.IlvVisibleTimeScaleRows)
Constructor and Description |
---|
IlvVisibleTimeScaleRows()
Creates a new
IlvVisibleTimeScaleRows . |
IlvVisibleTimeScaleRows(IlvVisibilityPredicate predicate)
Creates a new
IlvVisibleTimeScaleRows , with a predicate. |
Modifier and Type | Method and Description |
---|---|
void |
addRow(IlvTimeScaleRow row)
Appends a row to the list of rows.
|
IlvVisibilityPredicate |
getPredicate()
Returns the predicate that determines the visibility of the time scale rows.
|
IlvTimeScaleRow[] |
getRows()
Returns an array of all rows.
|
int |
getRowSize()
Returns the number of rows contained in this visibility predicate.
|
boolean |
getVisibilityStatus(Graphics dst,
IlvTimeScale.PaintContext context)
Gets the visibility status of this predicate.
|
void |
insertRowAt(IlvTimeScaleRow row,
int index)
Inserts a row at the specified index in the list of rows.
|
protected void |
invalidate()
Marks this predicate as invalid, if it refers to rows of the time scale,
because some time scale rows have changed.
|
void |
setPredicate(IlvVisibilityPredicate predicate)
Sets the predicate for controlling the visibility of the time scale rows.
|
void |
setRow(int index,
IlvTimeScaleRow row)
Sets a row at the specified index in the list of rows.
|
public IlvVisibleTimeScaleRows()
IlvVisibleTimeScaleRows
.public IlvVisibleTimeScaleRows(IlvVisibilityPredicate predicate)
IlvVisibleTimeScaleRows
, with a predicate.predicate
- The IlvVisibilityPredicate
.public void setPredicate(IlvVisibilityPredicate predicate)
null
predicate implies a value of true
and that the rows
will always be visible.predicate
- The visibility predicate or null
public IlvVisibilityPredicate getPredicate()
null
value implies a predicate that is always true
and
indicates that the rows will always be visible. returned, this predicate is always
true
.null
.public int getRowSize()
public void addRow(IlvTimeScaleRow row)
row
- The row to be appended.public void insertRowAt(IlvTimeScaleRow row, int index)
row
- The row to be inserted.index
- The index to insert the row at.IndexOutOfBoundsException
- if index < 0 || index >
getRowSize()
.public void setRow(int index, IlvTimeScaleRow row)
null
rows are added in-between.index
- The index at which the row should be set.row
- The row to be set.IndexOutOfBoundsException
- if index < 0
.public IlvTimeScaleRow[] getRows()
IlvTimeScaleRow
.setRow(int, ilog.views.gantt.scale.IlvTimeScaleRow)
,
addRow(ilog.views.gantt.scale.IlvTimeScaleRow)
protected void invalidate()
public boolean getVisibilityStatus(Graphics dst, IlvTimeScale.PaintContext context)
dst
- The destination graphics.context
- The IlvTimeScale.PaintContext
context in which
the time scale paints.true
if the predicate is satisfied,
false
otherwise.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.