com.bradrydzewski.gwt.calendar.client.dayview
Class TimeBlock

java.lang.Object
  extended by 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:

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

Constructor Summary
TimeBlock()
           
 
Method Summary
 List<AppointmentAdapter> getAppointments()
           
 float getBottom()
           
 int getEnd()
           
 int getFirstAvailableColumn()
           
 String getName()
           
 Map<Integer,Integer> getOccupiedColumns()
           
 int getOrder()
           
 int getStart()
           
 float getTop()
           
 int getTotalColumns()
           
 boolean intersectsWith(AppointmentAdapter appt)
           
 boolean intersectsWith(int apptStart, int apptEnd)
           
 void setBottom(float bottom)
           
 void setEnd(int end)
           
 void setName(String name)
           
 void setOrder(int order)
           
 void setStart(int start)
           
 void setTop(float top)
           
 void setTotalColumns(int totalColumns)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeBlock

public TimeBlock()
Method Detail

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.