BrightSide Workbench Full Report + Source Code
org.turro.erp.time.TimeList Class Reference
Inheritance diagram for org.turro.erp.time.TimeList:
Collaboration diagram for org.turro.erp.time.TimeList:

Public Member Functions

void setDate (Date date)
 

Detailed Description

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

Definition at line 37 of file TimeList.java.

Member Function Documentation

◆ setDate()

void org.turro.erp.time.TimeList.setDate ( Date  date)

Definition at line 39 of file TimeList.java.

39  {
40  Rows rows = getRows();
41  if(rows != null) {
42  rows.getChildren().clear();
43  } else {
44  rows = new Rows();
45  appendChild(rows);
46  }
47 
48  TimeControlUtil tcu = new TimeControlUtil();
49  List<TimeControl> registered = tcu.getFromDate(date);
50  long absoluteDays = CheckDate.absoluteDays(date);
51 
52  for(TimeControl tc : registered) {
53  final Row row = new Row();
54  row.setValue(tc);
55  rows.appendChild(row);
56 
57  Vlayout vbox = new Vlayout();
58  row.appendChild(vbox);
59  vbox.appendChild(new Label(tc.getHumanResource().getName()));
60  if(tc.getTask() != null) {
61  vbox.appendChild(LabelTypes.getSoftLabel(tc.getTask().getFullDescription()));
62  }
63  vbox = new Vlayout();
64  row.appendChild(vbox);
65  vbox.appendChild(new Label(new CheckDate(tc.getStartTime()).formatDate("HH:mm:ss")));
66  if(tc.getStartTime() != null && CheckDate.absoluteDays(tc.getStartTime()) != absoluteDays) {
67  vbox.appendChild(LabelTypes.getSoftLabel(DateFormats.format(tc.getStartTime(), true)));
68  }
69  vbox = new Vlayout();
70  row.appendChild(vbox);
71  vbox.appendChild(new Label(new CheckDate(tc.getEndTime()).formatDate("HH:mm:ss")));
72  if(tc.getEndTime() != null && CheckDate.absoluteDays(tc.getEndTime()) != absoluteDays) {
73  vbox.appendChild(LabelTypes.getSoftLabel(DateFormats.format(tc.getEndTime(), true)));
74  }
75  }
76  }
Here is the call graph for this function:
Here is the caller graph for this function:

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