|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bradrydzewski.gwt.calendar.client.monthview.AppointmentStackingManager
public class AppointmentStackingManager
Manages the AppointmentLayoutDescription in a stack-like
structure arranged in layers. Layers are 0-based (1nd. layer has
an index of 0, 2nd. has an index of 1).
| Constructor Summary | |
|---|---|
AppointmentStackingManager()
|
|
| Method Summary | |
|---|---|
boolean |
areThereAppointmentsOn(int day)
Indicates whether there are any appointments that encompass the specified day. |
void |
assignLayer(AppointmentLayoutDescription description)
Associates the provided description to the first available
layer in the collection administered by this manager. |
ArrayList<AppointmentLayoutDescription> |
getDescriptionsInLayer(int layerIndex)
Returns all the AppointmentLayoutDescriptions in the
specified layer. |
int |
lowestLayerIndex(int day)
Returns the lowest layer index that is available on the specified day. |
int |
multidayAppointmentsOverLimitOn(int day)
Returns the number of appointments (multi-day or all-day, as that's the type of appointment that the stacking manager deals with only) that exceeded the layerOverflowLimit value when they were
stacked. |
int |
nextLowestLayerIndex(int day,
int fromLayer)
Returns the lowest layer index higher than fromLayer
that is available on the specified day. |
void |
setLayerOverflowLimit(int layerOverflowLimit)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AppointmentStackingManager()
| Method Detail |
|---|
public void setLayerOverflowLimit(int layerOverflowLimit)
public void assignLayer(AppointmentLayoutDescription description)
description to the first available
layer in the collection administered by this manager. This manager will
look up in the stack of layers (from lowest index to highest index) until
a layer that does not have any AppointmentLayoutDescriptions
that overlap with the days that the description's appointment spans.
description - An appointment description object that can be laid on a
layerpublic int lowestLayerIndex(int day)
day.
day - The day index for which the lowest layer index will be
attempted to identify
Appointment can be displayed on.
public int nextLowestLayerIndex(int day,
int fromLayer)
fromLayer
that is available on the specified day.
day - The day index for which the lowest layer index will be
attempted to identify foundfromLayer - The layer index after which the search for next
available layer should be started from
Appointment can be displayed on.public ArrayList<AppointmentLayoutDescription> getDescriptionsInLayer(int layerIndex)
AppointmentLayoutDescriptions in the
specified layer.
layerIndex - The index of a layer for which descriptions will be
returned
null if no appointment has been allocated for the
layer at allpublic int multidayAppointmentsOverLimitOn(int day)
layerOverflowLimit value when they were
stacked.
day - The day to perform the count
layerOverflowLimit layer, if there were anypublic boolean areThereAppointmentsOn(int day)
day.
day - The day to test for appointments
true if there are any descriptions in any layer for
the specified day.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||