public class IlvTimeIntervalChildSize extends IlvProportionalChildSize
IlvTimeIntervalChildSize
is a constraint applied
to a graphic object based on some date properties of the anchor
object.
It computes the width factor to apply to the object based on the
size the of the anchor object and the computed size of a time
interval.
This is useful for computing the earliness/lateness of an activity
in a Gantt chart. The size of an activity is computed from the
start and end time of an activity. The time interval determining
the size of the child is usually computed from a due date property
on the activity, and a reference date which is generally either
the start time or the end time of the activity.Modifier and Type | Field and Description |
---|---|
static int |
ANCHOR_INTERVAL
To base the computation on date properties of the anchor object.
|
ANCHOR_HEIGHT, ANCHOR_WIDTH
Constructor and Description |
---|
IlvTimeIntervalChildSize()
Creates an instance of
IlvTimeIntervalChildSize . |
Modifier and Type | Method and Description |
---|---|
Date |
getDueDate()
Returns the due date of the activity.
|
Date |
getEndDate()
Returns the end date of the activity.
|
Date |
getReferenceDate()
Returns the reference date of the activity.
|
IlvPoint |
getSize(IlvRect bboxAnchor,
IlvRect bboxChild)
Returns the size of the supplied child
|
Date |
getStartDate()
Returns the start date of the activity.
|
void |
setDueDate(Date dueDate)
Sets the due date of the activity.
|
void |
setEndDate(Date endDate)
Sets the end date of the activity.
|
void |
setReferenceDate(Date referenceDate)
Sets the reference date of the activity.
|
void |
setStartDate(Date startDate)
Sets the start date of the activity.
|
getHeightConstraint, getHeightFactor, getWidthConstraint, getWidthFactor, setHeightConstraint, setHeightFactor, setWidthConstraint, setWidthFactor, write
public static final int ANCHOR_INTERVAL
public IlvTimeIntervalChildSize()
IlvTimeIntervalChildSize
.public Date getStartDate()
public void setStartDate(Date startDate)
startDate
- The start date.public Date getEndDate()
public void setEndDate(Date endDate)
endDate
- The end date.public Date getDueDate()
public void setDueDate(Date dueDate)
dueDate
- The due date.public Date getReferenceDate()
public void setReferenceDate(Date referenceDate)
referenceDate
- The reference date.public IlvPoint getSize(IlvRect bboxAnchor, IlvRect bboxChild)
getSize
in interface IlvChildSize
getSize
in class IlvProportionalChildSize
bboxAnchor
- The bounding box of the child used to attach the
other elements of the composite graphicbboxChild
- The bounding box of the child the
IlvAttachmentLayout
wants to resizeIlvPoint
.IlvAttachmentLayout
,
IlvAttachmentLayout.getAnchor()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.