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

Public Member Functions

GanttItem addGanttItem (long reference, String uniqueId, String name, double hours, double done)
 
int getMaxNameLenght ()
 
double getMaxHoursLenght ()
 
GanttItem getItem (String index)
 
void initData ()
 

Static Public Attributes

static final int MAX_NAME_LENGTH = 60
 

Detailed Description

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

Definition at line 27 of file GanttData.java.

Member Function Documentation

◆ addGanttItem()

GanttItem org.turro.zkoss.svg.GanttData.addGanttItem ( long  reference,
String  uniqueId,
String  name,
double  hours,
double  done 
)

Definition at line 33 of file GanttData.java.

33  {
34  GanttItem gi = new GanttItem(reference, uniqueId, name, hours, done);
35  gi.setSet(this);
36  add(gi);
37  return gi;
38  }
Here is the call graph for this function:

◆ getItem()

GanttItem org.turro.zkoss.svg.GanttData.getItem ( String  index)

Definition at line 56 of file GanttData.java.

56  {
57  for(GanttItem gi : this) {
58  if(Objects.equals(gi.getUniqueId(), index)) {
59  return gi;
60  }
61  }
62  return null;
63  }
Here is the call graph for this function:

◆ getMaxHoursLenght()

double org.turro.zkoss.svg.GanttData.getMaxHoursLenght ( )

Definition at line 48 of file GanttData.java.

48  {
49  double maxLenght = 0.0;
50  for(GanttItem gi : this) {
51  maxLenght = Math.max(gi.getStart() + gi.getMaxHours(), maxLenght);
52  }
53  return maxLenght;
54  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMaxNameLenght()

int org.turro.zkoss.svg.GanttData.getMaxNameLenght ( )

Definition at line 40 of file GanttData.java.

40  {
41  int maxLenght = 0;
42  for(GanttItem gi : this) {
43  maxLenght = Math.max(gi.getName().length(), maxLenght);
44  }
45  return Math.min(maxLenght, MAX_NAME_LENGTH);
46  }
static final int MAX_NAME_LENGTH
Definition: GanttData.java:30
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initData()

void org.turro.zkoss.svg.GanttData.initData ( )

Definition at line 65 of file GanttData.java.

65  {
66  for(GanttItem dummy : this) {
67  // does nothing but ensures multiple relations
68  for(GanttItem gi : this) {
69  gi.initStart();
70  }
71  }
72  for(GanttItem gi : this) {
73  gi.initReference();
74  }
75  }
Here is the call graph for this function:

Member Data Documentation

◆ MAX_NAME_LENGTH

final int org.turro.zkoss.svg.GanttData.MAX_NAME_LENGTH = 60
static

Definition at line 30 of file GanttData.java.


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