|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.content.CalendarDateSpinnerData
public class CalendarDateSpinnerData
Spinner data model that presents a bounded list of calendar dates.
This is a lightweight class that spoofs the actual list data by using an internal calendar instance from which CalendarDate instances are created on demand.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.pivot.collections.List |
---|
List.ItemIterator<T>, List.ListListenerList<T> |
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence |
---|
Sequence.Tree<T> |
Constructor Summary | |
---|---|
CalendarDateSpinnerData()
Creates a new CalendarDateSpinnerData bounded from 1900-01-01 to 2099-12-31. |
|
CalendarDateSpinnerData(CalendarDate lowerBound,
CalendarDate upperBound)
Creates a new CalendarDateSpinnerData bounded by the specified calendar dates (inclusive). |
Method Summary | |
---|---|
int |
add(CalendarDate item)
Throws UnsupportedOperationException. |
void |
clear()
Throws UnsupportedOperationException. |
CalendarDate |
get(int index)
Gets the calendar date at the specified index. |
Comparator<CalendarDate> |
getComparator()
Gets the comparator for this list, which is guaranteed to always be null. |
int |
getLength()
Gets the number of entries in this list. |
ListenerList<ListListener<CalendarDate>> |
getListListeners()
Returns the list listener list. |
int |
indexOf(CalendarDate item)
Returns the index of an item in the sequence. |
void |
insert(CalendarDate item,
int index)
Throws UnsupportedOperationException. |
boolean |
isEmpty()
Tests the emptiness of the collection. |
Iterator<CalendarDate> |
iterator()
|
int |
remove(CalendarDate item)
Throws UnsupportedOperationException. |
Sequence<CalendarDate> |
remove(int index,
int count)
Throws UnsupportedOperationException. |
void |
setComparator(Comparator<CalendarDate> comparator)
Throws UnsupportedOperationException. |
CalendarDate |
update(int index,
CalendarDate item)
Throws UnsupportedOperationException. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CalendarDateSpinnerData()
public CalendarDateSpinnerData(CalendarDate lowerBound, CalendarDate upperBound)
lowerBound
- The earliest date to include in this spinner data.upperBound
- The latest date to include in this spinner data.Method Detail |
---|
public int add(CalendarDate item)
add
in interface List<CalendarDate>
add
in interface Sequence<CalendarDate>
item
- The item to be added to the sequence.
ListListener.itemInserted(List, int)
public void insert(CalendarDate item, int index)
insert
in interface List<CalendarDate>
insert
in interface Sequence<CalendarDate>
item
- The item to be added to the list.index
- The index at which the item should be inserted. Must be a value between
0 and getLength().ListListener.itemInserted(List, int)
public CalendarDate update(int index, CalendarDate item)
update
in interface List<CalendarDate>
update
in interface Sequence<CalendarDate>
index
- The index of the item to update.item
- The item that will replace any existing value at the given index.
ListListener.itemUpdated(List, int, Object)
public int remove(CalendarDate item)
remove
in interface Sequence<CalendarDate>
item
- The item to remove.
Sequence.remove(int, int)
public Sequence<CalendarDate> remove(int index, int count)
remove
in interface List<CalendarDate>
remove
in interface Sequence<CalendarDate>
index
- The starting index to remove.count
- The number of items to remove, beginning with index.
ListListener.itemsRemoved(List, int, Sequence)
public CalendarDate get(int index)
get
in interface Sequence<CalendarDate>
index
- The index of the calendar date to retrieve.public int indexOf(CalendarDate item)
Sequence
indexOf
in interface Sequence<CalendarDate>
item
- The item to locate.
public void clear()
clear
in interface Collection<CalendarDate>
clear
in interface List<CalendarDate>
ListListener.itemsRemoved(List, int, Sequence)
public boolean isEmpty()
Collection
isEmpty
in interface Collection<CalendarDate>
public int getLength()
getLength
in interface List<CalendarDate>
getLength
in interface Sequence<CalendarDate>
public Comparator<CalendarDate> getComparator()
getComparator
in interface Collection<CalendarDate>
Collection.setComparator(Comparator)
public void setComparator(Comparator<CalendarDate> comparator)
setComparator
in interface Collection<CalendarDate>
setComparator
in interface List<CalendarDate>
comparator
- The comparator used to order elements in the collection, or null if the
collection is unsorted.ListListener.comparatorChanged(List, Comparator)
public Iterator<CalendarDate> iterator()
iterator
in interface Iterable<CalendarDate>
public ListenerList<ListListener<CalendarDate>> getListListeners()
List
getListListeners
in interface List<CalendarDate>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |