Class CompoundGanttChartPrinter
java.lang.Object
org.eclipse.nebula.widgets.ganttchart.print.GanttChartPrinter
org.eclipse.nebula.widgets.ganttchart.print.CompoundGanttChartPrinter
public class CompoundGanttChartPrinter extends GanttChartPrinter
This class is used to print multiple GanttCharts at once.
- See Also:
GanttChartPrinter
-
Constructor Summary
Constructors Constructor Description CompoundGanttChartPrinter()
Creates a new CompoundGanttChartPrinter.CompoundGanttChartPrinter(java.lang.String jobName)
Creates a new CompoundGanttChartPrinter that uses the given job name as printer job name. -
Method Summary
Modifier and Type Method Description void
addGanttChart(int index, GanttChart ganttChart)
Adds the given GanttChart at the specified index to the list of GanttCharts that should be printed by this CompoundGanttChartPrinter.void
addGanttChart(GanttChart ganttChart)
Adds the given GanttChart to the list of GanttCharts that should be printed by this CompoundGanttChartPrinter.protected org.eclipse.swt.graphics.Point
getFullPageCount(org.eclipse.swt.printing.Printer printer)
Calculates the number of horizontal and vertical pages needed to print the entire chart.void
print()
First opens the PrintDialog so a user can adjust his print settings and will then print the chart based on the settings made by the user.void
removeGanttChart(GanttChart ganttChart)
Removes the given GanttChart from the list of GanttCharts that should be printed by this CompoundGanttChartPrinter.Methods inherited from class org.eclipse.nebula.widgets.ganttchart.print.GanttChartPrinter
setupPrinter
-
Constructor Details
-
CompoundGanttChartPrinter
public CompoundGanttChartPrinter()Creates a new CompoundGanttChartPrinter. Will use the print job name of the first GanttChart in the list of GanttCharts to print. -
CompoundGanttChartPrinter
public CompoundGanttChartPrinter(java.lang.String jobName)Creates a new CompoundGanttChartPrinter that uses the given job name as printer job name.- Parameters:
jobName
- The name that will be used for the print job.
-
-
Method Details
-
print
public void print()Description copied from class:GanttChartPrinter
First opens the PrintDialog so a user can adjust his print settings and will then print the chart based on the settings made by the user.- Overrides:
print
in classGanttChartPrinter
-
getFullPageCount
protected org.eclipse.swt.graphics.Point getFullPageCount(org.eclipse.swt.printing.Printer printer)Description copied from class:GanttChartPrinter
Calculates the number of horizontal and vertical pages needed to print the entire chart.- Overrides:
getFullPageCount
in classGanttChartPrinter
- Parameters:
printer
- The printer that is used to determine the page count of a full print.- Returns:
- The number of horizontal and vertical pages that will be printed.
-
addGanttChart
Adds the given GanttChart to the list of GanttCharts that should be printed by this CompoundGanttChartPrinter.- Parameters:
ganttChart
- The GanttChart to add to the charts to be printed.
-
addGanttChart
Adds the given GanttChart at the specified index to the list of GanttCharts that should be printed by this CompoundGanttChartPrinter.- Parameters:
index
- The index at which the given GanttChart should be added.ganttChart
- The GanttChart to add to the charts to be printed.
-
removeGanttChart
Removes the given GanttChart from the list of GanttCharts that should be printed by this CompoundGanttChartPrinter.- Parameters:
ganttChart
- The GanttChart to remove from the charts to be printed.
-