public class SimpleCalendarModel extends AbstractCalendarModel implements java.io.Serializable
CalendarModel
.Modifier and Type | Field and Description |
---|---|
protected java.util.List<CalendarItem> |
_list |
Constructor and Description |
---|
SimpleCalendarModel()
Constructor.
|
SimpleCalendarModel(CalendarItem[] array)
Constructor.
|
SimpleCalendarModel(java.util.Collection<CalendarItem> c)
Constructor.
|
SimpleCalendarModel(int initialCapacity)
Constructor.
|
SimpleCalendarModel(java.util.List<CalendarItem> list,
boolean live)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(CalendarItem e)
Adds the calendar item to the list.
|
void |
add(int index,
CalendarItem e)
Adds the calendar item to the specified index of the list.
|
void |
clear()
Removes all of the elements from this list (optional operation).
|
java.util.List<CalendarItem> |
get(java.util.Date beginDate,
java.util.Date endDate,
RenderContext rc)
Returns the list that must be a list of
CalendarItem type. |
int |
indexOf(CalendarItem elem)
Returns the index of the first occurrence of the specified element
in this list.
|
boolean |
remove(CalendarItem e)
Removes from the specified calendar item.
|
CalendarItem |
remove(int index)
Removes the calendar item from the specified index.
|
int |
size()
Returns the number of elements in this list.
|
boolean |
update(CalendarItem e)
Update the calendar item to the list.
|
addCalendarDataListener, fireEvent, fireEvent, fireEvent, fireEvent, removeCalendarDataListener
protected java.util.List<CalendarItem> _list
public SimpleCalendarModel(java.util.List<CalendarItem> 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(java.util.Collection<CalendarItem> c)
public SimpleCalendarModel(CalendarItem[] array)
public SimpleCalendarModel(int initialCapacity)
initialCapacity
- the initial capacity for this SimpleCalendarModel.public void add(int index, CalendarItem e)
public boolean add(CalendarItem e)
public boolean update(CalendarItem e)
public CalendarItem remove(int index)
public int indexOf(CalendarItem elem)
public boolean remove(CalendarItem e)
public void clear()
public int size()
public java.util.List<CalendarItem> get(java.util.Date beginDate, java.util.Date endDate, RenderContext rc)
CalendarItem
type.get
in interface CalendarModel
beginDate
- the begin dateendDate
- the end daterc
- a RenderContext encapsulates the information needed for Calendars.Copyright © 2021. All Rights Reserved.