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

Public Member Functions

 GanttItem (long reference, String uniqueId, String name, double hours, double done)
 
boolean isFinished ()
 
void setFinished (boolean finished)
 
boolean isMilestone ()
 
void setMilestone (boolean milestone)
 
double getMaxHours ()
 
double getHours ()
 
double getStart ()
 
void initStart ()
 
void initReference ()
 
double getDone ()
 
String getName ()
 
int getPosition ()
 
void setPosition (int position)
 
String getUniqueId ()
 
GanttData getSet ()
 
void setSet (GanttData set)
 
Set< GanttPredecessorgetPredecessors ()
 
int compareTo (GanttItem o)
 

Detailed Description

Constructor & Destructor Documentation

◆ GanttItem()

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

Definition at line 41 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

41  {
42  this.reference = reference;
43  this.uniqueId = uniqueId;
44  this.name = name;
45  this.hours = hours;
46  this.done = done;
47  }

Member Function Documentation

◆ compareTo()

int org.turro.zkoss.svg.GanttItem.compareTo ( GanttItem  o)

Definition at line 148 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

148  {
149  int result = CompareUtil.compare(reference, o.reference);
150  if(result == 0) {
151  result = CompareUtil.compare(uniqueId, o.uniqueId);
152  }
153  return result;
154  }
Here is the caller graph for this function:

◆ getDone()

double org.turro.zkoss.svg.GanttItem.getDone ( )

Definition at line 103 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

103  {
104  return done;
105  }

◆ getHours()

double org.turro.zkoss.svg.GanttItem.getHours ( )

Definition at line 69 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

69  {
70  return hours;
71  }

◆ getMaxHours()

double org.turro.zkoss.svg.GanttItem.getMaxHours ( )

Definition at line 65 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

65  {
66  return finished ? (done == 0.0 ? Math.max(done, hours) : done) : Math.max(done, hours);
67  }
Here is the caller graph for this function:

◆ getName()

String org.turro.zkoss.svg.GanttItem.getName ( )

Definition at line 107 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

107  {
108  return name;
109  }
Here is the caller graph for this function:

◆ getPosition()

int org.turro.zkoss.svg.GanttItem.getPosition ( )

Definition at line 111 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

111  {
112  if(position == -1) {
113  Iterator<GanttItem> it = set.iterator();
114  int idx = 0;
115  while(it.hasNext()) {
116  GanttItem gi = it.next();
117  if(gi.compareTo(this) == 0) {
118  position = idx;
119  break;
120  }
121  idx++;
122  }
123  }
124  return position;
125  }
GanttItem(long reference, String uniqueId, String name, double hours, double done)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPredecessors()

Set<GanttPredecessor> org.turro.zkoss.svg.GanttItem.getPredecessors ( )

Definition at line 143 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

143  {
144  return predecessors;
145  }

◆ getSet()

GanttData org.turro.zkoss.svg.GanttItem.getSet ( )

Definition at line 135 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

135  {
136  return set;
137  }

◆ getStart()

double org.turro.zkoss.svg.GanttItem.getStart ( )

Definition at line 73 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

73  {
74  return start;
75  }
Here is the caller graph for this function:

◆ getUniqueId()

String org.turro.zkoss.svg.GanttItem.getUniqueId ( )

Definition at line 131 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

131  {
132  return uniqueId;
133  }
Here is the caller graph for this function:

◆ initReference()

void org.turro.zkoss.svg.GanttItem.initReference ( )

Definition at line 88 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

88  {
89  if(Strings.isBlank(uniqueId)) {
90  start = -1;
91  double endHours = 0.0d;
92  for(GanttItem gi : set) {
93  if(gi.reference == reference && !Strings.isBlank(gi.uniqueId)) {
94  start = (start == -1 ? gi.start : Math.min(start, gi.start));
95  endHours = Math.max(gi.start + gi.hours, endHours);
96  }
97  }
98  start = Math.max(start, 0.0d);
99  hours = endHours - start;
100  }
101  }
Here is the caller graph for this function:

◆ initStart()

void org.turro.zkoss.svg.GanttItem.initStart ( )

Definition at line 77 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

77  {
78  for(GanttPredecessor gp : predecessors) {
79  GanttItem predecessor = set.getItem(gp.getIndex());
80  if(gp.getMode() == GanttPredecessor.GANTT_START_TO_START) {
81  start = Math.max(predecessor.start + gp.getLag(), start);
82  } else if(gp.getMode() == GanttPredecessor.GANTT_END_TO_START) {
83  start = Math.max(predecessor.start + predecessor.getMaxHours() + gp.getLag(), start);
84  }
85  }
86  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isFinished()

boolean org.turro.zkoss.svg.GanttItem.isFinished ( )

Definition at line 49 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

49  {
50  return finished;
51  }

◆ isMilestone()

boolean org.turro.zkoss.svg.GanttItem.isMilestone ( )

Definition at line 57 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

57  {
58  return milestone;
59  }

◆ setFinished()

void org.turro.zkoss.svg.GanttItem.setFinished ( boolean  finished)

Definition at line 53 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

53  {
54  this.finished = finished;
55  }

◆ setMilestone()

void org.turro.zkoss.svg.GanttItem.setMilestone ( boolean  milestone)

Definition at line 61 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

61  {
62  this.milestone = milestone;
63  }

◆ setPosition()

void org.turro.zkoss.svg.GanttItem.setPosition ( int  position)

Definition at line 127 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

127  {
128  this.position = position;
129  }

◆ setSet()

void org.turro.zkoss.svg.GanttItem.setSet ( GanttData  set)

Definition at line 139 of file BrightSide/elephant-zkoss/src/main/java/org/turro/zkoss/svg/GanttItem.java.

139  {
140  this.set = set;
141  }
Here is the caller graph for this function:

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