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
-
-
Field Summary
Fields Modifier and Type Field Description private BorderPainterborderprivate org.eclipse.swt.graphics.RectanglecellPaddingprivate org.eclipse.swt.graphics.PointcellSpacingprivate intfooterClosedSpacingprivate intfooterOpenSpacingprivate intheaderClosedSpacingprivate intheaderOpenSpacing
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBodyBottom(boolean footerPresent, boolean open)Returns the margin, in pixels, at the bottom of the body cells.intgetBodyTop(boolean headerPresent, boolean open)Returns the margin, in pixels, at the top of the body cells.intgetBodyVerticalSpacing()Returns the vertical spacing, in pixels, between rows in the body.intgetFooterBottom()Returns the margin, in pixels, at the bottom of the footer cells.intgetFooterVerticalSpacing()Returns the vertical spacing, in pixels, between rows in the footer.intgetHeaderTop()Returns the margin, in pixels, at the top of the header cells.intgetHeaderVerticalSpacing()Returns the vertical spacing, in pixels, between rows in the header.intgetHorizontalSpacing()Returns the horizontal spacing, in pixels, between grid cells.intgetLeft()Returns the margin, in pixels, at the left side of the grid.intgetRight()Returns the margin, in pixels, at the right side of the grid.
-
-
-
Field Detail
-
border
private final BorderPainter border
-
cellSpacing
private final org.eclipse.swt.graphics.Point cellSpacing
-
cellPadding
private final org.eclipse.swt.graphics.Rectangle cellPadding
-
headerClosedSpacing
private final int headerClosedSpacing
-
headerOpenSpacing
private final int headerOpenSpacing
-
footerClosedSpacing
private final int footerClosedSpacing
-
footerOpenSpacing
private final int footerOpenSpacing
-
-
Constructor Detail
-
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 Detail
-
getLeft
public int getLeft()
Description copied from interface:GridMarginsReturns the margin, in pixels, at the left side of the grid.- Specified by:
getLeftin interfaceGridMargins- Returns:
- the margin, in pixels, at the left side of the grid.
-
getHorizontalSpacing
public int getHorizontalSpacing()
Description copied from interface:GridMarginsReturns the horizontal spacing, in pixels, between grid cells.- Specified by:
getHorizontalSpacingin interfaceGridMargins- Returns:
- the horizontal spacing, in pixels, between grid cells.
-
getRight
public int getRight()
Description copied from interface:GridMarginsReturns the margin, in pixels, at the right side of the grid.- Specified by:
getRightin interfaceGridMargins- Returns:
- the margin, in pixels, at the right side of the grid.
-
getHeaderTop
public int getHeaderTop()
Description copied from interface:GridMarginsReturns the margin, in pixels, at the top of the header cells. If a grid has no header cells, this value is ignored.- Specified by:
getHeaderTopin interfaceGridMargins- Returns:
- the margin, in pixels, at the top of the header cells.
-
getHeaderVerticalSpacing
public int getHeaderVerticalSpacing()
Description copied from interface:GridMarginsReturns the vertical spacing, in pixels, between rows in the header.- Specified by:
getHeaderVerticalSpacingin interfaceGridMargins- Returns:
- the vertical spacing, in pixels, between rows in the header.
-
getBodyTop
public int getBodyTop(boolean headerPresent, boolean open)Description copied from interface:GridMarginsReturns 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:
getBodyTopin interfaceGridMargins- 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:GridMarginsReturns the vertical spacing, in pixels, between rows in the body.- Specified by:
getBodyVerticalSpacingin interfaceGridMargins- Returns:
- the vertical spacing, in pixels, between rows in the body.
-
getBodyBottom
public int getBodyBottom(boolean footerPresent, boolean open)Description copied from interface:GridMarginsReturns 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:
getBodyBottomin interfaceGridMargins- 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:GridMarginsReturns the vertical spacing, in pixels, between rows in the footer.- Specified by:
getFooterVerticalSpacingin interfaceGridMargins- Returns:
- the vertical spacing, in pixels, between rows in the footer.
-
getFooterBottom
public int getFooterBottom()
Description copied from interface:GridMarginsReturns the margin, in pixels, at the bottom of the footer cells. If a grid has no footer cells, this value is ignored.- Specified by:
getFooterBottomin interfaceGridMargins- Returns:
- the margin, in pixels, at the bottom of the footer cells.
-
-