18 package org.turro.erp.workorder;
20 import org.turro.erp.entity.*;
21 import org.turro.zkoss.svg.Gantt;
22 import org.turro.zkoss.svg.GanttData;
23 import org.turro.zkoss.svg.GanttItem;
24 import org.turro.zkoss.svg.GanttPredecessor;
25 import org.zkoss.zk.ui.ext.AfterCompose;
33 private String selectItem;
35 private double scale = 1.0;
45 this.selectItem = selectItem;
53 this.workOrder = workOrder;
77 getChildren().clear();
84 private void loadData() {
88 private GanttData getGanttData() {
89 GanttData gd =
new GanttData();
91 if(or.isEmpty())
continue;
92 GanttItem gir = gd.addGanttItem(or.getOrderRef(),
null, or.getSomeDescription(), 0, 0);
93 gir.setMilestone(
false);
94 gir.setFinished(
false);
95 for(
Task t : or.getUpdatedTasks()) {
96 GanttItem gi = gd.addGanttItem(or.getOrderRef(),
"" + t.getId(), t.getName(), t.getEstimatedDuration(), t.getRealDuration());
97 gi.setMilestone(t.isMilestone());
100 GanttPredecessor gp =
new GanttPredecessor(
102 GanttPredecessor.GANTT_START_TO_START :
103 GanttPredecessor.GANTT_END_TO_START,
104 "" + p.getPredecessor().getId(),
106 gi.getPredecessors().add(gp);
Set< OrderReference > getOrderReferences()
void setSelectItem(String selectItem)
void setScale(double scale)
void setWorkOrder(WorkOrder workOrder)
void setData(GanttData data)
void startComposing(String onUserEvent, String width, String height, double scale)
void generateContent(Map args)