BrightSide Workbench Full Report + Source Code
org.turro.crm.zul.sale.ActionTypeBox Class Reference
Inheritance diagram for org.turro.crm.zul.sale.ActionTypeBox:
Collaboration diagram for org.turro.crm.zul.sale.ActionTypeBox:

Public Member Functions

void setTypes (HashSet< String > types)
 
Collection< String > getTypes ()
 
- Public Member Functions inherited from org.turro.zkoss.input.MultiLabelBox< E >
 MultiLabelBox ()
 
getEntity ()
 
void setEntity (E entity)
 
boolean isReadOnly ()
 
void setReadOnly (boolean readOnly)
 
void afterCompose ()
 
void onEvent (Event event) throws Exception
 

Protected Member Functions

boolean checkVisible ()
 
boolean checkNew ()
 
boolean checkEditable ()
 
boolean checkDelete ()
 
String getNewImage ()
 
Collection< String > getCollection ()
 
String convertToString (String label)
 
Collection< String > getLabelChoices ()
 
void addChoice (String choice, Command command)
 
void changeChoice (final String oldChoice, String choice, final Command command)
 
void deleteChoice (String oldChoice, Command command)
 
- Protected Member Functions inherited from org.turro.zkoss.input.MultiLabelBox< E >
abstract String convertToString (E label)
 

Detailed Description

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

Definition at line 36 of file ActionTypeBox.java.

Member Function Documentation

◆ addChoice()

void org.turro.crm.zul.sale.ActionTypeBox.addChoice ( String  choice,
Command  command 
)
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 89 of file ActionTypeBox.java.

89  {
90  if(types == null) {
91  types = new HashSet<>();
92  }
93  if(types.add(choice)) {
94  if(command != null) try {
95  command.execute(null);
96  } catch (Exception ex) {
97  Logger.getLogger(ActionTypeBox.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
98  }
99  }
100  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeChoice()

void org.turro.crm.zul.sale.ActionTypeBox.changeChoice ( final String  oldChoice,
String  choice,
final Command  command 
)
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 103 of file ActionTypeBox.java.

103  {
104  addChoice(choice, new Command() {
105  @Override
106  public Object execute(Context context) {
107  deleteChoice(oldChoice, new Command() {
108  @Override
109  public Object execute(Context context) {
110  if(command != null) try {
111  command.execute(null);
112  } catch (Exception ex) {
113  Logger.getLogger(ActionTypeBox.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
114  }
115  return true;
116  }
117  });
118  return true;
119  }
120  });
121  }
void addChoice(String choice, Command command)
void deleteChoice(String oldChoice, Command command)
Here is the call graph for this function:

◆ checkDelete()

boolean org.turro.crm.zul.sale.ActionTypeBox.checkDelete ( )
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 64 of file ActionTypeBox.java.

64  {
65  return true;
66  }

◆ checkEditable()

boolean org.turro.crm.zul.sale.ActionTypeBox.checkEditable ( )
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 59 of file ActionTypeBox.java.

59  {
60  return true;
61  }

◆ checkNew()

boolean org.turro.crm.zul.sale.ActionTypeBox.checkNew ( )
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 54 of file ActionTypeBox.java.

54  {
55  return true;
56  }

◆ checkVisible()

boolean org.turro.crm.zul.sale.ActionTypeBox.checkVisible ( )
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 49 of file ActionTypeBox.java.

49  {
50  return true;
51  }

◆ convertToString()

String org.turro.crm.zul.sale.ActionTypeBox.convertToString ( String  label)
protected

Definition at line 79 of file ActionTypeBox.java.

79  {
80  return label;
81  }

◆ deleteChoice()

void org.turro.crm.zul.sale.ActionTypeBox.deleteChoice ( String  oldChoice,
Command  command 
)
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 124 of file ActionTypeBox.java.

124  {
125  if(types.remove(oldChoice)) {
126  if(command != null) try {
127  command.execute(null);
128  } catch (Exception ex) {
129  Logger.getLogger(ActionTypeBox.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
130  }
131  }
132  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCollection()

Collection<String> org.turro.crm.zul.sale.ActionTypeBox.getCollection ( )
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 74 of file ActionTypeBox.java.

74  {
75  return types;
76  }
Here is the caller graph for this function:

◆ getLabelChoices()

Collection<String> org.turro.crm.zul.sale.ActionTypeBox.getLabelChoices ( )
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 84 of file ActionTypeBox.java.

84  {
85  return new CrmPU().getResultList("select distinct sat from SaleAction sa join sa.actionType sat");
86  }

◆ getNewImage()

String org.turro.crm.zul.sale.ActionTypeBox.getNewImage ( )
protected

Reimplemented from org.turro.zkoss.input.MultiLabelBox< E >.

Definition at line 69 of file ActionTypeBox.java.

69  {
70  return Images.getImage("list-add");
71  }
Here is the call graph for this function:

◆ getTypes()

Collection<String> org.turro.crm.zul.sale.ActionTypeBox.getTypes ( )

Definition at line 44 of file ActionTypeBox.java.

44  {
45  return types;
46  }
Here is the caller graph for this function:

◆ setTypes()

void org.turro.crm.zul.sale.ActionTypeBox.setTypes ( HashSet< String >  types)

Definition at line 40 of file ActionTypeBox.java.

40  {
41  this.types = types;
42  }

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