Class AbstractPiece

  • All Implemented Interfaces:
    PrintPiece

    public abstract class AbstractPiece
    extends java.lang.Object
    implements PrintPiece
    An abstract PrintPiece class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.swt.graphics.Device device
      The device being printed to.
      private org.eclipse.swt.graphics.Point size  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractPiece​(AbstractIterator iter, org.eclipse.swt.graphics.Point size)
      Constructos an AbstractPiece.
      protected AbstractPiece​(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Point size)
      Constructs an AbstractPiece.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.swt.graphics.Point getSize()
      Returns the dimensions of this PrintPiece, in pixels.
      • Methods inherited from class java.lang.Object

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

      • device

        protected final org.eclipse.swt.graphics.Device device
        The device being printed to.
      • size

        private final org.eclipse.swt.graphics.Point size
    • Constructor Detail

      • AbstractPiece

        protected AbstractPiece​(org.eclipse.swt.graphics.Device device,
                                org.eclipse.swt.graphics.GC gc,
                                org.eclipse.swt.graphics.Point size)
        Constructs an AbstractPiece.
        Parameters:
        device - the device being printed to.
        gc - a GC for drawing on the print device.
        size - the value to be returned by getSize().
      • AbstractPiece

        protected AbstractPiece​(AbstractIterator iter,
                                org.eclipse.swt.graphics.Point size)
        Constructos an AbstractPiece.
        Parameters:
        iter - an AbstractIterator containing references to a Device and GC which will be used for printing.
        size - the value to be returned by getSize().
    • Method Detail

      • getSize

        public final org.eclipse.swt.graphics.Point getSize()
        Description copied from interface: PrintPiece
        Returns the dimensions of this PrintPiece, in pixels.
        Specified by:
        getSize in interface PrintPiece
        Returns:
        the dimensions of this PrintPiece, in pixels.