BrightSide Workbench Full Report + Source Code
org.turro.zkoss.input.GenericRadiogroup< E > Class Template Referenceabstract
Inheritance diagram for org.turro.zkoss.input.GenericRadiogroup< E >:
Collaboration diagram for org.turro.zkoss.input.GenericRadiogroup< E >:

Public Member Functions

boolean isDisabled ()
 
void setDisabled (boolean value)
 
boolean isAllowNone ()
 
void setAllowNone (boolean allowNone)
 
Collection< E > getCollection ()
 
void setCollection (Collection< E > collection)
 
getObjectValue ()
 
void setObjectValue (E v)
 
String getOrient ()
 
void setOrient (String orient)
 
void afterCompose ()
 
void onEvent (Event event) throws Exception
 

Protected Member Functions

abstract String convertToString (E v)
 

Detailed Description

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

Definition at line 39 of file GenericRadiogroup.java.

Member Function Documentation

◆ afterCompose()

void org.turro.zkoss.input.GenericRadiogroup< E >.afterCompose ( )

Definition at line 121 of file GenericRadiogroup.java.

121  {
122  if(!collection.isEmpty()) {
123  if("vertical".equals(orient)) {
124  layout = new Vlayout();
125  } else {
126  layout = new Hlayout();
127  }
128  appendChild(radioGroup);
129  appendChild(layout);
130  for(E e : collection) {
131  Radio r = new Radio(convertToString(e));
132  r.setRadiogroup(radioGroup);
133  layout.appendChild(r);
134  }
135  }
136  setObjectValue(_internal);
137  populated = true;
138  clearImage();
139  radioGroup.addEventListener(Events.ON_CHECK, this);
140  }
Here is the call graph for this function:

◆ convertToString()

abstract String org.turro.zkoss.input.GenericRadiogroup< E >.convertToString ( v)
abstractprotected
Here is the caller graph for this function:

◆ getCollection()

Collection<E> org.turro.zkoss.input.GenericRadiogroup< E >.getCollection ( )

Definition at line 72 of file GenericRadiogroup.java.

72  {
73  return collection;
74  }

◆ getObjectValue()

E org.turro.zkoss.input.GenericRadiogroup< E >.getObjectValue ( )

Definition at line 80 of file GenericRadiogroup.java.

80  {
81  if(populated) {
82  Radio r = radioGroup.getSelectedItem();
83  if(r != null) {
84  for(E e : collection) {
85  if(r.getLabel().equals(convertToString(e))) {
86  return e;
87  }
88  }
89  }
90  return null;
91  } else {
92  return _internal;
93  }
94  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOrient()

String org.turro.zkoss.input.GenericRadiogroup< E >.getOrient ( )

Definition at line 112 of file GenericRadiogroup.java.

112  {
113  return orient;
114  }

◆ isAllowNone()

boolean org.turro.zkoss.input.GenericRadiogroup< E >.isAllowNone ( )

Definition at line 63 of file GenericRadiogroup.java.

63  {
64  return allowNone;
65  }

◆ isDisabled()

boolean org.turro.zkoss.input.GenericRadiogroup< E >.isDisabled ( )

Definition at line 49 of file GenericRadiogroup.java.

49  {
50  return disabled;
51  }

◆ onEvent()

void org.turro.zkoss.input.GenericRadiogroup< E >.onEvent ( Event  event) throws Exception

Definition at line 143 of file GenericRadiogroup.java.

143  {
144  Events.postEvent(this, event);
145  }

◆ setAllowNone()

void org.turro.zkoss.input.GenericRadiogroup< E >.setAllowNone ( boolean  allowNone)

Definition at line 67 of file GenericRadiogroup.java.

67  {
68  this.allowNone = allowNone;
69  clearImage();
70  }

◆ setCollection()

void org.turro.zkoss.input.GenericRadiogroup< E >.setCollection ( Collection< E >  collection)

Definition at line 76 of file GenericRadiogroup.java.

76  {
77  this.collection = collection;
78  }
Here is the caller graph for this function:

◆ setDisabled()

void org.turro.zkoss.input.GenericRadiogroup< E >.setDisabled ( boolean  value)

Definition at line 53 of file GenericRadiogroup.java.

53  {
54  disabled = value;
55  for(Radio r : radioGroup.getItems()) {
56  r.setDisabled(value);
57  }
58  if(clear != null) {
59  clear.setDisabled(value);
60  }
61  }

◆ setObjectValue()

void org.turro.zkoss.input.GenericRadiogroup< E >.setObjectValue ( v)

Definition at line 96 of file GenericRadiogroup.java.

96  {
97  _internal = v;
98  if(populated && _internal != null) {
99  for(Component c : layout.getChildren()) {
100  if(c instanceof Radio) {
101  Radio r = (Radio) c;
102  if(r.getLabel().equals(convertToString(_internal))) {
103  r.setSelected(true);
104  return;
105  }
106  }
107  }
108  }
109  radioGroup.setSelectedItem(null);
110  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOrient()

void org.turro.zkoss.input.GenericRadiogroup< E >.setOrient ( String  orient)

Definition at line 116 of file GenericRadiogroup.java.

116  {
117  this.orient = orient;
118  }

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