|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingworker.SwingWorker<T,V>
org.jdesktop.application.Task<Void,Long>
org.chorem.jtimer.ui.tasks.RunTaskJob
public class RunTaskJob
RunTaskJob. Notify every second the core controler.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jdesktop.application.Task |
|---|
org.jdesktop.application.Task.BlockingScope, org.jdesktop.application.Task.InputBlocker |
| Nested classes/interfaces inherited from class org.jdesktop.swingworker.SwingWorker |
|---|
org.jdesktop.swingworker.SwingWorker.StateValue |
| Field Summary | |
|---|---|
protected Boolean |
bWantToStop
Want to stop flag |
static int |
CONTINUE
Option after idle detect |
protected TimerDataManager |
dataManager
Data manager |
protected long |
lastPublishTimestamp
Last publish time to detect hibernate |
protected TimerTask |
managedTask
The task to manage |
protected long |
offsetTimeInMs
Offset to adjust time. |
protected JTimer |
parentApp
Parent app reference |
static int |
RESUME
Option after idle detect |
static int |
REVERT
Option after idle detect |
protected SystemInfo |
systemInfo
System information (idle...) |
protected Calendar |
taskStartCalendar
Calendar instance when timing start |
protected long |
taskTimingBeforeStartInMs
The today total task time at start time |
| Constructor Summary | |
|---|---|
RunTaskJob(JTimer parentApp,
TimerTask managedTask,
TimerDataManager dataManager)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
checkReset()
Check if task need to be reset. |
protected Void |
doInBackground()
|
TimerTask |
getTask()
Task getter. |
void |
incrementTaskTime(long increment)
Method to increment time while task is running (in ms). |
boolean |
isStopping()
Tell if task is trying to stop. |
protected void |
process(List<Long> durations)
|
void |
resetTiming()
Reset timing. |
void |
wantToStop()
Notify that task want to stop |
| Methods inherited from class org.jdesktop.application.Task |
|---|
addTaskListener, cancelled, done, failed, finished, getApplication, getContext, getDescription, getExecutionDuration, getInputBlocker, getMessage, getMessageDuration, getResourceMap, getTaskListeners, getTaskService, getTitle, getUserCanCancel, interrupted, isPending, isProgressPropertyValid, isStarted, message, removeTaskListener, resourceName, setDescription, setInputBlocker, setMessage, setProgress, setProgress, setProgress, setTitle, setUserCanCancel, succeeded |
| Methods inherited from class org.jdesktop.swingworker.SwingWorker |
|---|
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JTimer parentApp
protected TimerTask managedTask
protected TimerDataManager dataManager
protected SystemInfo systemInfo
protected long taskTimingBeforeStartInMs
protected Calendar taskStartCalendar
protected long offsetTimeInMs
protected long lastPublishTimestamp
protected Boolean bWantToStop
public static final int REVERT
public static final int CONTINUE
public static final int RESUME
| Constructor Detail |
|---|
public RunTaskJob(JTimer parentApp,
TimerTask managedTask,
TimerDataManager dataManager)
parentApp - parent applicationmanagedTask - taskdataManager - data| Method Detail |
|---|
public TimerTask getTask()
public void incrementTaskTime(long increment)
increment - increment, can be negativepublic void resetTiming()
protected void checkReset()
protected Void doInBackground()
throws Exception
doInBackground in class org.jdesktop.swingworker.SwingWorker<Void,Long>Exceptionprotected void process(List<Long> durations)
process in class org.jdesktop.application.Task<Void,Long>public void wantToStop()
public boolean isStopping()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||