Class PrintViewer


  • public class PrintViewer
    extends java.lang.Object
    A JFace-style Print viewer which displays a Print in a scrollable pane.
    • Constructor Detail

      • PrintViewer

        public PrintViewer​(org.eclipse.swt.widgets.Composite parent,
                           int style)
        Constructs a PrintPreview with the given parent and style.
        Parameters:
        parent - the parent component of the scroll pane.
        style - the style of the scroll pane.
    • Method Detail

      • getControl

        public org.eclipse.swt.widgets.Control getControl()
        Returns the viewer component wrapped by this PrintPreview.
        Returns:
        the viewer component wrapped by this PrintPreview.
      • setPrint

        public void setPrint​(Print print)
        Sets the Print to be displayed.
        Parameters:
        print - the Print to display.
      • getPrint

        public Print getPrint()
        Returns the Print being displayed.
        Returns:
        the Print being displayed.
      • updateCanvas

        void updateCanvas()
      • setPrintPiece

        private void setPrintPiece​(PrintPiece piece,
                                   boolean updateMinHeight)