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

Public Member Functions

 IssueParticipantGrid ()
 
 IssueParticipantGrid (Issue issue)
 
Changes getChanges ()
 
void setChanges (Changes changes)
 
void setIssue (Issue issue)
 
- Public Member Functions inherited from org.turro.zkoss.grid.CollectionGrid< V >
 CollectionGrid ()
 
 CollectionGrid (Collection< V > collection)
 
Collection< V > getCollection ()
 
void setCollection (Collection< V > collection)
 
void updateCollection (Collection< V > collection)
 
Row getDependingRow ()
 
void setDependingRow (Row dependingRow)
 
void clearTable ()
 
void deleteSelectedRow (Row row)
 
void afterCompose ()
 
- Public Member Functions inherited from org.turro.zkoss.grid.EditableGrid< V >
 EditableGrid ()
 
boolean isAllowDeletions ()
 
void setAllowDeletions (boolean allowDeletions)
 
boolean isAllowInsertions ()
 
void setAllowInsertions (boolean allowInsertions)
 
EditableCell getCurrentCell ()
 
Row getLastRow ()
 
boolean isReadOnly ()
 
void setReadOnly (boolean readOnly)
 
boolean isSelectInput ()
 
void setSelectInput (boolean selectInput)
 
boolean isShowZeros ()
 
void setShowZeros (boolean showZeros)
 
void clearFoot ()
 
void clearRows ()
 
void clearValidRows ()
 
void clearColumns ()
 
List< V > getValues ()
 
List< V > getAllValues ()
 
EventListener getEditListener ()
 
EventListener getNextListener ()
 
EventListener getKeyListener ()
 
EventListener getBlurListener ()
 
EventListener getCancelListener ()
 
void processEdition (EditableCell editableCell)
 
void cancelEdition ()
 
HtmlBasedComponent getEditor (EditableCell editableCell)
 
Row appendValue ()
 
Row addNewRow ()
 
void insertInSelectedRow (Row row)
 
Column getEditableColumn (int cellIndex)
 
void updateRow (Row row)
 
void updateRows ()
 
