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

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 46 of file DossierRow.java.

Member Function Documentation

◆ setValue()

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

Definition at line 49 of file DossierRow.java.

49  {
50  super.setValue(value);
51 
52  //addDetail();
53 
54  final Dossier dossier = (Dossier) getValue();
55 
56  Label label = new Label(dossier.getId() + "");
57  appendChild(label);
58 
59  Vlayout vbox = new Vlayout();
60  appendChild(vbox);
61 
62  Hlayout hbox = new Hlayout();
63  vbox.appendChild(hbox);
64  hbox.appendChild(new DossierLabel(dossier, false));
65 
66  Set<DossierVersion> dvs = dossier.getActiveVersions();
67  if(!dvs.isEmpty()) {
68  hbox.appendChild(LabelTypes.getTinyLabel(" ["));
69  for(DossierVersion dv : dvs) {
70  if(dv.isActive()) {
71  hbox.appendChild(createLabel(dv));
72  }
73  }
74  hbox.appendChild(LabelTypes.getTinyLabel("]"));
75  }
76 
77  Participant subject = dossier.getSubject();
78  if(subject != null) {
79  ContactInfo ci = new ContactInfo(subject.getIdContact());
80  ci.setSclass("softLabel");
81  vbox.appendChild(ci);
82  }
83 
84  LabelExtended lext = new LabelExtended();
85  lext.setStyle("color:gray;font-size:11px");
86  lext.setValue(dossier.getExtraDescription());
87  lext.setMaxChars(70);
88  lext.setShowTooltip(true);
89  vbox.appendChild(lext);
90 
91  vbox = new Vlayout();
92  appendChild(vbox);
93 
94  lext = new LabelExtended();
95  lext.setDate(dossier.getCreation());
96  vbox.appendChild(lext);
97 
98  hbox = new Hlayout();
99  vbox.appendChild(hbox);
100 
101  lext = new LabelExtended();
102  lext.setStyle("color:gray;font-size:11px;");
103  lext.setDate(new DossierWrapper(dossier).getIssueLastModification());
104  hbox.appendChild(lext);
105 
106  hbox.appendChild(new Image("/_zul/images/activity.png"));
107 
108  vbox.appendChild(hbox);
109 
110  vbox = new Vlayout();
111  appendChild(vbox);
112 
113  lext = new LabelExtended();
114  lext.setResourceValue(dossier.getStatus().toString());
115  vbox.appendChild(lext);
116 
117  DossierDWReport dr = new DossierDWReport();
118  dr.setReportValues(null, null, dossier.getId());
119 
120  label = new Label(((long) dr.getOnWork()) + " " +
121  I_.get("Of") + " " + ((long) dr.getIssueCount()) + " " +
122  I_.get("Work in progress"));
123  label.setStyle("color:gray;font-size:11px;");
124  vbox.appendChild(label);
125 
126  label = new Label(dr.getEfectivity() + "%" + " " +
127  I_.get("Efectivity"));
128  label.setStyle("color:gray;font-size:11px;");
129  vbox.appendChild(label);
130 
131  vbox = new Vlayout();
132  appendChild(vbox);
133 
134  if(Application.getApplication().isInRole("dossier:attach")) {
135  A a = new A(I_.get("Attachments"), "/_zul/images/clip.png");
136  a.addEventListener(Events.ON_CLICK, new EventListener() {
137  @Override
138  public void onEvent(Event event) throws Exception {
139 // DossierAttachTree dat = new DossierAttachTree();
140 // dat.setVertical(true);
141 // dat.setDossier(dossier);
142 // SelectionDialog.showComponent(getPage(), I_.get("Attachments"),
143 // dat, "900px", "500px");
144  AttachmentControl ac = new AttachmentControl();
145  ac.setEntity(dossier);
146  ac.setPublicOnly(!(new DossierWrapper(dossier).getCanShowAllAttachments()));
147  SelectionDialog.showComponent(getPage(), I_.get("Attachments"),
148  ac, "80%", "80%", null);
149  }
150  });
151  vbox.appendChild(a);
152  }
153 
154  DossierData dd = dr.getData();
155  if(dd.isExpenses()) {
156  label = new Label(I_.get("Expenses"));
157  label.setStyle("color:navy;font-size:11px");
158  vbox.appendChild(label);
159  label = new Label(dd.getExpensesString());
160  label.setStyle("color:#666;font-size:11px");
161  vbox.appendChild(label);
162  }
163  if(dd.isHours()) {
164  label = new Label(I_.get("Hours"));
165  label.setStyle("color:navy;font-size:11px");
166  vbox.appendChild(label);
167  label = new Label(dd.getHoursString());
168  label.setStyle("color:#666;font-size:11px");
169  vbox.appendChild(label);
170  }
171  if(dd.isPrice()) {
172  label = new Label(I_.get("Price"));
173  label.setStyle("color:navy;font-size:11px");
174  vbox.appendChild(label);
175  label = new Label(dd.getPriceString());
176  label.setStyle("color:#666;font-size:11px");
177  vbox.appendChild(label);
178  }
179 
180  if(Application.getApplication().isInRole("dossier:delete")) {
181  Image img = new Image("/_zul/images/edit-delete.png");
182  img.setStyle("cursor:pointer");
183  img.addEventListener(Events.ON_CLICK, new EventListener() {
184  @Override
185  public void onEvent(Event event) throws Exception {
186  Messages.confirmDeletion().show(() -> {
187  SystemLogger.getInstance().doLog(SystemLogType.LOG_INFO, dossier, "deleted",
188  dossier.getFullDescription());
189  new DossierWrapper(dossier).delete();
190  Framework.getCurrent().invalidateSelected();
191  });
192  }
193  });
194  appendChild(img);
195  }
196 
197  }
Set< DossierVersion > getActiveVersions()
Definition: Dossier.java:269
static String get(String msg)
Definition: I_.java:41
Here is the call graph for this function:

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