public class SimpleCalendarModel extends AbstractCalendarModel implements Serializable
CalendarModel.| Modifier and Type | Field and Description |
|---|---|
protected List<CalendarEvent> |
_list |
| Constructor and Description |
|---|
SimpleCalendarModel()
Constructor.
|
SimpleCalendarModel(CalendarEvent[] array)
Constructor.
|
SimpleCalendarModel(Collection<CalendarEvent> c)
Constructor.
|
SimpleCalendarModel(int initialCapacity)
Constructor.
|
SimpleCalendarModel(List<CalendarEvent> list,
boolean live)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(CalendarEvent e)
Adds the calendar event to the list.
|
void |
add(int index,
CalendarEvent e)
Adds the calendar event to the specified index of the list.
|
void |
clear()
Removes all of the elements from this list (optional operation).
|
List<CalendarEvent> |
get(Date beginDate,
Date endDate,
RenderContext rc)
Returns the list that must be a list of
CalendarEvent type. |
int |
indexOf(CalendarEvent elem)
Returns the index of the first occurrence of the specified element
in this list.
|
boolean |
remove(CalendarEvent e)
Removes from the specified calendar event.
|
CalendarEvent |
remove(int index)
Removes the calendar event from the specified index.
|
int |
size()
Returns the number of elements in this list.
|
boolean |
update(CalendarEvent e)
Update the calendar event to the list.
|
addCalendarDataListener, fireEvent, fireEvent, fireEvent, fireEvent, removeCalendarDataListenerprotected List<CalendarEvent> _list
public SimpleCalendarModel(List<CalendarEvent> list, boolean live)
list - the list to representlive - whether to have a 'live' CalendarModel on top of
the specified list.
If false, the content of the specified list is copied.
If true, this object is a 'facade' of the specified list,
i.e., when you add or remove items from this SimpleCalendarModel,
the inner "live" list would be changed accordingly.
However, it is not a good idea to modify list
if it is passed to this method with live is true,
since Calendars is not smart enough to handle it.
Instead, modify it thru this object.public SimpleCalendarModel()
public SimpleCalendarModel(Collection<CalendarEvent> c)
public SimpleCalendarModel(CalendarEvent[] array)
public SimpleCalendarModel(int initialCapacity)
initialCapacity - the initial capacity for this SimpleCalendarModel.public void add(int index,
CalendarEvent e)
public boolean add(CalendarEvent e)
public boolean update(CalendarEvent e)
public CalendarEvent remove(int index)
public int indexOf(CalendarEvent elem)
public boolean remove(CalendarEvent e)
public void clear()
public int size()
public List<CalendarEvent> get(Date beginDate, Date endDate, RenderContext rc)
CalendarEvent type.get in interface CalendarModelbeginDate - the begin dateendDate - the end daterc - a RenderContext encapsulates the information needed for Calendars.Copyright © 2015. All Rights Reserved.