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

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

Member Function Documentation

◆ setValue()

void org.turro.dossier.zul.dossier.DossierActivityRow.setValue ( Object  value)

Definition at line 45 of file DossierActivityRow.java.

45  {
46  super.setValue(value);
47 
48  setValign("top");
49 
50  if(value instanceof IssueComment) {
51  final IssueComment ic = (IssueComment) value;
52 
53  Vbox vbox = new Vbox();
54  appendChild(vbox);
55 
56  Label label = new Label(ic.getParticipantName());
57  label.setSclass("participant");
58  vbox.appendChild(label);
59 
60  label = new Label(DateFormats.format(ic.getModification(), false));
61  label.setSclass("modification");
62  vbox.appendChild(label);
63 
64  vbox = new Vbox();
65  appendChild(vbox);
66 
67  LabelExtended lext = new LabelExtended();
68  lext.setSclass("comment");
69  lext.setWordWrap(80);
70  lext.setPre(true);
71  lext.setValue(ic.getComment());
72  vbox.appendChild(lext);
73 
74  Hbox hbox = new Hbox();
75  hbox.setSclass("values");
76  boolean hasValues = false;
77 
78  if(ic.getExpenses() != 0) {
79  label = new Label(I_.get("Expenses"));
80  label.setSclass("caption");
81  hbox.appendChild(label);
82  label = new Label(ic.getExpenses() + "");
83  label.setSclass("value");
84  hbox.appendChild(label);
85  hasValues = true;
86  }
87 
88  if(ic.getHours() != 0) {
89  label = new Label(I_.get("Hours"));
90  label.setSclass("caption");
91  hbox.appendChild(label);
92  label = new Label(ic.getHours() + "");
93  label.setSclass("value");
94  hbox.appendChild(label);
95  hasValues = true;
96  }
97 
98  if(ic.getPrice() != 0) {
99  label = new Label(I_.get("Price"));
100  label.setSclass("caption");
101  hbox.appendChild(label);
102  label = new Label(ic.getPrice() + "");
103  label.setSclass("value");
104  hbox.appendChild(label);
105  hasValues = true;
106  }
107 
108  if(hasValues) {
109  vbox.appendChild(hbox);
110  }
111 
112  } else if(value instanceof Attachment) {
113  final Attachment attachment = (Attachment) value;
114 
115  Vbox vbox = new Vbox();
116  appendChild(vbox);
117 
118  IContact contact = Contacts.getEmpty();
119  contact.loadByLogin(attachment.getOwner());
120 
121  Label label = new Label(contact != null ? contact.getName() : attachment.getOwner());
122  label.setSclass("participant");
123  vbox.appendChild(label);
124 
125  label = new Label(DateFormats.format(attachment.getModification(), false));
126  label.setSclass("modification");
127  vbox.appendChild(label);
128 
129  vbox = new Vbox();
130  appendChild(vbox);
131 
132  label = new Label(attachment.getFileName());
133  label.setSclass("attachment");
134  label.setStyle("cursor:pointer");
135  label.addEventListener(Events.ON_CLICK, new EventListener() {
136 
137  @Override
138  public void onEvent(Event event) throws Exception {
139  doDownload(attachment);
140  }
141  });
142  vbox.appendChild(label);
143 
144  LabelExtended lext = new LabelExtended();
145  lext.setWordWrap(80);
146  lext.setPre(true);
147  lext.setValue(attachment.getComment());
148  vbox.appendChild(lext);
149 
150  }
151  }
Here is the call graph for this function:

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