Java Reference
In-Depth Information
the
textProperty()
of the
view
's
numberOfItems
field. This effectively controls the number of items each newly
created
Task
will process. The Start button is disabled only if the service is in the
Worker.State.RUNNING
state.
Therefore you can click the Start button after a task has finished.
The action handler of the Start button now resets the
shouldThrow
flag to
false
and calls
restart()
of the service.
The screenshots in Figures
7-12
to
7-16
are taken with the
ServiceExample
program under situations similar to
those for the screenshots in Figures
7-7
to
7-11
for the
WorkerAndTaskExample
program.
Figure 7-12.
The
ServiceExample
program after starting up
Figure 7-13.
The
ServiceExample
program while a task is in progress
Search WWH ::
Custom Search