public class IlvTimeWidthVisibilityPredicate extends Object implements IlvVisibilityPredicate
IlvTimeWidthVisibilityPredicate
class provides a way to
specify a condition based on the size of a unit of time.Modifier and Type | Field and Description |
---|---|
static int |
CHARACTER
The unit type to interpret the value that can be compared with a number of
characters.
|
static int |
PIXEL
The unit type to interpret the value that can be compared with a pixel.
|
Constructor and Description |
---|
IlvTimeWidthVisibilityPredicate()
Creates a new
IlvTimeWidthVisibilityPredicate . |
IlvTimeWidthVisibilityPredicate(int timeUnit,
int type,
double value)
Creates a new
IlvTimeWidthVisibilityPredicate . |
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(Graphics dst,
IlvTimeScale.PaintContext context)
Gets the status of this condition.
|
Font |
getFont()
Gets the font used for a comparison based on characters.
|
int |
getTimeUnit()
Gets the time unit used for the condition.
|
int |
getType()
Gets the unit type to interpret the value.
|
double |
getValue()
Gets the value used for the comparison.
|
void |
setFont(Font font)
Sets the font used for a comparison based on characters.
|
void |
setTimeUnit(int timeUnit)
Sets the
Calendar time unit to use for the condition. |
void |
setType(int type)
Sets the unit type used to interpret the value.
|
void |
setValue(double value)
Sets the value used for the comparison.
|
public static int PIXEL
public static int CHARACTER
public IlvTimeWidthVisibilityPredicate()
IlvTimeWidthVisibilityPredicate
.public IlvTimeWidthVisibilityPredicate(int timeUnit, int type, double value)
IlvTimeWidthVisibilityPredicate
.timeUnit
- The time unit to use for the condition.type
- The unit type to interpret the value
.value
- The value to compare against.public int getTimeUnit()
Calendar
time unit.Calendar
time unit.public void setTimeUnit(int timeUnit)
Calendar
time unit to use for the condition.timeUnit
- The Calendar
time unit.public int getType()
PIXEL
or CHARACTER
.public void setType(int type)
PIXEL
or CHARACTER
.public double getValue()
public void setValue(double value)
value
- The value for which the interpretation depends upon the type.public Font getFont()
public void setFont(Font font)
font
- The font.public boolean evaluate(Graphics dst, IlvTimeScale.PaintContext context)
evaluate
in interface IlvVisibilityPredicate
dst
- The destination graphics.context
- The IlvTimeScale.PaintContext
context in which
the time scale paints.true
if the condition is satisfied,
false
otherwise.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.