|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.Observable
clock.Model
@ClassPreamble(author="Ian Barnes",
date="01.04.2007",
currentRevision=2,
lastModified="29.03.2007",
lastModifiedBy="abx")
@ToDo(value={"Add date members","Add alarm members"})
public class ModelThe Model class which maintains the value of of hour, minute, second by getting the current instance of java.util.Calendar It serves as Observable clas to Observer View
| Field Summary | |
|---|---|
(package private) int |
hour
|
(package private) int |
minute
|
(package private) int |
oldSecond
|
(package private) int |
second
|
| Constructor Summary | |
|---|---|
Model()
creates the model by updating the value of hour, minute, second and notifying the observer (view) of the occured change |
|
| Method Summary | |
|---|---|
void |
update()
updates the state of the model by reasigning the values of hour, minute, second and notifying the observer (view) if the change has occured |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int hour
int minute
int second
int oldSecond
| Constructor Detail |
|---|
public Model()
| Method Detail |
|---|
public void update()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||