Class LineBorder

java.lang.Object
org.eclipse.nebula.paperclips.core.border.LineBorder
All Implemented Interfaces:
Border

public class LineBorder
extends java.lang.Object
implements Border
A border that draws a rectangle around a print.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) int gapSize  
    (package private) int lineWidth  
    (package private) org.eclipse.swt.graphics.RGB rgb  
  • Constructor Summary

    Constructors 
    Constructor Description
    LineBorder()
    Constructs a LineBorder with a black border and 5-pt insets. (72 pts = 1")
    LineBorder​(org.eclipse.swt.graphics.RGB rgb)
    Constructs a LineBorder with 5-pt insets. (72 pts = 1")
  • Method Summary

    Modifier and Type Method Description
    BorderPainter createPainter​(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)
    Creates a BorderPainter which uses the given Device and GC.
    boolean equals​(java.lang.Object obj)  
    int getGapSize()
    Returns the size of the gap between the line border and the target print, expressed in points.
    int getLineWidth()
    Returns the line width of the border, expressed in points.
    org.eclipse.swt.graphics.RGB getRGB()
    Returns the border color.
    int hashCode()  
    void setGapSize​(int points)
    Sets the size of the gap between the line border and the target print.
    void setLineWidth​(int points)
    Sets the line width to the argument.
    void setRGB​(org.eclipse.swt.graphics.RGB rgb)
    Sets the border color to the argument.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • LineBorder

      public LineBorder()
      Constructs a LineBorder with a black border and 5-pt insets. (72 pts = 1")
    • LineBorder

      public LineBorder​(org.eclipse.swt.graphics.RGB rgb)
      Constructs a LineBorder with 5-pt insets. (72 pts = 1")
      Parameters:
      rgb - the color to use for the border.
  • 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
    • setRGB

      public void setRGB​(org.eclipse.swt.graphics.RGB rgb)
      Sets the border color to the argument.
      Parameters:
      rgb - the new border color.
    • getRGB

      public org.eclipse.swt.graphics.RGB getRGB()
      Returns the border color.
      Returns:
      the border color.
    • setLineWidth

      public void setLineWidth​(int points)
      Sets the line width to the argument.
      Parameters:
      points - the line width, in points.
    • getLineWidth

      public int getLineWidth()
      Returns the line width of the border, expressed in points.
      Returns:
      the line width of the border, expressed in points.
    • setGapSize

      public void setGapSize​(int points)
      Sets the size of the gap between the line border and the target print.
      Parameters:
      points - the gap size, expressed in points.
    • getGapSize

      public int getGapSize()
      Returns the size of the gap between the line border and the target print, expressed in points.
      Returns:
      the gap size between the line border and the target print.
    • createPainter

      public BorderPainter createPainter​(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)
      Description copied from interface: Border
      Creates a BorderPainter which uses the given Device and GC.
      Specified by:
      createPainter in interface Border
      Parameters:
      device - the print device.
      gc - a GC for drawing to the print device.
      Returns:
      a BorderPainter for painting the border on the given Device and GC.