BrightSide Workbench Full Report + Source Code
org.turro.financials.document.DocumentListbox Class Reference
Inheritance diagram for org.turro.financials.document.DocumentListbox:
Collaboration diagram for org.turro.financials.document.DocumentListbox:

Public Member Functions

 DocumentListbox ()
 
 DocumentListbox (Collection< Document > collection)
 
boolean isShowConcepts ()
 
void setShowConcepts (boolean showConcepts)
 
boolean isShowContract ()
 
void setShowContract (boolean showContract)
 
boolean isShowStores ()
 
void setShowStores (boolean showStores)
 
boolean isShowTotalAmount ()
 
void setShowTotalAmount (boolean showTotalAmount)
 
void afterCompose ()
 
- Public Member Functions inherited from org.turro.zkoss.input.CollectionListbox< V >
 CollectionListbox ()
 
 CollectionListbox (Collection< V > collection)
 
void updateCollection ()
 
void updateCollection (Collection< V > collection)
 
boolean isAllowNull ()
 
void setAllowNull (boolean allowNull)
 
Collection< V > getCollection ()
 
void setCollection (Collection< V > collection)
 
boolean isNullAtBottom ()
 
void setNullAtBottom (boolean nullAtBottom)
 
String getNullLabel ()
 
void setNullLabel (String nullLabel)
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericListbox< V >
 GenericListbox ()
 
void setDisabled (boolean value)
 
void clearItems ()
 
void setObjectValue (V value)
 
void setObjectValues (Collection< V > collection)
 
getObjectValue ()
 
Collection< V > getObjectValues ()
 
Collection< V > getDeselectedObjectValues ()
 
boolean isSelectFirst ()
 
void setSelectFirst (boolean selectFirst)
 
Set getDeselectedItems ()
 
void sort ()
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 

Protected Member Functions

String convertToString (Document v)
 
void populateList ()
 
- Protected Member Functions inherited from org.turro.zkoss.input.CollectionListbox< V >
boolean equals (V value, V obj)
 
abstract String convertToString (V v)
 
void beforeAppend (Listitem li)
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.zkoss.input.CollectionListbox< V >
static final String ITEM_SEPARATOR = "|||"
 
- Protected Attributes inherited from org.turro.zkoss.input.GenericListbox< V >
boolean populated = false
 

Detailed Description

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

Definition at line 37 of file DocumentListbox.java.

Constructor & Destructor Documentation

◆ DocumentListbox() [1/2]

org.turro.financials.document.DocumentListbox.DocumentListbox ( )

Definition at line 45 of file DocumentListbox.java.

45  {
46  }

◆ DocumentListbox() [2/2]

org.turro.financials.document.DocumentListbox.DocumentListbox ( Collection< Document collection)

Definition at line 48 of file DocumentListbox.java.

48  {
49  super(collection);
50  }

Member Function Documentation

◆ afterCompose()

void org.turro.financials.document.DocumentListbox.afterCompose ( )

Reimplemented from org.turro.zkoss.input.GenericListbox< V >.

Definition at line 123 of file DocumentListbox.java.

123  {
124  dam = new DocumentActionMenu();
125  getParent().appendChild(dam);
126  addHeaders();
127  super.afterCompose();
128  if(showTotalAmount) {
129  addFooters();
130  }
131  }

◆ convertToString()

String org.turro.financials.document.DocumentListbox.convertToString ( Document  v)
protected

Definition at line 85 of file DocumentListbox.java.

85  {
86  if(v == null) return null;
87 
88  String storesStr = "";
89  if(showStores) {
90  HashSet<String> set = new HashSet<String>();
91  for(DocumentLine dl : v.getDocumentLines()) {
92  if(dl.getStore() != null) {
93  set.add(dl.getStore().getPartialDescription());
94  }
95  }
96  for(String s : set) {
97  storesStr += SUBITEM_SEPARATOR + s;
98  }
99  }
100 
101  String conceptsStr = "";
102  if(showConcepts) {
103  HashSet<String> set = new HashSet<String>();
104  for(DocumentLine dl : v.getDocumentLines()) {
105  if(!Strings.isBlank(dl.getConcept())) {
106  set.add(dl.getConcept());
107  }
108  }
109  for(String s : set) {
110  conceptsStr += SUBITEM_SEPARATOR + s;
111  }
112  }
113 
114  return (showContract ? v.getContract().getFullDescription() + SUBITEM_SEPARATOR : "") +
115  v.getDocumentDefinition().getName() + storesStr + conceptsStr + ITEM_SEPARATOR +
116  DateFormats.format(v.getDocumentDate(), true) + SUBITEM_SEPARATOR +
117  DateFormats.format(v.getReceiptDate(), true) + ITEM_SEPARATOR +
118  v.getDocumentNumber() + ITEM_SEPARATOR +
119  DecimalFormats.format(v.getTotalAmount());
120  }
Here is the call graph for this function:

◆ isShowConcepts()

boolean org.turro.financials.document.DocumentListbox.isShowConcepts ( )

Definition at line 52 of file DocumentListbox.java.

52  {
53  return showConcepts;
54  }

◆ isShowContract()

boolean org.turro.financials.document.DocumentListbox.isShowContract ( )

Definition at line 60 of file DocumentListbox.java.

60  {
61  return showContract;
62  }

◆ isShowStores()

boolean org.turro.financials.document.DocumentListbox.isShowStores ( )

Definition at line 68 of file DocumentListbox.java.

68  {
69  return showStores;
70  }

◆ isShowTotalAmount()

boolean org.turro.financials.document.DocumentListbox.isShowTotalAmount ( )

Definition at line 76 of file DocumentListbox.java.

76  {
77  return showTotalAmount;
78  }

◆ populateList()

void org.turro.financials.document.DocumentListbox.populateList ( )
protected

Reimplemented from org.turro.zkoss.input.CollectionListbox< V >.

Definition at line 134 of file DocumentListbox.java.

134  {
135  super.populateList();
136  for(Listitem li : (List<Listitem>) getItems()) {
137  li.setContext(dam);
138  li.setAttribute("document", li.getValue());
139  }
140  }

◆ setShowConcepts()

void org.turro.financials.document.DocumentListbox.setShowConcepts ( boolean  showConcepts)

Definition at line 56 of file DocumentListbox.java.

56  {
57  this.showConcepts = showConcepts;
58  }
Here is the caller graph for this function:

◆ setShowContract()

void org.turro.financials.document.DocumentListbox.setShowContract ( boolean  showContract)

Definition at line 64 of file DocumentListbox.java.

64  {
65  this.showContract = showContract;
66  }
Here is the caller graph for this function:

◆ setShowStores()

void org.turro.financials.document.DocumentListbox.setShowStores ( boolean  showStores)

Definition at line 72 of file DocumentListbox.java.

72  {
73  this.showStores = showStores;
74  }

◆ setShowTotalAmount()

void org.turro.financials.document.DocumentListbox.setShowTotalAmount ( boolean  showTotalAmount)

Definition at line 80 of file DocumentListbox.java.

80  {
81  this.showTotalAmount = showTotalAmount;
82  }

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