Class DefaultGridMargins

java.lang.Object
org.eclipse.nebula.paperclips.core.grid.internal.DefaultGridMargins
All Implemented Interfaces:
GridMargins

class DefaultGridMargins
extends java.lang.Object
implements GridMargins
  • Constructor Summary

    Constructors 
    Constructor Description
    DefaultGridMargins​(BorderPainter border, org.eclipse.swt.graphics.Point cellSpacing, org.eclipse.swt.graphics.Rectangle cellPadding, int headerClosedSpacing, int headerOpenSpacing, int footerClosedSpacing, int footerOpenSpacing)  
  • Method Summary

    Modifier and Type Method Description
    int getBodyBottom​(boolean footerPresent, boolean open)
    Returns the margin, in pixels, at the bottom of the body cells.
    int getBodyTop​(boolean headerPresent, boolean open)
    Returns the margin, in pixels, at the top of the body cells.
    int getBodyVerticalSpacing()
    Returns the vertical spacing, in pixels, between rows in the body.
    int getFooterBottom()
    Returns the margin, in pixels, at the bottom of the footer cells.
    int getFooterVerticalSpacing()
    Returns the vertical spacing, in pixels, between rows in the footer.
    int getHeaderTop()
    Returns the margin, in pixels, at the top of the header cells.
    int getHeaderVerticalSpacing()
    Returns the vertical spacing, in pixels, between rows in the header.
    int getHorizontalSpacing()
    Returns the horizontal spacing, in pixels, between grid cells.
    int getLeft()
    Returns the margin, in pixels, at the left side of the grid.
    int getRight()
    Returns the margin, in pixels, at the right side of the grid.

    Methods inherited from class java.lang.Object

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

    • DefaultGridMargins

      DefaultGridMargins​(BorderPainter border, org.eclipse.swt.graphics.Point cellSpacing, org.eclipse.swt.graphics.Rectangle cellPadding, int headerClosedSpacing, int headerOpenSpacing, int footerClosedSpacing, int footerOpenSpacing)
  • Method Details

    • getLeft

      public int getLeft()
      Description copied from interface: GridMargins
      Returns the margin, in pixels, at the left side of the grid.
      Specified by:
      getLeft in interface GridMargins
      Returns:
      the margin, in pixels, at the left side of the grid.
    • getHorizontalSpacing

      public int getHorizontalSpacing()
      Description copied from interface: GridMargins
      Returns the horizontal spacing, in pixels, between grid cells.
      Specified by:
      getHorizontalSpacing in interface GridMargins
      Returns:
      the horizontal spacing, in pixels, between grid cells.
    • getRight

      public int getRight()
      Description copied from interface: GridMargins
      Returns the margin, in pixels, at the right side of the grid.
      Specified by:
      getRight in interface GridMargins
      Returns:
      the margin, in pixels, at the right side of the grid.
    • getHeaderTop

      public int getHeaderTop()
      Description copied from interface: GridMargins
      Returns the margin, in pixels, at the top of the header cells. If a grid has no header cells, this value is ignored.
      Specified by:
      getHeaderTop in interface GridMargins
      Returns:
      the margin, in pixels, at the top of the header cells.
    • getHeaderVerticalSpacing

      public int getHeaderVerticalSpacing()
      Description copied from interface: GridMargins
      Returns the vertical spacing, in pixels, between rows in the header.
      Specified by:
      getHeaderVerticalSpacing in interface GridMargins
      Returns:
      the vertical spacing, in pixels, between rows in the header.
    • getBodyTop

      public int getBodyTop​(boolean headerPresent, boolean open)
      Description copied from interface: GridMargins
      Returns the margin, in pixels, at the top of the body cells. If a header is present, this is the spacing, in pixels, between the last header row and the first body row. If a header is not present, this is the margin, in pixels, at the top of the grid.
      Specified by:
      getBodyTop in interface GridMargins
      Parameters:
      headerPresent - whether a header is present.
      open - whether the top row of body cells are "open." That is, whether the top row was started on a previous page and is continuing on this page. A GridLook may choose to show a visual indication for cells that were "opened" on previous pages.
      Returns:
      the margin, in pixels, at the top of the body cells.
    • getBodyVerticalSpacing

      public int getBodyVerticalSpacing()
      Description copied from interface: GridMargins
      Returns the vertical spacing, in pixels, between rows in the body.
      Specified by:
      getBodyVerticalSpacing in interface GridMargins
      Returns:
      the vertical spacing, in pixels, between rows in the body.
    • getBodyBottom

      public int getBodyBottom​(boolean footerPresent, boolean open)
      Description copied from interface: GridMargins
      Returns the margin, in pixels, at the bottom of the body cells. If a footer is present, this is the spacing, in pixels, between the last body row and the first footer row. If a header is not present, this is the margin, in pixels, at the bottom of the grid.
      Specified by:
      getBodyBottom in interface GridMargins
      Parameters:
      footerPresent - whether a footer is present.
      open - whether the bottom row of body cells are "open." That is, whether the bottom row still has more content to display on the next page. A GridLook may choose to show a visual indication for cells that will be "continued" on the next page.
      Returns:
      the margin, in pixels, at the bottom of the body cells.
    • getFooterVerticalSpacing

      public int getFooterVerticalSpacing()
      Description copied from interface: GridMargins
      Returns the vertical spacing, in pixels, between rows in the footer.
      Specified by:
      getFooterVerticalSpacing in interface GridMargins
      Returns:
      the vertical spacing, in pixels, between rows in the footer.
    • getFooterBottom

      public int getFooterBottom()
      Description copied from interface: GridMargins
      Returns the margin, in pixels, at the bottom of the footer cells. If a grid has no footer cells, this value is ignored.
      Specified by:
      getFooterBottom in interface GridMargins
      Returns:
      the margin, in pixels, at the bottom of the footer cells.