BrightSide Workbench Full Report + Source Code
org.turro.zkoss.input.MonthListbox Class Reference
Inheritance diagram for org.turro.zkoss.input.MonthListbox:
Collaboration diagram for org.turro.zkoss.input.MonthListbox:

Public Member Functions

 MonthListbox ()
 
void selectItemByText (String value)
 
String getStringValues ()
 
- Public Member Functions inherited from org.turro.zkoss.input.CollectionListbox< Integer >
 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)
 

Static Public Member Functions

static String getStringValues (Collection< Integer > values)
 

Protected Member Functions

String convertToString (Integer v)
 
- Protected Member Functions inherited from org.turro.zkoss.input.CollectionListbox< Integer >
void populateList ()
 
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< Integer >
static final String ITEM_SEPARATOR
 

Detailed Description

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

Definition at line 33 of file MonthListbox.java.

Constructor & Destructor Documentation

◆ MonthListbox()

org.turro.zkoss.input.MonthListbox.MonthListbox ( )

Definition at line 37 of file MonthListbox.java.

37  {
38  TreeSet<Integer> months = new TreeSet<Integer>();
39  for(int d = 1; d <= 12; d++) {
40  months.add(d);
41  }
42  setCollection(months);
43  setMultiple(true);
44  setCheckmark(true);
45  setSelectFirst(false);
46  }
Here is the call graph for this function:

Member Function Documentation

◆ convertToString()

String org.turro.zkoss.input.MonthListbox.convertToString ( Integer  v)
protected

Definition at line 49 of file MonthListbox.java.

49  {
50  return Strings.capitalize(dfs.getMonths()[v - 1]);
51  }

◆ getStringValues() [1/2]

String org.turro.zkoss.input.MonthListbox.getStringValues ( )

Definition at line 62 of file MonthListbox.java.

62  {
63  return getStringValues(getObjectValues());
64  }
Here is the caller graph for this function:

◆ getStringValues() [2/2]

static String org.turro.zkoss.input.MonthListbox.getStringValues ( Collection< Integer >  values)
static

Definition at line 66 of file MonthListbox.java.

66  {
67  PhraseBuilder pb = new PhraseBuilder();
68  for(Integer i : values) {
69  pb.addWord(i.toString());
70  pb.addPendingSeparator(", ");
71  }
72  return pb.toString();
73  }

◆ selectItemByText()

void org.turro.zkoss.input.MonthListbox.selectItemByText ( String  value)

Definition at line 53 of file MonthListbox.java.

53  {
54  String[] va = value == null ? null : value.split(",");
55  ArrayList<Integer> ali = new ArrayList<Integer>();
56  for(String v : va) {
57  ali.add(Integer.valueOf(v.trim()));
58  }
59  setObjectValues(ali);
60  }
Here is the caller graph for this function:

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