Package org.japura.task.ui

Examples of org.japura.task.ui.TaskExecutionUI


  public DefaultTaskManager() {
  this.taskExecutors = new HashSet<TaskExecutor>();
  }

  protected TaskExecutionUI getTaskExecutionUI(Task task, TaskManagerEvent event) {
  TaskExecutionUI taskExecutionUI = null;
  try {
    if (TaskManagerEvent.SUBMITTED.equals(event)) {
    taskExecutionUI = task.getTaskExecutionUI();
    if (taskExecutionUI != null) {
      taskExecutionUIs.put(task.getId(), taskExecutionUI);
View Full Code Here


  if (event == null) {
    return;
  }

  final TaskExecutionUIEvent uievent = new TaskExecutionUIEvent(task);
  final TaskExecutionUI taskExecutionUI = getTaskExecutionUI(task, event);

  if (taskExecutionUI != null) {
    SwingUtilities.invokeLater(new Runnable() {
    @Override
    public void run() {
      try {
      if (TaskManagerEvent.BEFORE_EXECUTE.equals(event)) {
        taskExecutionUI.beforeExecute(uievent);
      } else if (TaskManagerEvent.AFTER_EXECUTE.equals(event)) {
        taskExecutionUI.afterExecute(uievent);
      } else if (TaskManagerEvent.SUBMITTED.equals(event)) {
        taskExecutionUI.submitted(uievent);
      }
      } catch (Exception e) {
      Application.getHandlerExceptionManager().handle(
        new TaskExeception(e));
      }
View Full Code Here

  }

  @Test
  public void changingUI() {
  Task task = new Task();
  TaskExecutionUI ui = new TaskExecutionUIFake();
  task.setTaskExecutionUI(ui);
  Assert.assertNotNull(task.getTaskExecutionUI());
  Assert.assertEquals(ui, task.getTaskExecutionUI());
  }
View Full Code Here

TOP

Related Classes of org.japura.task.ui.TaskExecutionUI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.