ToDoListImplpublic class ToDoListImpl extends AbstractPIMList implements javax.microedition.pim.ToDoListClass ToDoListImpl implements methods of PIM interface ToDoList. |
Constructors Summary |
---|
ToDoListImpl(String name, int mode, Object handle)Construct a ToDo handler.
super(PIM.TODO_LIST, name, mode, handle);
|
Methods Summary |
---|
public javax.microedition.pim.ToDo | createToDo()Creates a ToDo entry.
return new ToDoImpl(this);
| public javax.microedition.pim.ToDo | importToDo(javax.microedition.pim.ToDo item)Initializes a ToDo entry from a previous item.
return new ToDoImpl(this, item);
| public java.util.Enumeration | items(int field, long startDate, long endDate)Gets an Enumeration of the items in the list.
if (getFieldDataType(field) != PIMItem.DATE) {
throw new IllegalArgumentException("Not a DATE field");
}
if (endDate < startDate) {
throw new IllegalArgumentException("Start date"
+ " must precede end date");
}
Vector results = new Vector();
Vector keys = new Vector();
for (Enumeration e = items(); e.hasMoreElements(); ) {
ToDo item = (ToDo) e.nextElement();
int indices = item.countValues(field);
for (int i = 0; i < indices; i++) {
long date = item.getDate(field, i);
if (date >= startDate && date <= endDate) {
// include result
KeySortUtility.store(keys, results, date, item);
break;
}
}
}
return results.elements();
| public void | removeToDo(javax.microedition.pim.ToDo item)Removes an entry from a ToDo list.
removeItem(item);
|
|