Class LineBorderPainter

java.lang.Object
org.eclipse.nebula.paperclips.core.border.AbstractBorderPainter
org.eclipse.nebula.paperclips.core.border.LineBorderPainter
All Implemented Interfaces:
BorderPainter

class LineBorderPainter
extends AbstractBorderPainter
  • Constructor Summary

    Constructors 
    Constructor Description
    LineBorderPainter​(LineBorder border, org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)  
  • Method Summary

    Modifier and Type Method Description
    void dispose()
    Disposes the system resources allocated by this BorderPainter.
    int getBottom​(boolean open)
    Returns the border inset, in pixels, from the bottom.
    int getLeft()
    Returns the border inset, in pixels, from the left.
    org.eclipse.swt.graphics.Point getOverlap()
    Returns the x and y distance that two of the same BorderPainters would overlap to create the appearance of a single border between the two.
    int getRight()
    Returns the border inset, in pixels, from the right.
    int getTop​(boolean open)
    Returns the border inset, in pixels, from the top.
    void paint​(org.eclipse.swt.graphics.GC gc, int x, int y, int width, int height, boolean topOpen, boolean bottomOpen)
    Paints a border around the specified region.

    Methods inherited from class org.eclipse.nebula.paperclips.core.border.AbstractBorderPainter

    getHeight, getMaxHeight, getWidth

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getLeft

      public int getLeft()
      Description copied from class: AbstractBorderPainter
      Returns the border inset, in pixels, from the left.
      Specified by:
      getLeft in interface BorderPainter
      Specified by:
      getLeft in class AbstractBorderPainter
      Returns:
      the border inset, in pixels, from the left.
    • getRight

      public int getRight()
      Description copied from class: AbstractBorderPainter
      Returns the border inset, in pixels, from the right.
      Specified by:
      getRight in interface BorderPainter
      Specified by:
      getRight in class AbstractBorderPainter
      Returns:
      the border inset, in pixels, from the right.
    • getTop

      public int getTop​(boolean open)
      Description copied from class: AbstractBorderPainter
      Returns the border inset, in pixels, from the top.
      Specified by:
      getTop in interface BorderPainter
      Specified by:
      getTop in class AbstractBorderPainter
      Parameters:
      open - If true, the inset of an open border will be returned. If false, the inset of a closed border will be returned.
      Returns:
      the border inset, in pixels, from the top.
    • getBottom

      public int getBottom​(boolean open)
      Description copied from class: AbstractBorderPainter
      Returns the border inset, in pixels, from the bottom.
      Specified by:
      getBottom in interface BorderPainter
      Specified by:
      getBottom in class AbstractBorderPainter
      Parameters:
      open - If true, the inset of an open border will be returned. If false, the inset of a closed border will be returned.
      Returns:
      the border inset, in pixels, from the bottom.
    • paint

      public void paint​(org.eclipse.swt.graphics.GC gc, int x, int y, int width, int height, boolean topOpen, boolean bottomOpen)
      Description copied from class: AbstractBorderPainter
      Paints a border around the specified region. Depending on the type of border, the top and bottom of may be painted differently depending on the values of topOpen and bottomOpen.
      Specified by:
      paint in interface BorderPainter
      Specified by:
      paint in class AbstractBorderPainter
      Parameters:
      gc - The graphics context to paint on.
      x - The x coordinate of the top left corner of the border.
      y - The y coordinate of the top left corner of the border.
      width - The width of the border to paint
      height - The height of the border to paint
      topOpen - If true, the top border should be drawn "open," to indicate that this is the continuation of a border in a previous iteration. If false, the border should be drawn "closed" to indicate that this is the first iteration on the BorderPrint's target.
      bottomOpen - If true, the bottom border should be drawn "open," to indicate that the BorderPrint's target was not consumed in this iteration. If false, the bottom border should be drawn "closed," to indicate that the BorderPrint's target completed during this iteration.
    • getOverlap

      public org.eclipse.swt.graphics.Point getOverlap()
      Description copied from interface: BorderPainter
      Returns the x and y distance that two of the same BorderPainters would overlap to create the appearance of a single border between the two. This method is used by GridPrint whenever the horizontal and/or vertical spacing fields are set to GridPrint.BORDER_OVERLAP.
      Returns:
      the distance that this border painter would overlap an adjacent one.
    • dispose

      public void dispose()
      Description copied from interface: BorderPainter
      Disposes the system resources allocated by this BorderPainter. The dispose method is not a permanent disposal of a BorderPainter. It is intended to reclaim system resources, however future calls to paint(GC,int,int) may require that the resources be allocated again.