|
|||||||||
| Home >> All >> samples >> swing >> timesheet >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
samples.swing.timesheet.model
Class TimesheetModel

java.lang.Objectorg.scopemvc.model.basic.BasicModel
samples.swing.timesheet.model.TimesheetModel
- All Implemented Interfaces:
- org.scopemvc.core.ModelChangeEventSource, org.scopemvc.core.ModelChangeListener, org.scopemvc.core.ModelChangeTypes
- public class TimesheetModel
- extends org.scopemvc.model.basic.BasicModel
- Since:
- Scope v0.8
- Version:
- $Revision: 1.3 $ $Date: 2002/01/12 09:35:42 $
| Nested Class Summary | |
(package private) class |
TimesheetModel.TimesheetTimerTask
Inner class to handle the timer task stuff |
| Field Summary | |
static org.scopemvc.core.Selector |
CURRENT_ITEM
|
static org.scopemvc.core.Selector |
CURRENT_PROJECT
|
private WorkItemModel |
currentItem
|
private java.lang.String |
currentProject
|
static org.scopemvc.core.Selector |
PROJECT_TOTAL
|
private org.scopemvc.util.Time |
projectTotal
|
private java.util.Timer |
timer
The timer stuff |
static org.scopemvc.core.Selector |
TOTAL_WORK
|
private org.scopemvc.util.Time |
totalWork
|
static org.scopemvc.core.Selector |
WORK_ITEMS
|
private org.scopemvc.model.collection.ListModel |
workItems
|
| Fields inherited from class org.scopemvc.model.basic.BasicModel |
|
| Fields inherited from interface org.scopemvc.core.ModelChangeTypes |
ACCESS_CHANGED, VALUE_ADDED, VALUE_CHANGED, VALUE_REMOVED |
| Constructor Summary | |
TimesheetModel()
|
|
TimesheetModel(org.scopemvc.model.collection.ListModel workItems,
org.scopemvc.util.Time totalWork,
java.lang.String currentProject,
org.scopemvc.util.Time projectTotal)
|
|
| Method Summary | |
java.lang.String |
getCurrentProject()
|
org.scopemvc.util.Time |
getProjectTotal()
|
org.scopemvc.util.Time |
getTotalWork()
|
org.scopemvc.model.collection.ListModel |
getWorkItems()
|
void |
modelChanged(org.scopemvc.core.ModelChangeEvent inEvent)
Overide of the model change event, this is done so additional processing can be done on the model change when the work items changes. |
private void |
recalculate()
Recalculate the information in the timesheet reporting fields. |
private void |
runTimer()
Start the timer if not already started |
void |
setCurrentProject(java.lang.String currentProject)
|
void |
setProjectTotal(org.scopemvc.util.Time projectTotal)
|
void |
setTotalWork(org.scopemvc.util.Time totalWork)
|
void |
setWorkItems(org.scopemvc.model.collection.ListModel workItems)
|
| Methods inherited from class org.scopemvc.model.basic.BasicModel |
addModelChangeListener, fireModelChange, listenNewSubmodel, makeActive, removeModelChangeListener, unlistenOldSubmodel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
WORK_ITEMS
public static final org.scopemvc.core.Selector WORK_ITEMS
TOTAL_WORK
public static final org.scopemvc.core.Selector TOTAL_WORK
CURRENT_PROJECT
public static final org.scopemvc.core.Selector CURRENT_PROJECT
CURRENT_ITEM
public static final org.scopemvc.core.Selector CURRENT_ITEM
PROJECT_TOTAL
public static final org.scopemvc.core.Selector PROJECT_TOTAL
workItems
private org.scopemvc.model.collection.ListModel workItems
totalWork
private org.scopemvc.util.Time totalWork
currentProject
private java.lang.String currentProject
projectTotal
private org.scopemvc.util.Time projectTotal
currentItem
private WorkItemModel currentItem
timer
private java.util.Timer timer
- The timer stuff
| Constructor Detail |
TimesheetModel
public TimesheetModel(org.scopemvc.model.collection.ListModel workItems, org.scopemvc.util.Time totalWork, java.lang.String currentProject, org.scopemvc.util.Time projectTotal)
TimesheetModel
public TimesheetModel()
| Method Detail |
getWorkItems
public org.scopemvc.model.collection.ListModel getWorkItems()
setWorkItems
public void setWorkItems(org.scopemvc.model.collection.ListModel workItems)
getTotalWork
public org.scopemvc.util.Time getTotalWork()
setTotalWork
public void setTotalWork(org.scopemvc.util.Time totalWork)
getCurrentProject
public java.lang.String getCurrentProject()
setCurrentProject
public void setCurrentProject(java.lang.String currentProject)
getProjectTotal
public org.scopemvc.util.Time getProjectTotal()
setProjectTotal
public void setProjectTotal(org.scopemvc.util.Time projectTotal)
modelChanged
public void modelChanged(org.scopemvc.core.ModelChangeEvent inEvent)
Overide of the model change event, this is done so additional processing can be done on the model change when the work items changes.
recalculate
private void recalculate()
- Recalculate the information in the timesheet reporting fields.
runTimer
private void runTimer()
- Start the timer if not already started
|
|||||||||
| Home >> All >> samples >> swing >> timesheet >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC