Class BorderPrint

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

public class BorderPrint
extends java.lang.Object
implements Print
A decorator that draws a border around the target print.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) Border border  
    (package private) Print target  
  • Constructor Summary

    Constructors 
    Constructor Description
    BorderPrint​(Print target, Border border)
    Constructs a BorderPrint with the given target and border.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    Border getBorder()
    Returns the border being applied to the target.
    Print getTarget()
    Returns the wrapped print to which the border is being applied.
    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

    • BorderPrint

      public BorderPrint​(Print target, Border border)
      Constructs a BorderPrint with the given target and border.
      Parameters:
      target - the print to decorate with a border.
      border - the border which will be drawn around the target.
  • 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
    • getTarget

      public Print getTarget()
      Returns the wrapped print to which the border is being applied.
      Returns:
      the wrapped print to which the border is being applied.
    • getBorder

      public Border getBorder()
      Returns the border being applied to the target.
      Returns:
      the border being applied to the target.
    • 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.