UltraLightClient Code Community
[ start | index | login ]
Overview > Progress Pane

Progress Pane

Belongs to following categories: Utility, ULC6.0, ULC6.1, ULC6.2, UltraLightClient '08,

Project Home
Downloads

Purpose

This extension provides developers with a flexible and extensible framework for monitoring longer running tasks that execute on the server-side using a progress bar, for example.

progresspane-screenshot

One can assemble a list of tasks to be executed by a task controlling instance and visualize the progress on the client-side using a progress bar, a percentage value field and/or a status label. The task controller is independent from the visualization and thus, any component can be used for visualizing the progress. This contribution contains an ULCProgressPane component that can be configured and/or extended for custom usage.

The ULCProgressPane contribution both supports the execution of synchronous and asynchronous server-side running tasks and provides controlling facilities for starting and cancelling a running task.

If the client running the ULCProgressPane extension is using JRE 1.4 or higher, the ULCIndeterminateProgressBar can be used to display long running tasks whose percentage completed value can not be tracked (e.g. external report generation). The ULCIndeterminateProgressBar is configured by overwriting the ULCProgressPane.createProgressBar() method.

Resources

How to use

Several sample usages for the ULCProgressPane extension are included in the resource file in the com.canoo.ulc.progresspane.server.sample package.:

  • Execution of multiple synchronous running tasks
  • Execution of multiple asynchronous running tasks
  • Execution of a long-running, non-trackable tasks using an indeterminate progress bar
  • Server-side downloading a large file from a Web server using a long-running, asynchronous tasks
An ULCProgressPane is simply configured with a list of tasks and a value that indicates the update interval for the progress pane. In addition, the components displayed on the progress pane (such as cancel button, percentage completed value and status label) can be configured using the appropriate show...() methods.

...

long updateInterval = 1000; MyTaskList taskList = new MyTaskList();

ULCProgressPane progressPane = new ULCProgressPane(taskList, updateInterval); progressPane.setShowCancelButton(true); progressPane.setShowPercent(true); progressPane.setShowStatus(true);

...

Multiple ITaskControllerListener instances can be registered that are notified on events such as starting or stopping the task execution, completion and exceptions, and status / percentage completed changes.

...

progressPane.addTaskControllerListener(new ITaskControllerListener() { … });

...

The task execution is started using the ULCProgressPane.start() method. This starts the underlying TaskController that works on the task list configured for the progress pane.

...

progressPane.start();

...

How it is implemented

The ULCProgressPane observes the task execution controlled by the TaskController that uses a non-repeated ULCPollingTimer to periodically trigger the client to perform a server round-trip. During the request processing, the TaskController monitors the execution of the currently running task, starts a new task if required and notifies any registered listeners on status changes.

Compatibility

  • ULC 6.0: JDK 1.4.2
  • ULC 6.1: JDK 1.4.2
  • ULC 6.2: JDK 1.4.2, JDK 1.5, JDK 1.6, Windows XP, Windows Vista, Linux, Mac OSX
  • UltraLightClient 2008: JDK 1.4.2, JDK 1.5, JDK 1.6, Windows XP, Windows Vista, Mac OSX

Project setup with Eclipse

The project contains all necessary Eclipse project files and can be directly imported from the repository. The classpath in this project contains a entry named ULC Library, which locates the needed UltraLightClient libraries. For to uses the ULC Library entry you have to install the Eclipse Java IDE Integration Plug-in that can be found at: >>http://update.canoo.com/eclipse.
A installation guide how to install plug-ins in Eclipse can be found at the Eclipse help pages: Workbench User Guide > Tasks > Updating and installing software.

Project Links

Project Home
Downloads

no comments | post comment
labels
Category:ULC6.2
Category:Utility
Category:ULC6.0
Category:ULC6.1
Category:UltraLightClient '08
attachments
Created by christian. Last edited by daniel, one year and 206 days ago. Viewed 12,893 times. #33
[diff] [history] [edit] [rdf]




news




RSS News Feed:

RSS Feed

snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt