|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
com.std.model.CalendarModel
public class CalendarModel
facade for the functionality of the model
| Constructor Summary | |
|---|---|
CalendarModel()
creates a new calendar model |
|
| Method Summary | ||
|---|---|---|
boolean |
add(Appointment e)
|
|
boolean |
addAll(java.util.Collection<? extends Appointment> c)
|
|
void |
appointmentChanged(AppointmentSet source,
Appointment subSource)
callback for when an appointment has been changed |
|
void |
appointmentSetChanged(AppointmentSet source,
Appointment subSource)
callback for when an appointment has been added or removed |
|
void |
appointmentSetReplaced()
callback for when the current appointment set has been replaced |
|
Appointment |
ceiling(Appointment e)
|
|
void |
clear()
|
|
java.util.Comparator<? super Appointment> |
comparator()
|
|
boolean |
contains(java.lang.Object o)
|
|
boolean |
containsAll(java.util.Collection<?> c)
|
|
void |
currentAppointmentChanged()
callback for when the current appointment has been changed |
|
java.util.Iterator<Appointment> |
descendingIterator()
|
|
java.util.NavigableSet<Appointment> |
descendingSet()
|
|
Appointment |
first()
|
|
void |
firstAppointment()
sets the current appointment to the first chronological appointment |
|
Appointment |
floor(Appointment e)
|
|
AppointmentSet |
getAllAppointments()
|
|
Appointment |
getCurrentAppointment()
|
|
java.util.Date |
getCurrentDate()
|
|
AppointmentSet |
getDayAppointments()
|
|
java.lang.String |
getFileName()
|
|
AppointmentSet |
getGridMonthAppointments()
|
|
AppointmentSet |
getMonthAppointments()
|
|
java.util.List<AppointmentSet> |
getMonthWeeksAppointments()
|
|
AppointmentSet |
getWeekAppointments()
|
|
java.util.List<AppointmentSet> |
getWeekDaysAppointments()
|
|
java.util.SortedSet<Appointment> |
headSet(Appointment toElement)
|
|
java.util.NavigableSet<Appointment> |
headSet(Appointment toElement,
boolean inclusive)
|
|
Appointment |
higher(Appointment e)
|
|
boolean |
isEmpty()
|
|
boolean |
isModified()
|
|
java.util.Iterator<Appointment> |
iterator()
|
|
Appointment |
last()
|
|
void |
lastAppointment()
sets the current appointment to the last chronological appointment |
|
void |
load()
loads this object from a file |
|
void |
load(boolean discardOld)
loads this object from a file |
|
void |
load(java.lang.String fileName)
loads this object from a file |
|
void |
load(java.lang.String fileName,
boolean discardOld)
loads this object from a file |
|
void |
loadNew()
sets this object to a new instance |
|
void |
loadNew(boolean discardOld)
sets this object to a new instance |
|
Appointment |
lower(Appointment e)
|
|
void |
nextAppointment()
advances the current appointment to the next chronological appointment or, if the target is null, sets it to the first chronological appointment |
|
void |
nextDay()
advances the current date by one day |
|
void |
nextMonth()
advances the current date by one month |
|
void |
nextWeek()
advances the current date by one week |
|
void |
nextYear()
advances the current date by one year |
|
ObservableEvent |
onAppointmentChanged()
|
|
ObservableEvent |
onAppointmentSelectionChanged()
|
|
ObservableEvent |
onAppointmentSetChanged()
|
|
ObservableEvent |
onDateSelectionChanged()
|
|
Appointment |
pollFirst()
|
|
Appointment |
pollLast()
|
|
void |
previousAppointment()
advances the current appointment to the previous chronological appointment or, if the target is null, sets it to the last chronological appointment |
|
void |
previousDay()
regresses the current date by one day |
|
void |
previousMonth()
regresses the current date by one month |
|
void |
previousWeek()
regresses the current date by one week |
|
void |
previousYear()
regresses the current date by one year |
|
boolean |
remove(java.lang.Object o)
|
|
boolean |
removeAll(java.util.Collection<?> c)
|
|
boolean |
retainAll(java.util.Collection<?> c)
|
|
void |
save()
saves this object to its previously specified file |
|
void |
save(java.lang.String fileName)
saves this object to a file |
|
void |
save(java.lang.String fileName,
boolean overwriteOld)
saves this object to a file |
|
void |
setCurrentAppointment(Appointment target)
sets the current appointment |
|
void |
setCurrentDate(java.util.Date target)
sets the current date |
|
int |
size()
|
|
java.util.SortedSet<Appointment> |
subSet(Appointment fromElement,
Appointment toElement)
|
|
java.util.NavigableSet<Appointment> |
subSet(Appointment fromElement,
boolean fromInclusive,
Appointment toElement,
boolean toInclusive)
|
|
java.util.SortedSet<Appointment> |
tailSet(Appointment fromElement)
|
|
java.util.NavigableSet<Appointment> |
tailSet(Appointment fromElement,
boolean inclusive)
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public CalendarModel()
| Method Detail |
|---|
public boolean add(Appointment e)
add in interface java.util.Collection<Appointment>add in interface java.util.Set<Appointment>public boolean addAll(java.util.Collection<? extends Appointment> c)
addAll in interface java.util.Collection<Appointment>addAll in interface java.util.Set<Appointment>public void appointmentChanged(AppointmentSet source,
Appointment subSource)
source - the set that has been changedsubSource - the appointment that has been changedpublic void appointmentSetChanged(AppointmentSet source,
Appointment subSource)
source - the set that has been changedsubSource - the appointment that has been changedpublic void appointmentSetReplaced()
public Appointment ceiling(Appointment e)
ceiling in interface java.util.NavigableSet<Appointment>public void clear()
clear in interface java.util.Collection<Appointment>clear in interface java.util.Set<Appointment>public java.util.Comparator<? super Appointment> comparator()
comparator in interface java.util.SortedSet<Appointment>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<Appointment>contains in interface java.util.Set<Appointment>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<Appointment>containsAll in interface java.util.Set<Appointment>public void currentAppointmentChanged()
public java.util.Iterator<Appointment> descendingIterator()
descendingIterator in interface java.util.NavigableSet<Appointment>public java.util.NavigableSet<Appointment> descendingSet()
descendingSet in interface java.util.NavigableSet<Appointment>public Appointment first()
first in interface java.util.SortedSet<Appointment>public void firstAppointment()
public Appointment floor(Appointment e)
floor in interface java.util.NavigableSet<Appointment>public AppointmentSet getAllAppointments()
public Appointment getCurrentAppointment()
public java.util.Date getCurrentDate()
public AppointmentSet getDayAppointments()
public java.lang.String getFileName()
public AppointmentSet getGridMonthAppointments()
public AppointmentSet getMonthAppointments()
public java.util.List<AppointmentSet> getMonthWeeksAppointments()
public AppointmentSet getWeekAppointments()
public java.util.List<AppointmentSet> getWeekDaysAppointments()
public java.util.SortedSet<Appointment> headSet(Appointment toElement)
headSet in interface java.util.NavigableSet<Appointment>headSet in interface java.util.SortedSet<Appointment>public java.util.NavigableSet<Appointment> headSet(Appointment toElement,
boolean inclusive)
headSet in interface java.util.NavigableSet<Appointment>public Appointment higher(Appointment e)
higher in interface java.util.NavigableSet<Appointment>public boolean isEmpty()
isEmpty in interface java.util.Collection<Appointment>isEmpty in interface java.util.Set<Appointment>public boolean isModified()
public java.util.Iterator<Appointment> iterator()
iterator in interface java.lang.Iterable<Appointment>iterator in interface java.util.Collection<Appointment>iterator in interface java.util.NavigableSet<Appointment>iterator in interface java.util.Set<Appointment>public Appointment last()
last in interface java.util.SortedSet<Appointment>public void lastAppointment()
public void load()
throws java.lang.ClassNotFoundException,
java.io.IOException
java.io.IOException
java.lang.IllegalArgumentException - when the file
hasn't been previously saved
java.lang.IllegalStateException - when changes have
been made since the last save or load operation
java.lang.ClassNotFoundExceptionpublic void load(boolean discardOld)
throws java.lang.ClassNotFoundException,
java.io.IOException
discardOld - setting this to true will
automatically discard any changes to the current
object. setting this to false will throw an
IllegalStateException when the object has been
changed since the last save or load
java.io.IOException
java.lang.IllegalArgumentException - when the file
hasn't been previously saved
java.lang.IllegalStateException - when changes have
been made since the last save or load operation
and discardOld is false.
java.lang.ClassNotFoundExceptionpublic void load(java.lang.String fileName)
throws java.lang.ClassNotFoundException,
java.io.IOException
fileName - the name of the file to load from.
if this is null, default to the current file name
java.io.IOException
java.lang.IllegalArgumentException - when fileName is
null and the file hasn't been previously saved
java.lang.IllegalStateException - when changes have
been made since the last save or load operation
java.lang.ClassNotFoundExceptionpublic void load(java.lang.String fileName,
boolean discardOld)
throws java.lang.ClassNotFoundException,
java.io.IOException
fileName - the name of the file to load from.
if this is null, default to the current file namediscardOld - setting this to true will
automatically discard any changes to the current
object. setting this to false will throw an
IllegalStateException when the object has been
changed since the last save or load
java.io.IOException
java.lang.IllegalArgumentException - when fileName is
null and the file hasn't been previously saved
java.lang.IllegalStateException - when changes have
been made since the last save or load operation
and discardOld is false.
java.lang.ClassNotFoundExceptionpublic void loadNew()
java.io.IOException
java.lang.IllegalStateException - when changes have
been made since the last save or load operationpublic void loadNew(boolean discardOld)
discardOld - setting this to true will
automatically discard any changes to the current
object. setting this to false will throw an
IllegalStateException when the object has been
changed since the last save or load
java.io.IOException
java.lang.IllegalStateException - when changes have
been made since the last save or load operation
and discardOld is false.public Appointment lower(Appointment e)
lower in interface java.util.NavigableSet<Appointment>public void nextAppointment()
public void nextDay()
public void nextMonth()
public void nextWeek()
public void nextYear()
public ObservableEvent onAppointmentChanged()
public ObservableEvent onAppointmentSelectionChanged()
public ObservableEvent onAppointmentSetChanged()
public ObservableEvent onDateSelectionChanged()
public Appointment pollFirst()
pollFirst in interface java.util.NavigableSet<Appointment>public Appointment pollLast()
pollLast in interface java.util.NavigableSet<Appointment>public void previousAppointment()
public void previousDay()
public void previousMonth()
public void previousWeek()
public void previousYear()
public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<Appointment>remove in interface java.util.Set<Appointment>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<Appointment>removeAll in interface java.util.Set<Appointment>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<Appointment>retainAll in interface java.util.Set<Appointment>public void save()
throws java.io.IOException
java.io.IOException
java.lang.IllegalArgumentException - when the file
hasn't been previously savedpublic void save(java.lang.String fileName)
throws java.io.IOException
fileName - the name of the file to save to.
if this is null, default to the current file name
java.io.IOException
java.lang.IllegalArgumentException - when fileName is
null and the file hasn't been previously saved
java.lang.IllegalStateException - when fileName exists
but is not this objectpublic void save(java.lang.String fileName,
boolean overwriteOld)
throws java.io.IOException
fileName - the name of the file to save to.
if this is null, default to the current file nameoverwriteOld - setting this to true will
automatically overwrite any file with the specified
file name. setting this to false will throw an
IllegalStateException when fileName already exists
java.io.IOException
java.lang.IllegalArgumentException - when fileName is
null and the file hasn't been previously saved
java.lang.IllegalStateException - when fileName exists
but is not this object and overwriteOld is false.public void setCurrentAppointment(Appointment target)
java.lang.IllegalArgumentException - if the intended
target is null or not a member of the parent setpublic void setCurrentDate(java.util.Date target)
public int size()
size in interface java.util.Collection<Appointment>size in interface java.util.Set<Appointment>public java.util.SortedSet<Appointment> subSet(Appointment fromElement,
Appointment toElement)
subSet in interface java.util.NavigableSet<Appointment>subSet in interface java.util.SortedSet<Appointment>public java.util.NavigableSet<Appointment> subSet(Appointment fromElement,
boolean fromInclusive,
Appointment toElement,
boolean toInclusive)
subSet in interface java.util.NavigableSet<Appointment>public java.util.SortedSet<Appointment> tailSet(Appointment fromElement)
tailSet in interface java.util.NavigableSet<Appointment>tailSet in interface java.util.SortedSet<Appointment>public java.util.NavigableSet<Appointment> tailSet(Appointment fromElement,
boolean inclusive)
tailSet in interface java.util.NavigableSet<Appointment>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<Appointment>toArray in interface java.util.Set<Appointment>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<Appointment>toArray in interface java.util.Set<Appointment>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||