BrightSide Workbench Full Report + Source Code
org.turro.erp.task.usage.UsageTree Class Reference
Inheritance diagram for org.turro.erp.task.usage.UsageTree:
Collaboration diagram for org.turro.erp.task.usage.UsageTree:

Public Member Functions

 UsageTree ()
 
void setOnlyUsages (boolean onlyUsages)
 
void addHumanUsage ()
 
void addProductUsage ()
 
RequiredUsage getRequiredUsage ()
 
void setRequiredUsage (RequiredUsage requiredUsage)
 
Task getTask ()
 
void setTask (Task task)
 
- Public Member Functions inherited from org.turro.zkoss.layout.GridLayout
 GridLayout ()
 
 GridLayout (int columns)
 
 GridLayout (String hflexs)
 
void setColumns (int columns)
 
void setColumns (String hflexs)
 
void setColCaptions (String captions)
 
void setColCaptions (String[] captions)
 
void clearRows ()
 
GridLayout addGroup (String title, boolean open)
 
GridLayout addRow ()
 
GridLayout insertBeforeRow (Row row)
 
GridLayout addCaption (String label)
 
GridLayout addValue (String value)
 
GridLayout addBoldValue (String value)
 
GridLayout addComponent (HtmlBasedComponent comp)
 
GridLayout addSpannedComponent (HtmlBasedComponent comp, int cols)
 
GridLayout addRowSpannedComponent (HtmlBasedComponent comp, int rows)
 
GridLayout addSpace ()
 
Row getCurrentRow ()
 
Rows getRows (boolean create)
 
Object getData ()
 
void setData (Object data)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.zkoss.layout.GridLayout
Row currentRow
 

Detailed Description

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

Definition at line 38 of file UsageTree.java.

Constructor & Destructor Documentation

◆ UsageTree()

org.turro.erp.task.usage.UsageTree.UsageTree ( )

Definition at line 44 of file UsageTree.java.

44  {
45  addEventListener(Events.ON_CHANGE, new EventListener() {
46  @Override
47  public void onEvent(Event event) throws Exception {
48  addComponents();
49  }
50  });
51  }

Member Function Documentation

◆ addHumanUsage()

void org.turro.erp.task.usage.UsageTree.addHumanUsage ( )

Definition at line 57 of file UsageTree.java.

57  {
58  final RequiredUsage ru = new RequiredUsage();
59  ru.setTask(task);
60  ru.prepareHumanResource();
61  UsageBox.doEdit(ru, new Command() {
62  @Override
63  public Object execute(Context context) {
64  if(!ru.isEmpty()) {
65  task.getRequiredUsages().add(ru);
66  Events.postEvent(new Event(Events.ON_CHANGE, UsageTree.this));
67  }
68  return null;
69  }
70  });
71  }
Here is the call graph for this function:

◆ addProductUsage()

void org.turro.erp.task.usage.UsageTree.addProductUsage ( )

Definition at line 73 of file UsageTree.java.

73  {
74  final RequiredUsage ru = new RequiredUsage();
75  ru.setTask(task);
76  ru.prepareProduct();
77  UsageBox.doEdit(ru, new Command() {
78  @Override
79  public Object execute(Context context) {
80  if(!ru.isEmpty()) {
81  task.getRequiredUsages().add(ru);
82  Events.postEvent(new Event(Events.ON_CHANGE, UsageTree.this));
83  }
84  return null;
85  }
86  });
87  }
Here is the call graph for this function:

◆ getRequiredUsage()

RequiredUsage org.turro.erp.task.usage.UsageTree.getRequiredUsage ( )

Definition at line 89 of file UsageTree.java.

89  {
90  return requiredUsage;
91  }

◆ getTask()

Task org.turro.erp.task.usage.UsageTree.getTask ( )

Definition at line 100 of file UsageTree.java.

100  {
101  return task;
102  }

◆ setOnlyUsages()

void org.turro.erp.task.usage.UsageTree.setOnlyUsages ( boolean  onlyUsages)

Definition at line 53 of file UsageTree.java.

53  {
54  this.onlyUsages = onlyUsages;
55  }

◆ setRequiredUsage()

void org.turro.erp.task.usage.UsageTree.setRequiredUsage ( RequiredUsage  requiredUsage)

Definition at line 93 of file UsageTree.java.

93  {
94  this.requiredUsage = requiredUsage;
95  if(requiredUsage != null) {
96  addComponents();
97  }
98  }

◆ setTask()

void org.turro.erp.task.usage.UsageTree.setTask ( Task  task)

Definition at line 104 of file UsageTree.java.

104  {
105  this.task = task;
106  if(task != null) {
107  addComponents();
108  }
109  }
Here is the caller graph for this function:

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