Package picasso.util

Class ThreadedCommand<T>

java.lang.Object
picasso.util.ThreadedCommand<T>
All Implemented Interfaces:
Command<T>

public class ThreadedCommand<T> extends Object implements Command<T>
Execute a long running command in a separate thread and display the results in a component while the command is running.
Author:
Robert C Duvall, Sara Sprenkle - fixed bug with initial isDone parameter
  • Field Details

  • Constructor Details

    • ThreadedCommand

      public ThreadedCommand(JComponent view, Command<T> command)
      Create a command that runs the given command and updates the given view over time.
  • Method Details

    • execute

      public void execute(T target)
      Run the command on the target or cancel it if is already running.
      Specified by:
      execute in interface Command<T>