1 package org.columba.core.command; 2 3 import org.columba.api.command.IWorkerStatusController; 4 5 public class TestCommand extends Command { 6 private int id; 7 8 private DefaultProcessorTest test; 9 10 public TestCommand(DefaultProcessorTest test, int id) { 11 this(test, id, Command.NORMAL_PRIORITY); 12 } 13 14 public TestCommand() { 15 super(null); 16 } 18 19 public TestCommand(DefaultProcessorTest test, int id, int priority) { 20 super(null); 21 this.id = id; 22 this.test = test; 23 this.priority = priority; 24 } 25 26 public void updateGUI() { 27 test.finishedID = id; 28 } 29 30 public void execute(IWorkerStatusController worker) throws Exception { 31 test.executedID = id; 32 Thread.sleep(50); 33 } 34 35 38 public int getId() { 39 return id; 40 } 41 42 46 public void setId(int id) { 47 this.id = id; 48 } 49 } | Popular Tags |