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

Public Member Functions

 ConstrainsLayout ()
 
void setTask (AbstractTask task)
 

Detailed Description

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

Definition at line 41 of file ConstrainsLayout.java.

Constructor & Destructor Documentation

◆ ConstrainsLayout()

org.turro.scheduler.model.ConstrainsLayout.ConstrainsLayout ( )

Definition at line 51 of file ConstrainsLayout.java.

51  {
52  initMonth();
53  initDayOfMonth();
54  initWeekDays();
55  initHours();
56  initMinutes();
57  }

Member Function Documentation

◆ setTask()

void org.turro.scheduler.model.ConstrainsLayout.setTask ( AbstractTask  task)

Definition at line 59 of file ConstrainsLayout.java.

59  {
60  this.task = task;
61  if(task != null) {
62  for(Month month : Month.values()) {
63  months[month.ordinal()].setChecked(task.getSettings().getConstraints().getMonths().contains(month));
64  months[month.ordinal()].setDisabled(task.isSystem());
65  }
66  for(int x = 0; x < 31; x++) {
67  daysOfMonth[x].setChecked(task.getSettings().getConstraints().getDaysOfMonth().contains(x + 1));
68  daysOfMonth[x].setDisabled(task.isSystem());
69  }
70  for(WeekDay weekDay : WeekDay.values()) {
71  weekDays[weekDay.ordinal()].setChecked(task.getSettings().getConstraints().getWeekDays().contains(weekDay));
72  weekDays[weekDay.ordinal()].setDisabled(task.isSystem());
73  }
74  for(int x = 0; x < 24; x++) {
75  hours[x].setChecked(task.getSettings().getConstraints().getHours().contains(x));
76  hours[x].setDisabled(task.isSystem());
77  }
78  for(int x = 0; x < 12; x++) {
79  minutes[x].setChecked(task.getSettings().getConstraints().getMinutes().contains(x * 5));
80  minutes[x].setDisabled(task.isSystem());
81  }
82  }
83  }
Here is the call graph for this function:

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