com.bradrydzewski.gwt.calendar.client.dayview
Class TimeBlock
java.lang.Object
com.bradrydzewski.gwt.calendar.client.dayview.TimeBlock
public class TimeBlock
- extends Object
Represents a block of time that contains one or many Appointments. An example
of a timeblock could be 10am - 10:30 am, where a block of time is 30 minutes.
A block of time can contain or be interested by one or many appointments.
Using the above example, a time block from 10am - 10:30 am could contain the
following appointments:
- 10:00 - 10:30, where start / end are same as time block
- 9:00 - 10:30, where appointment start before and ends at
same time as tiem block
- 9:00 - 10:20, where appointment start before
and ends after start of time block
- 9:00 - 11:00, where appointment starts before and ends after the time
block
- 10:05 - 10:25, where appointment starts after but ends before the
time block
Above
are example use cases of a time block and how it relates to an appointment.
Note that an appointment can intersect with one ore many time blocks. This
class holds a number of parameters allowing a time block to manage its
appointments and determine where the appointments should be arranged within
itself.
- Since:
- 1.0
- Version:
- 1.0 6/07/09
- Author:
- Brad Rydzewski
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeBlock
public TimeBlock()
getAppointments
public List<AppointmentAdapter> getAppointments()
getOccupiedColumns
public Map<Integer,Integer> getOccupiedColumns()
getFirstAvailableColumn
public int getFirstAvailableColumn()
getTotalColumns
public int getTotalColumns()
setTotalColumns
public void setTotalColumns(int totalColumns)
getName
public String getName()
setName
public void setName(String name)
getOrder
public int getOrder()
setOrder
public void setOrder(int order)
getEnd
public int getEnd()
setEnd
public void setEnd(int end)
getStart
public int getStart()
setStart
public void setStart(int start)
getBottom
public float getBottom()
setBottom
public void setBottom(float bottom)
getTop
public float getTop()
setTop
public void setTop(float top)
intersectsWith
public boolean intersectsWith(int apptStart,
int apptEnd)
intersectsWith
public boolean intersectsWith(AppointmentAdapter appt)
Copyright © 2012. All Rights Reserved.