BrightSide Workbench Full Report + Source Code
org.turro.scheduler.zul.TaskRow Class Reference
Inheritance diagram for org.turro.scheduler.zul.TaskRow:
Collaboration diagram for org.turro.scheduler.zul.TaskRow:

Public Member Functions

void setValue (Object value)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 42 of file TaskRow.java.

Member Function Documentation

◆ setValue()

void org.turro.scheduler.zul.TaskRow.setValue ( Object  value)

Definition at line 47 of file TaskRow.java.

47  {
48  super.setValue(value);
49 
50  final ScheduledTask scheduledTask = (ScheduledTask) getValue();
51 
52  Label label = new Label();
53  label.setValue(scheduledTask.getName());
54  if(Application.getApplication().isInRole("scheduled-task:edit")) {
55  label.setStyle("cursor:pointer");
56  label.addEventListener(Events.ON_CLICK, new EventListener() {
57  @Override
58  public void onEvent(Event event) throws Exception {
59  doEdit();
60  }
61  });
62  }
63  appendChild(label);
64 
65  LabelExtended lext = new LabelExtended();
66  lext.setValue(scheduledTask.getDescription());
67  lext.setMaxChars(70);
68  lext.setShowTooltip(true);
69  appendChild(lext);
70 
71  appendChild(new Label(Boolean.toString(scheduledTask.isActive())));
72 
73  appendChild(new Label(formatDate(scheduledTask.getStartDate())));
74 
75  appendChild(new Label(formatDate(scheduledTask.getEndDate())));
76 
77  if(Application.getApplication().isInRole("scheduled-task:delete")) {
78  Image img = new Image("/_zul/images/edit-delete.png");
79  img.setStyle("cursor:pointer");
80  img.addEventListener(Events.ON_CLICK, new EventListener() {
81  @Override
82  public void onEvent(Event event) throws Exception {
83  Messages.confirmDeletion().show(() -> {
84  Motor.getInstance().getTasks().remove(scheduledTask);
85  Framework.getCurrent().invalidateSelected();
86  });
87  }
88  });
89  appendChild(img);
90  }
91 
92  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: