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

Public Member Functions

 WorksheetGrid ()
 
boolean isNeedSave ()
 
void setNeedSave (boolean needSave)
 
ListModelList< WorksheetgetWorksheetModel ()
 
void setValues (IContact contact)
 
void addValue (IContact contact, IssueWrapper iw)
 
Collection< IssueWrappergetNotInGrid (IContact contact)
 
- 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 clearColumns ()
 
void clearRows ()
 
void clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Detailed Description

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

Definition at line 58 of file WorksheetGrid.java.

Constructor & Destructor Documentation

◆ WorksheetGrid()

org.turro.dossier.zul.worksheet.WorksheetGrid.WorksheetGrid ( )

Definition at line 64 of file WorksheetGrid.java.

64  {
65  app = Application.getApplication();
66  addColumns();
67  }
Here is the call graph for this function:

Member Function Documentation

◆ addValue()

void org.turro.dossier.zul.worksheet.WorksheetGrid.addValue ( IContact  contact,
IssueWrapper  iw 
)

Definition at line 108 of file WorksheetGrid.java.

108  {
109  if(contact.isValid()) {
110  ListModelList list = getWorksheetModel();
111  if(iw.getRelevanceOrderByContact() == 1) {
112  Worksheet ws = new Worksheet();
113  ws.setIdContact(contact.getId());
114  ws.setIssue(iw.getIssue());
115  ws.setSheetOrder(list.getSize());
116  list.add(ws);
117  }
118  needSave = true;
119  }
120  }
ListModelList< Worksheet > getWorksheetModel()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNotInGrid()

Collection<IssueWrapper> org.turro.dossier.zul.worksheet.WorksheetGrid.getNotInGrid ( IContact  contact)

Definition at line 122 of file WorksheetGrid.java.

122  {
123  ArrayList<IssueWrapper> list = new ArrayList<>();
124  if(contact.isValid()) {
125  IssueResults results = new IssueResults();
126  results.setByParticipant(contact);
127  results.setDossierId(0L);
128  for(IssueWrapper iw : results.getIssueList()) {
129  if(iw.getRelevanceOrderByContact() == 1) {
130  boolean exists = false;
131  for(Worksheet worksheet : getWorksheetModel()) {
132  if(Objects.equals(worksheet.getIssue().getId(), iw.getIssue().getId())) {
133  exists = true;
134  break;
135  }
136  }
137  if(!exists) {
138  list.add(iw);
139  }
140  }
141  }
142  }
143  return list;
144  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWorksheetModel()

ListModelList<Worksheet> org.turro.dossier.zul.worksheet.WorksheetGrid.getWorksheetModel ( )

Definition at line 77 of file WorksheetGrid.java.

77  {
78  return worksheetModel;
79  }
Here is the caller graph for this function:

◆ isNeedSave()

boolean org.turro.dossier.zul.worksheet.WorksheetGrid.isNeedSave ( )

Definition at line 69 of file WorksheetGrid.java.

69  {
70  return needSave;
71  }
Here is the caller graph for this function:

◆ setNeedSave()

void org.turro.dossier.zul.worksheet.WorksheetGrid.setNeedSave ( boolean  needSave)

Definition at line 73 of file WorksheetGrid.java.

73  {
74  this.needSave = needSave;
75  }

◆ setValues()

void org.turro.dossier.zul.worksheet.WorksheetGrid.setValues ( IContact  contact)

Definition at line 81 of file WorksheetGrid.java.

81  {
82  needSave = false;
83  if(contact.isValid()) {
84  List<Worksheet> list = (List<Worksheet>) WorksheetUtil.getWorksheet(contact.getId());
85  WorksheetUtil.clearDone(list, contact);
86  if(list.isEmpty()) {
87  IssueResults results = new IssueResults();
88  results.setByParticipant(contact);
89  results.setDossierId(0L);
90  int order = 0;
91  for(IssueWrapper iw : results.getIssueList()) {
92  if(iw.getRelevanceOrderByContact() == 1) {
93  Worksheet ws = new Worksheet();
94  ws.setIdContact(contact.getId());
95  ws.setIssue(iw.getIssue());
96  ws.setSheetOrder(order++);
97  list.add(ws);
98  }
99  }
100  needSave = true;
101  }
102  addRows(list);
103  } else {
104  addRows(new ArrayList<Worksheet>());
105  }
106  }
Here is the call graph for this function:

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