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

Public Member Functions

 ParticipantGrid ()
 
void setEditable (boolean editable)
 
void setIssue (Issue issue)
 
void setAddToolbar (boolean addToolbar)
 
void addRows ()
 

Detailed Description

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

Definition at line 51 of file issue/ParticipantGrid.java.

Constructor & Destructor Documentation

◆ ParticipantGrid()

org.turro.dossier.zul.issue.ParticipantGrid.ParticipantGrid ( )

Definition at line 59 of file issue/ParticipantGrid.java.

59  {
60  addColumns();
61  rows = new Rows();
62  appendChild(rows);
63  }

Member Function Documentation

◆ addRows()

void org.turro.dossier.zul.issue.ParticipantGrid.addRows ( )

Definition at line 103 of file issue/ParticipantGrid.java.

103  {
104  if(editable) {
105  for(final IssueParticipant p : issue.getParticipants()) {
106  Row row = new Row();
107  row.setValue(p);
108  rows.appendChild(row);
109 
110  final ContactCombobox contact = new ContactCombobox();
111  contact.setRole("issue:list");
112  contact.setIContact(p.getIContact());
113  contact.addEventListener(Events.ON_CHANGE, new EventListener() {
114  @Override
115  public void onEvent(Event event) throws Exception {
116  IContact c = p.getIContact();
117  if(c.isValid()) {
118  p.setIdContact(c.getId());
119  p.setName(c.getName());
120  }
121  }
122 
123  });
124  row.appendChild(contact);
125 
126  final Listbox role = new Listbox();
127  role.setMold("select");
128  role.addEventListener(Events.ON_SELECT, new EventListener() {
129 
130  @Override
131  public void onEvent(Event event) throws Exception {
132  p.setRole((IssueParticipantRole) role.getSelectedItem().getValue());
133  }
134 
135  });
136  row.appendChild(role);
137 
138  for(IssueParticipantRole ipr : IssueParticipantRole.values()) {
139  Listitem li = new Listitem(I_.byKey(ipr.toString()));
140  li.setValue(ipr);
141  li.setSelected(li.getValue().equals(p.getRole()));
142  role.appendChild(li);
143  }
144  }
145  } else {
146  for(final Object p : issue.getFullParticipants()) {
147  Row row = new Row();
148  row.setValue(p);
149  rows.appendChild(row);
150 
151  if(p instanceof IDossierParticipant) {
152  IDossierParticipant cp = (IDossierParticipant) p;
153  if(cp.isShowAllIssues()) {
154  Hbox hbox = new Hbox();
155  row.appendChild(hbox);
156  hbox.appendChild(new Image("/_zul/images/forward.png"));
157  if(cp.isReceiveAllEmails()) {
158  hbox.appendChild(new Image("/_zul/images/mail_forward.png"));
159  }
160  hbox.appendChild(new ContactInfo((Contact) cp.getIContact().getContact()));
161  Label label = new Label(I_.byKey(cp.getRole().toString()));
162  row.appendChild(label);
163  }
164  } else if(p instanceof IssueParticipant) {
165  IssueParticipant cp = (IssueParticipant) p;
166  Hbox hbox = new Hbox();
167  row.appendChild(hbox);
168  hbox.appendChild(new Image("/_zul/images/mail_forward.png"));
169  hbox.appendChild(new ContactInfo((Contact) cp.getIContact().getContact()));
170  Label label = new Label(I_.byKey(cp.getRole().toString()));
171  row.appendChild(label);
172  }
173  }
174  }
175  }
ParticipantSet getFullParticipants()
Definition: Issue.java:461
Set< IssueParticipant > getParticipants()
Definition: Issue.java:114
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAddToolbar()

void org.turro.dossier.zul.issue.ParticipantGrid.setAddToolbar ( boolean  addToolbar)

Definition at line 81 of file issue/ParticipantGrid.java.

81  {
82  if(addToolbar) {
83  toolbar = new Toolbar();
84  getParent().appendChild(toolbar);
85  addToolbarButtons();
86  }
87  }

◆ setEditable()

void org.turro.dossier.zul.issue.ParticipantGrid.setEditable ( boolean  editable)

Definition at line 65 of file issue/ParticipantGrid.java.

65  {
66  this.editable = editable;
67  if(issue != null) {
68  setIssue(issue);
69  }
70  updateButtons();
71  }
Here is the call graph for this function:

◆ setIssue()

void org.turro.dossier.zul.issue.ParticipantGrid.setIssue ( Issue  issue)

Definition at line 73 of file issue/ParticipantGrid.java.

73  {
74  this.issue = issue;
75  rows.getChildren().clear();
76  if(issue != null) {
77  addRows();
78  }
79  }
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: