Class EmptyPrint

java.lang.Object
org.eclipse.nebula.paperclips.core.EmptyPrint
All Implemented Interfaces:
Print

public class EmptyPrint
extends java.lang.Object
implements Print
A Print which displays nothing but takes up space. Useful for putting blank cells in a GridPrint.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) int height  
    (package private) int width  
  • Constructor Summary

    Constructors 
    Constructor Description
    EmptyPrint()
    Constructs an EmptyPrint with size (0, 0).
    EmptyPrint​(int width, int height)
    Constructs an EmptyPrint with the given size.
    EmptyPrint​(org.eclipse.swt.graphics.Point size)
    Constructs an EmptyPrint with the given size.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    org.eclipse.swt.graphics.Point getSize()
    Returns the size of the empty space.
    int hashCode()  
    PrintIterator iterator​(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)
    Returns a PrintIterator for laying out the contents of this Print.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • EmptyPrint

      public EmptyPrint()
      Constructs an EmptyPrint with size (0, 0).
    • EmptyPrint

      public EmptyPrint​(int width, int height)
      Constructs an EmptyPrint with the given size.
      Parameters:
      width - width of the Print, in points (72pts = 1").
      height - height of the Print, in points (72pts = 1").
    • EmptyPrint

      public EmptyPrint​(org.eclipse.swt.graphics.Point size)
      Constructs an EmptyPrint with the given size.
      Parameters:
      size - the size, in points (72pts = 1").
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • getSize

      public org.eclipse.swt.graphics.Point getSize()
      Returns the size of the empty space.
      Returns:
      the size of the empty space.
    • iterator

      public PrintIterator iterator​(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)
      Description copied from interface: Print
      Returns a PrintIterator for laying out the contents of this Print. The iterator uses a snapshot of the print at the time this method is invoked, so subsequent changes to the Print will not affect the output of the iterator.
      Specified by:
      iterator in interface Print
      Parameters:
      device - the graphics device this Print will be drawn onto.
      gc - the graphics context to be used for calculating layout and drawing the Print's contents.
      Returns:
      a PrintIterator for laying out the contents of this Print.