BrightSide Workbench Full Report + Source Code
org.turro.entities.EntityCombobox Class Reference
Inheritance diagram for org.turro.entities.EntityCombobox:
Collaboration diagram for org.turro.entities.EntityCombobox:

Public Member Functions

void setRoot (String root)
 
void setParameters (KeyValueMap kvm)
 
void setParameters (String values)
 
void populateList (String value, LinkedList list, int nRows)
 
String getTextFromObject (Object value)
 
void render (Comboitem item, Object data, int index) throws Exception
 
String getEntityPath ()
 
void setEntityPath (String entityPath)
 
IElephantEntity getController ()
 
void setController (IElephantEntity entity)
 
Object getEntity ()
 
void setEntity (Object entity)
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericCombobox< V >
 GenericCombobox ()
 
getObjectValue ()
 
void setObjectValue (V value)
 
boolean isAllowNotInModelValues ()
 
void setAllowNotInModelValues (boolean allowNotInModelValues)
 
void refreshModel ()
 
abstract String getTextFromObject (V value)
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 

Detailed Description

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

Definition at line 35 of file EntityCombobox.java.

Member Function Documentation

◆ getController()

IElephantEntity org.turro.entities.EntityCombobox.getController ( )

Definition at line 89 of file EntityCombobox.java.

89  {
90  return Entities.getController(getObjectValue());
91  }
Here is the call graph for this function:

◆ getEntity()

Object org.turro.entities.EntityCombobox.getEntity ( )

Definition at line 99 of file EntityCombobox.java.

99  {
100  return getObjectValue();
101  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntityPath()

String org.turro.entities.EntityCombobox.getEntityPath ( )

Definition at line 77 of file EntityCombobox.java.

77  {
78  IElephantEntity ee = Entities.getController(getObjectValue());
79  return ee != null ? ee.getPath() : null;
80  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTextFromObject()

String org.turro.entities.EntityCombobox.getTextFromObject ( Object  value)

Definition at line 66 of file EntityCombobox.java.

66  {
67  return Entities.getController(value).getName();
68  }
Here is the call graph for this function:

◆ populateList()

void org.turro.entities.EntityCombobox.populateList ( String  value,
LinkedList  list,
int  nRows 
)

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

Definition at line 57 of file EntityCombobox.java.

57  {
58  if(!Strings.isBlank(root)) {
59  list.addAll(Entities.getEntities(root, value, nRows, kvm));
60  } else {
61  list.addAll(Entities.getEntities(value, nRows, kvm));
62  }
63  }
Here is the call graph for this function:

◆ render()

void org.turro.entities.EntityCombobox.render ( Comboitem  item,
Object  data,
int  index 
) throws Exception

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

Definition at line 71 of file EntityCombobox.java.

71  {
72  super.render(item, data, index);
73  String img = Entities.getController(data).getImage();
74  if(!Strings.isBlank(img)) item.setImage(img);
75  }
Here is the call graph for this function:

◆ setController()

void org.turro.entities.EntityCombobox.setController ( IElephantEntity  entity)

Definition at line 93 of file EntityCombobox.java.

93  {
94  if(entity != null) {
95  setObjectValue(entity.getEntity());
96  }
97  }
Here is the call graph for this function:

◆ setEntity()

void org.turro.entities.EntityCombobox.setEntity ( Object  entity)

Definition at line 103 of file EntityCombobox.java.

103  {
104  setObjectValue(entity);
105  }
Here is the call graph for this function:

◆ setEntityPath()

void org.turro.entities.EntityCombobox.setEntityPath ( String  entityPath)

Definition at line 82 of file EntityCombobox.java.

82  {
83  IElephantEntity ee = Entities.getController(entityPath);
84  if(ee != null) {
85  setObjectValue(ee.getEntity());
86  }
87  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setParameters() [1/2]

void org.turro.entities.EntityCombobox.setParameters ( KeyValueMap  kvm)

Definition at line 44 of file EntityCombobox.java.

44  {
45  this.kvm = kvm;
46  }
Here is the caller graph for this function:

◆ setParameters() [2/2]

void org.turro.entities.EntityCombobox.setParameters ( String  values)

Definition at line 48 of file EntityCombobox.java.

48  {
49  try {
50  this.kvm = new KeyValueMap(values);
51  } catch (ParserException ex) {
52  Logger.getLogger(EntityCombobox.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
53  }
54  }

◆ setRoot()

void org.turro.entities.EntityCombobox.setRoot ( String  root)

Definition at line 40 of file EntityCombobox.java.

40  {
41  this.root = root;
42  }
Here is the caller graph for this function:

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