◆ setValue()
void org.turro.dossier.zul.dossier.DossierActivityRow.setValue |
( |
Object |
value | ) |
|
Definition at line 45 of file DossierActivityRow.java.
46 super.setValue(value);
50 if(value instanceof IssueComment) {
51 final IssueComment ic = (IssueComment) value;
53 Vbox vbox =
new Vbox();
56 Label label =
new Label(ic.getParticipantName());
57 label.setSclass(
"participant");
58 vbox.appendChild(label);
60 label =
new Label(DateFormats.format(ic.getModification(),
false));
61 label.setSclass(
"modification");
62 vbox.appendChild(label);
67 LabelExtended lext =
new LabelExtended();
68 lext.setSclass(
"comment");
71 lext.setValue(ic.getComment());
72 vbox.appendChild(lext);
74 Hbox hbox =
new Hbox();
75 hbox.setSclass(
"values");
76 boolean hasValues =
false;
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);
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);
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);
109 vbox.appendChild(hbox);
112 }
else if(value instanceof Attachment) {
113 final Attachment attachment = (Attachment) value;
115 Vbox vbox =
new Vbox();
118 IContact contact = Contacts.getEmpty();
119 contact.loadByLogin(attachment.getOwner());
121 Label label =
new Label(contact !=
null ? contact.getName() : attachment.getOwner());
122 label.setSclass(
"participant");
123 vbox.appendChild(label);
125 label =
new Label(DateFormats.format(attachment.getModification(),
false));
126 label.setSclass(
"modification");
127 vbox.appendChild(label);
132 label =
new Label(attachment.getFileName());
133 label.setSclass(
"attachment");
134 label.setStyle(
"cursor:pointer");
135 label.addEventListener(Events.ON_CLICK,
new EventListener() {
138 public void onEvent(Event event)
throws Exception {
139 doDownload(attachment);
142 vbox.appendChild(label);
144 LabelExtended lext =
new LabelExtended();
145 lext.setWordWrap(80);
147 lext.setValue(attachment.getComment());
148 vbox.appendChild(lext);
The documentation for this class was generated from the following file: