Class CompoundGanttChartPrinter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<GanttChart> ganttCharts  
      private java.lang.String jobName  
    • 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

      All Methods Instance Methods Concrete Methods 
      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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • jobName

        private java.lang.String jobName
      • ganttCharts

        private final java.util.List<GanttChart> ganttCharts
    • Constructor Detail

      • 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 Detail

      • 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 class GanttChartPrinter
      • 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 class GanttChartPrinter
        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

        public void addGanttChart​(GanttChart ganttChart)
        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

        public 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.
        Parameters:
        index - The index at which the given GanttChart should be added.
        ganttChart - The GanttChart to add to the charts to be printed.
      • removeGanttChart

        public void removeGanttChart​(GanttChart ganttChart)
        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.