EditableColumn addColumn (String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
 
EditableColumn addColumn (String label, String javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly) throws ClassNotFoundException
 
EditableColumn addColumn (String image, String tooltip, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
 
EditableColumn addColumn (String image, String tooltip, String javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly) throws ClassNotFoundException
 
- Public Member Functions inherited from org.turro.zkoss.grid.PagingGrid
void setColumns (int columns)
 
void setColumns (String hflexs)
 
void refine ()
 
boolean isDefaultBehavior ()
 
void setDefaultBehavior (boolean defaultBehavior)
 
String getRefineValue ()
 
void setRefineValue (String value)
 
int getMaxResults ()
 
void setMaxResults (int maxResults)
 
String getPagingMold ()
 
void setPagingMold (String pagingMold)
 
int getRowCount ()
 
void setRowCount (int rows)
 
void setHeadersVisible (boolean value)
 
boolean isHeadersVisible ()
 
String getVarColumns ()
 
void setVarColumns (String varColumns)
 
Collection< String > getVarColumnsList (String defaultCols)
 
void addDetailColumn ()
 
void addDetailColumn (HtmlBasedComponent caption)
 
void openDetails ()
 
boolean isEmpty ()
 
void clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Protected Member Functions

boolean isValid (IssueParticipant v)
 
void initiateRow (Row row, IssueParticipant value)
 
boolean deleteRow (Row row)
 
void rowChanged (Row row)
 
HtmlBasedComponent createEditor (EditableCell editableCell)
 
String formatCell (EditableCell editableCell, Object value)
 
Object getEditorValue (EditableCell editableCell)
 
- Protected Member Functions inherited from org.turro.zkoss.grid.CollectionGrid< V >
void cellChanged (EditableCell editableCell, Object value)
 
boolean filterValue (V v)
 
- Protected Member Functions inherited from org.turro.zkoss.grid.EditableGrid< V >
Object getCellValue (EditableCell editableCell)
 
void setCellValue (EditableCell editableCell, Object value)
 
HtmlBasedComponent createRenderer (EditableCell editableCell)
 
boolean isCellValid (EditableCell editableCell, Object value)
 
boolean canDeleteRow (Row row)
 
boolean canEditRow (Row row)
 
abstract void initiateRow (Row row, V value)
 
abstract boolean isValid (V v)
 

Additional Inherited Members

- Public Attributes inherited from org.turro.zkoss.grid.EditableGrid< V >
EditEventListener editListener
 
NextEventListener nextListener
 
KeyEventListener keyListener
 
CancelEventListener cancelListener
 
BlurEventListener blurListener
 
boolean allowInsertions
 
- Protected Attributes inherited from org.turro.zkoss.grid.CollectionGrid< V >
Row dependingRow
 
- Protected Attributes inherited from org.turro.zkoss.grid.EditableGrid< V >
EditableCell currentCell
 
String ctrlKeys
 
Row lastRow
 

Detailed Description

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

Definition at line 44 of file IssueParticipantGrid.java.

Constructor & Destructor Documentation

◆ IssueParticipantGrid() [1/2]

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

Definition at line 49 of file IssueParticipantGrid.java.

49  {
50  super();
51  setSizedByContent(true);
52  }

◆ IssueParticipantGrid() [2/2]

org.turro.dossier.zul.issue.IssueParticipantGrid.IssueParticipantGrid ( Issue  issue)

Definition at line 54 of file IssueParticipantGrid.java.

54  {
55  super(issue.getParticipants());
56  setSizedByContent(true);
57  this.issue = issue;
58  addColumns();
59  }
Set< IssueParticipant > getParticipants()
Definition: Issue.java:114
Here is the call graph for this function:

Member Function Documentation

◆ createEditor()

HtmlBasedComponent org.turro.dossier.zul.issue.IssueParticipantGrid.createEditor ( EditableCell  editableCell)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 135 of file IssueParticipantGrid.java.

135  {
136  if(editableCell.getCellIndex() == 0) {
137  Object value = getCellValue(editableCell);
138  ContactCombobox cdc = new ContactCombobox();
139  cdc.setRole("issue:list");
140  if(value != null) cdc.setIdContact((String) value);
141  return cdc;
142  } else if(editableCell.getCellIndex() == 1) {
143  Object value = getCellValue(editableCell);
144  IssueParticipantRoleListbox cdc = new IssueParticipantRoleListbox();
145  cdc.setMold("select");
146  cdc.setObjectValue((IssueParticipantRole) value);
147  return cdc;
148  }
149  return super.createEditor(editableCell);
150  }
Object getCellValue(EditableCell editableCell)
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.dossier.zul.issue.IssueParticipantGrid.deleteRow ( Row  row)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 109 of file IssueParticipantGrid.java.

109  {
110  if(changes != null) {
111  IssueParticipant ip = (IssueParticipant) row.getValue();
112  ChangeCategory cc = new ChangeCategory(4, I_.get("Participants"));
113  changes.addChange(new UniqueString(cc, I_.byKey(ip.getRole().toString()), "-" + ip.getName(), true));
114  }
115  issue.getParticipants().remove((IssueParticipant) row.getValue());
116  return true;
117  }
Here is the call graph for this function:

◆ formatCell()

String org.turro.dossier.zul.issue.IssueParticipantGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 153 of file IssueParticipantGrid.java.

153  {
154  if(editableCell.getCellIndex() == 0) {
155  IContact ci = Contacts.getContactById((String) value);
156  if(ci.isValid()) {
157  return ci.getName();
158  }
159  return "";
160  } else if(editableCell.getCellIndex() == 1) {
161  if(value instanceof IssueParticipantRole) {
162  return I_.byKey(((IssueParticipantRole) value).toString());
163  }
164  return "";
165  }
166  return super.formatCell(editableCell, value);
167  }
Here is the call graph for this function:

◆ getChanges()

Changes org.turro.dossier.zul.issue.IssueParticipantGrid.getChanges ( )

Definition at line 61 of file IssueParticipantGrid.java.

61  {
62  return changes;
63  }

◆ getEditorValue()

Object org.turro.dossier.zul.issue.IssueParticipantGrid.getEditorValue ( EditableCell  editableCell)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 170 of file IssueParticipantGrid.java.

170  {
171  if(editableCell.getCellIndex() == 0) {
172  HtmlBasedComponent hbc = (HtmlBasedComponent) editableCell.getEditor();
173  if(hbc instanceof ContactCombobox) {
174  Contact c = ((ContactCombobox) hbc).getContact();
175  if(c != null) {
176  ((IssueParticipant) editableCell.getRow().getValue()).setName(c.getName());
177  return c.getId();
178  }
179  }
180  if(editableCell.getEditor() instanceof ContactCombobox) {
181  return ((ContactCombobox) editableCell.getEditor()).getIdContact();
182  }
183  return null;
184  }
185  return super.getEditorValue(editableCell);
186  }
Here is the call graph for this function:

◆ initiateRow()

void org.turro.dossier.zul.issue.IssueParticipantGrid.initiateRow ( Row  row,
IssueParticipant  value 
)
protected

Definition at line 91 of file IssueParticipantGrid.java.

91  {
92  if(value == null) {
93  IssueWrapper iw = new IssueWrapper(issue);
94  value = new IssueParticipant();
95  value.setIssue(issue);
96  if(!iw.hasReporter()) {
97  value.setRole(IssueParticipantRole.ISSUE_REPORTER);
98  } else if(!iw.hasResponsible()) {
99  value.setRole(IssueParticipantRole.ISSUE_RESPONSIBLE);
100  } else {
101  value.setRole(IssueParticipantRole.ISSUE_ASSISTANT);
102  }
103  issue.getParticipants().add(value);
104  }
105  row.setValue(value);
106  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.dossier.zul.issue.IssueParticipantGrid.isValid ( IssueParticipant  v)
protected

Definition at line 86 of file IssueParticipantGrid.java.

86  {
87  return !Strings.isBlank(v.getIdContact());
88  }
Here is the call graph for this function:

◆ rowChanged()

void org.turro.dossier.zul.issue.IssueParticipantGrid.rowChanged ( Row  row)
protected

Reimplemented from org.turro.zkoss.grid.CollectionGrid< V >.

Definition at line 120 of file IssueParticipantGrid.java.

120  {
121  super.rowChanged(row);
122  if(changes != null) {
123  IssueParticipant ip = (IssueParticipant) row.getValue();
124  if(ip != null) {
125  IContact c = ip.getIContact();
126  if(c.isValid()) {
127  ChangeCategory cc = new ChangeCategory(4, I_.get("Participants"));
128  changes.addChange(new UniqueString(cc, I_.byKey(ip.getRole().toString()), c.getName(), true));
129  }
130  }
131  }
132  }
Here is the call graph for this function:

◆ setChanges()

void org.turro.dossier.zul.issue.IssueParticipantGrid.setChanges ( Changes  changes)

Definition at line 65 of file IssueParticipantGrid.java.

65  {
66  this.changes = changes;
67  }

◆ setIssue()

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

Definition at line 69 of file IssueParticipantGrid.java.

69  {
70  this.issue = issue;
71  if(getCollection() == null || getCollection().isEmpty()) {
72  IssueWrapper wrapper = new IssueWrapper(issue);
73  if(!wrapper.hasReporter()) {
74  IssueParticipant ip = issue.addReporter(Authentication.getIContact());
75  if(changes != null) {
76  ChangeCategory cc = new ChangeCategory(4, I_.get("Participants"));
77  changes.addChange(new UniqueString(cc, I_.byKey(ip.getRole().toString()), ip.getName(), true));
78  }
79  }
81  addColumns();
82  }
83  }
IssueParticipant addReporter(Object contact)
Definition: Issue.java:397
void setCollection(Collection< V > collection)
Here is the call graph for this function:

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