|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmvp.View
caltool.caltool_ui.CalendarToolWindow
caltool.view_ui.AppointmentsListDisplay
public class AppointmentsListDisplay
Class AppointmentsListDisplay is the companion view of an Appointments list. The display is a JTable. The columns of the table are fixed, per the requirements. The number of rows and number of rows visible are controlled by options settings. The default number of rows is the number of appointments in the three-week period starting one week from today's date. The default number of visible rows is 20.
The model data for this display come from the Lists model class. A DefaultTableModel is used as an adaptor between the model data and the JTable display. See the method and data field documentation for further explanation.
Field Summary | |
---|---|
protected javax.swing.table.DefaultTableModel |
localData
Local data model. |
protected javax.swing.JTable |
table
The display view |
Fields inherited from class caltool.caltool_ui.CalendarToolWindow |
---|
calToolUI |
Fields inherited from class mvp.View |
---|
closeAdapter, editable, model, screen, shown, widget, window |
Constructor Summary | |
---|---|
AppointmentsListDisplay(mvp.Screen s,
Lists lists,
CalendarToolUI calToolUI)
Construct with the given screen and Lists model. |
Method Summary | |
---|---|
java.awt.Component |
compose()
Compose the initial layout with column headings and no row data. |
protected void |
populateRow(int i,
AppointmentListItem item)
Populate the ith table row with the data from the given appointment list item. |
void |
update(java.util.Observable o,
java.lang.Object arg)
Display the model data produced by the method Lists.viewAppointmentsList. |
Methods inherited from class caltool.caltool_ui.CalendarToolWindow |
---|
show |
Methods inherited from class mvp.View |
---|
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setExitOnClose, setModel, show |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.swing.table.DefaultTableModel localData
In this way, DefaultTableModel is being used as a form of adaptor class between the Lists model and the JTable-based display.
protected javax.swing.JTable table
Constructor Detail |
---|
public AppointmentsListDisplay(mvp.Screen s, Lists lists, CalendarToolUI calToolUI)
Method Detail |
---|
public java.awt.Component compose()
compose
in class mvp.View
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
update
in class mvp.View
protected void populateRow(int i, AppointmentListItem item)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |