Package snap.viewx
Class TaskMonitorPanel
java.lang.Object
snap.props.PropObject
snap.view.ViewOwner
snap.viewx.TaskMonitorPanel
- All Implemented Interfaces:
PropChange.DoChange
,TaskMonitor
A TaskRunner implementation that runs success/failed/finished on application thread.
-
Nested Class Summary
Nested classes/interfaces inherited from interface snap.util.TaskMonitor
TaskMonitor.Text
-
Field Summary
Fields inherited from class snap.view.ViewOwner
Action, DragDrop, DragEnter, DragEvents, DragExit, DragGesture, DragOver, KeyEvents, KeyPress, KeyRelease, KeyType, MouseDrag, MouseEnter, MouseEvents, MouseExit, MouseMove, MousePress, MouseRelease, Showing_Prop, WinClose
Fields inherited from class snap.props.PropObject
_pcs, EMPTY_OBJECT
Fields inherited from interface snap.util.TaskMonitor
NULL
-
Constructor Summary
ConstructorDescriptionTaskMonitorPanel
(View aView, String aTitle) Creates a new TaskMonitorPanel for given monitor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Begin processing a single task.protected View
createUI()
Create UI.void
endTask()
Finish the current task, so the next can begin.protected void
hide()
Hide ProgressPane.boolean
Check for user task cancellation.void
Overrideprotected void
resetUI()
Reset UI controls.protected void
show()
Show ProgressPane.void
startTasks
(int aTaskCount) Advise the monitor of the total number of subtasks (invoke only once).void
updateTask
(int theWorkDone) Denote that some work units have been completed.Methods inherited from class snap.view.ViewOwner
addKeyActionFilter, addKeyActionHandler, beep, cancelReset, createUIForClass, disableEvents, dispatchEventToOwner, enableEvents, fireActionEventForObject, getEnv, getFirstFocus, getImage, getNative, getToggleGroup, getUI, getUI, getUISource, getView, getView, getViewBoolValue, getViewFloatValue, getViewIntValue, getViewItems, getViewSelIndex, getViewSelItem, getViewStringValue, getViewText, getViewValue, getWindow, initShowing, initUI, invokeResetUI, invokeRespondUI, isEventThread, isSendEventDisabled, isShowing, isUISet, isViewDisabled, isViewEnabled, isViewVisible, isWindowSet, isWindowVisible, requestFocus, respondUI, runLater, runLaterDelayed, runLaterOnce, setFirstFocus, setSendEventDisabled, setShowing, setViewDisabled, setViewEnabled, setViewItems, setViewItems, setViewSelIndex, setViewSelItem, setViewText, setViewValue, setViewVisible, setWindowVisible
Methods inherited from class snap.props.PropObject
addDeepChangeListener, addPropChangeListener, addPropChangeListener, clone, firePropChange, firePropChange, firePropChange, getPropDefault, getPropForName, getPropParent, getPropSet, getPropsForArchival, getPropsForArchivalExtra, getPropValue, initProps, isPropDefault, processPropChange, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropValue, toString, toStringProps
-
Field Details
-
_view
-
-
Constructor Details
-
TaskMonitorPanel
Creates a new TaskMonitorPanel for given monitor.
-
-
Method Details
-
startTasks
public void startTasks(int aTaskCount) Advise the monitor of the total number of subtasks (invoke only once).- Specified by:
startTasks
in interfaceTaskMonitor
-
beginTask
Begin processing a single task.- Specified by:
beginTask
in interfaceTaskMonitor
-
updateTask
public void updateTask(int theWorkDone) Denote that some work units have been completed.- Specified by:
updateTask
in interfaceTaskMonitor
-
endTask
public void endTask()Finish the current task, so the next can begin.- Specified by:
endTask
in interfaceTaskMonitor
-
isCancelled
public boolean isCancelled()Check for user task cancellation.- Specified by:
isCancelled
in interfaceTaskMonitor
- Returns:
- true if the user asked the process to stop working.
-
createUI
Create UI. -
resetLater
public void resetLater()Override- Overrides:
resetLater
in classViewOwner
-
resetUI
protected void resetUI()Reset UI controls. -
show
protected void show()Show ProgressPane. -
hide
protected void hide()Hide ProgressPane.
-