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

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 XMLTimeList.java.

Member Function Documentation

◆ setDate()

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

Definition at line 39 of file XMLTimeList.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  XMLHumanResourceSet xhrs = new XMLHumanResourceSet(Application.getApplication().getConstructor());
49  XMLTimeControlUtil tcu = new XMLTimeControlUtil(Application.getApplication().getConstructor());
50  List<XMLTimeControl> registered = tcu.getFromDate(date);
51  long absoluteDays = CheckDate.absoluteDays(date);
52 
53  for(XMLTimeControl tc : registered) {
54  final Row row = new Row();
55  row.setValue(tc);
56  rows.appendChild(row);
57 
58  row.appendChild(new Label(xhrs.getName(tc)));
59 
60  Vlayout vbox = new Vlayout();
61  row.appendChild(vbox);
62  vbox.appendChild(new Label(new CheckDate(tc.getStartTime()).formatDate("HH:mm:ss")));
63  if(tc.getStartTime() != null && CheckDate.absoluteDays(tc.getStartTime()) != absoluteDays) {
64  vbox.appendChild(LabelTypes.getSoftLabel(DateFormats.format(tc.getStartTime(), true)));
65  }
66  vbox = new Vlayout();
67  row.appendChild(vbox);
68  if(tc.getEndTime() != null) {
69  vbox.appendChild(new Label(new CheckDate(tc.getEndTime()).formatDate("HH:mm:ss")));
70  if(tc.getEndTime() != null && CheckDate.absoluteDays(tc.getEndTime()) != absoluteDays) {
71  vbox.appendChild(LabelTypes.getSoftLabel(DateFormats.format(tc.getEndTime(), true)));
72  }
73  }
74  }
75  }
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: