|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectclock.Controller
public class Controller
The Controller class of the Clock application
contains event handler (which implements ActionListener as
an anonymous inner class) for dealing with Time.
Some (code analysis tools) might say the Controller isn't
necessary because other objects do not use it. This is
wrong — Controller generates events which affect
model Model.update()
Model,
View| Field Summary | |
|---|---|
(package private) java.awt.event.ActionListener |
listener
event handler which calls to repaint the clock panel |
(package private) Model |
model
model maintains value of hours, minutes and seconds and call the update |
(package private) javax.swing.Timer |
timer
timer to maintain the clock count |
(package private) View |
view
view defines the panel on which every thing is drawn |
| Constructor Summary | |
|---|---|
Controller(Model m,
View v)
creates controller linked to view and model |
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
java.awt.event.ActionListener listener
javax.swing.Timer timer
Model model
View view
| Constructor Detail |
|---|
public Controller(Model m,
View v)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||