You are currently browsing the Object Definitions Blog weblog archives for May, 2009.
You are currently browsing the Object Definitions Blog weblog archives for May, 2009.
Saturday, May 2nd, 2009 Posted in Uncategorized | No Comments »
There are occasions when it is useful to group commands together and execute several in combination. SwingCommand provides a CompositeCommandTask which allows you to group commands together in a single ... Read more..Saturday, May 2nd, 2009 Posted in Uncategorized | No Comments »
SwingCommand has support for cancellable commands. To support cancellation for a Task it is easiest if the Task extends InterruptibleTask. InterruptibleTask helps to implement the logic necessary to interrupt the ... Read more..Saturday, May 2nd, 2009 Posted in Uncategorized | No Comments »
Task States It is possible to find the current state of a Task instance directly by calling task.getExecutionState(); There are six ExecutionStates: NOT_RUN, PENDING, STARTED, SUCCESS, CANCELLED and ERROR. A task starts in ... Read more..Saturday, May 2nd, 2009 Posted in Uncategorized | No Comments »
SwingCommand has good integration with the java.util.Concurrent, and this allows you to control which background thread will be used to run your BackgroundTask. You can specify the Executor which should ... Read more..Saturday, May 2nd, 2009 Posted in Uncategorized | No Comments »
The progress animation triggered by the TaskListener in the previous example would at least inform the user that a SwingCommand is executing. However, sometimes it may be useful for a ... Read more..Saturday, May 2nd, 2009 Posted in Uncategorized | No Comments »
A common requirement in User Interfaces is to show an animation while a background task runs. How might this be accomplished using SwingCommand? The following example shows how you can add ... Read more..Saturday, May 2nd, 2009 Posted in Uncategorized | No Comments »
This is the first of several blog posts in which I'll demonstrate how to use the SwingCommand library to handle background tasks in Swing apps. SwingCommand version 2 has recently been ... Read more..