de.jaret.examples.timebars.calendar.model
Class Day

java.lang.Object
  extended by de.jaret.util.ui.timebars.model.AbstractTimeBarRowModel
      extended by de.jaret.util.ui.timebars.model.DefaultTimeBarRowModel
          extended by de.jaret.examples.timebars.calendar.model.Day
All Implemented Interfaces:
de.jaret.util.ui.timebars.model.TimeBarRow, java.beans.PropertyChangeListener, java.util.EventListener

public class Day
extends de.jaret.util.ui.timebars.model.DefaultTimeBarRowModel

A day representation as an extenion of the timebar row model. A list of placeholders are used for indicting appointments that span more than one day (rendereing is done by the header renderer).

Version:
$Id: Day.java 801 2008-12-27 22:44:54Z kliem $
Author:
Peter Kliem

Field Summary
 
Fields inherited from class de.jaret.util.ui.timebars.model.DefaultTimeBarRowModel
_intervals
 
Fields inherited from class de.jaret.util.ui.timebars.model.AbstractTimeBarRowModel
_header, _listenerList, _maxDate, _minDate
 
Constructor Summary
Day(de.jaret.util.date.JaretDate date)
          Construct the day for a specific date.
 
Method Summary
 void addInterval(de.jaret.util.date.Interval interval)
          Add an interval.
 Appointment getAppointmentById(java.lang.String id)
          Look up an appointment on that day by comparing the ids.
 java.util.Collection<Appointment> getAppointmentBySynchronizerId(java.lang.String synchronizerId)
           
 java.util.List<Appointment> getAppointments()
          Get all appointments for a day.
 de.jaret.util.date.JaretDate getDayDate()
           
 int getMaxPlaceholderPos()
           
 AppointmentPlaceholder getPlaceholder(Appointment appointment)
          Retrive the placeholder for an appointment.
 Appointment getPlaceholderForPosition(int pos)
           
 java.util.List<AppointmentPlaceholder> getPlaceholders()
          Retrieve allplaceholders present.
 void removePlaceholder(Appointment appointment)
          Removes all placeholdes for the given appointment.
 
Methods inherited from class de.jaret.util.ui.timebars.model.DefaultTimeBarRowModel
addIntervals, clear, getIntervals, remInterval, remIntervals
 
Methods inherited from class de.jaret.util.ui.timebars.model.AbstractTimeBarRowModel
addTimeBarRowListener, fireElementAdded, fireElementChanged, fireElementRemoved, fireHeaderChanged, fireRowDataChanged, getIntervals, getIntervals, getMaxDate, getMinDate, getRowHeader, propertyChange, remTimeBarRowListener, setRowHeader, updateMinMax
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Day

public Day(de.jaret.util.date.JaretDate date)
Construct the day for a specific date.

Parameters:
date - the day date
Method Detail

addInterval

public void addInterval(de.jaret.util.date.Interval interval)
Add an interval.

Overrides:
addInterval in class de.jaret.util.ui.timebars.model.DefaultTimeBarRowModel
Parameters:
interval - interval to add

getDayDate

public de.jaret.util.date.JaretDate getDayDate()

getAppointmentById

public Appointment getAppointmentById(java.lang.String id)
Look up an appointment on that day by comparing the ids.

Parameters:
id - id to check
Returns:
the appointment or null

getAppointments

public java.util.List<Appointment> getAppointments()
Get all appointments for a day.

Returns:
list of appointments

getPlaceholders

public java.util.List<AppointmentPlaceholder> getPlaceholders()
Retrieve allplaceholders present.

Returns:
the list of placeholders

getPlaceholder

public AppointmentPlaceholder getPlaceholder(Appointment appointment)
Retrive the placeholder for an appointment.

Parameters:
appointment - appointment
Returns:
the placeholder for the appointment or null

removePlaceholder

public void removePlaceholder(Appointment appointment)
Removes all placeholdes for the given appointment.

Parameters:
appointment - appointment

getMaxPlaceholderPos

public int getMaxPlaceholderPos()

getPlaceholderForPosition

public Appointment getPlaceholderForPosition(int pos)

getAppointmentBySynchronizerId

public java.util.Collection<Appointment> getAppointmentBySynchronizerId(java.lang.String synchronizerId)


Copyright © 2012. All Rights Reserved.