- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 42 of file TaskRow.java.
◆ setValue()
void org.turro.scheduler.zul.TaskRow.setValue |
( |
Object |
value | ) |
|
Definition at line 47 of file TaskRow.java.
48 super.setValue(value);
50 final ScheduledTask scheduledTask = (ScheduledTask) getValue();
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() {
58 public void onEvent(Event event)
throws Exception {
65 LabelExtended lext =
new LabelExtended();
66 lext.setValue(scheduledTask.getDescription());
68 lext.setShowTooltip(
true);
71 appendChild(
new Label(Boolean.toString(scheduledTask.isActive())));
73 appendChild(
new Label(formatDate(scheduledTask.getStartDate())));
75 appendChild(
new Label(formatDate(scheduledTask.getEndDate())));
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() {
82 public void onEvent(Event event)
throws Exception {
83 Messages.confirmDeletion().show(() -> {
84 Motor.getInstance().getTasks().
remove(scheduledTask);
85 Framework.getCurrent().invalidateSelected();
The documentation for this class was generated from the following file: