When I zoom in or zoom out the bar length of the Event varies. In Zoom out its
even go before the earlier event. In this code three events are considered they
are connected and should be done after each other. I have attached some
screenshots as well . Reply if any one knows how to fix it.
package sampletask.parts;
import java.util.*;
import javax.annotation.PostConstruct;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.nebula.widgets.ganttchart.AbstractSettings;
import org.eclipse.nebula.widgets.ganttchart.GanttChart;
import org.eclipse.nebula.widgets.ganttchart.GanttEvent;
public class SamplePart {
@PostConstruct
public void createComposite(Composite parent) {
//GanttChart _ganttchart = new GanttChart(parent, SWT.NONE, new
GanttChartSettings());
GanttChart _ganttchart = new GanttChart(parent, SWT.NONE, new AbstractSettings() {
@Override
public boolean drawEventsDownToTheHourAndMinute() {
return true;
}
@Override
public boolean showNumberOfDaysOnBars() {
return true;
}
});
Calendar sdEventOne = Calendar.getInstance();
Calendar edEventOne = Calendar.getInstance();
Calendar sdEventTwo = Calendar.getInstance();
Calendar edEventTwo = Calendar.getInstance();
Calendar sdEventThree = Calendar.getInstance();
Calendar edEventThree = Calendar.getInstance();
sdEventOne.set(2014, 2, 12, 04, 30, 30); // Start Date & Time
of Event One
edEventOne.set(2014, 2, 15, 12, 30, 30);// End Date & Time of
Event One
sdEventTwo.set(2014, 2, 15, 14, 30, 30); // Start Date & Time
of Event Two
edEventTwo.set(2014, 2, 17, 17, 30, 30); // End Date & Time of
Event Three
sdEventThree.set(2014, 2, 18, 04, 30, 30); // Start Date & Time
of Event Three
edEventThree.set(2014, 2, 20, 17, 30, 30);// End Date & Time of
Event Three
GanttEvent eventOne = new GanttEvent(_ganttchart, "Event One", sdEventOne, edEventOne, 100);
GanttEvent eventTwo = new GanttEvent(_ganttchart, "Event Two",
sdEventTwo, edEventTwo,50);
GanttEvent eventThree = new GanttEvent(_ganttchart, "Event
Three", sdEventThree, edEventThree,50);
_ganttchart.addConnection(eventOne, eventTwo);
_ganttchart.addConnection(eventTwo, eventThree);
}
@Focus
public void setFocus() {
// tableViewer.getTable().setFocus();
}
}
To participate in the discussion, go here:
http://www.eclipse.org/forums/index.php?t=rview&frm_id=64
_______________________________________________
nebula-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/nebula-dev