Class GapBorderPainter
- java.lang.Object
-
- org.eclipse.nebula.paperclips.core.border.AbstractBorderPainter
-
- org.eclipse.nebula.paperclips.core.border.GapBorderPainter
-
- All Implemented Interfaces:
BorderPainter
class GapBorderPainter extends AbstractBorderPainter
-
-
Constructor Summary
Constructors Constructor Description GapBorderPainter(GapBorderPainter that)GapBorderPainter(GapBorder target, org.eclipse.swt.graphics.Device device)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Disposes the system resources allocated by this BorderPainter.intgetBottom(boolean open)Returns the border inset, in pixels, from the bottom.intgetLeft()Returns the border inset, in pixels, from the left.org.eclipse.swt.graphics.PointgetOverlap()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.intgetRight()Returns the border inset, in pixels, from the right.intgetTop(boolean open)Returns the border inset, in pixels, from the top.voidpaint(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.(package private) static inttoPixels(int points, int dpi)-
Methods inherited from class org.eclipse.nebula.paperclips.core.border.AbstractBorderPainter
getHeight, getMaxHeight, getWidth
-
-
-
-
Constructor Detail
-
GapBorderPainter
GapBorderPainter(GapBorder target, org.eclipse.swt.graphics.Device device)
-
GapBorderPainter
GapBorderPainter(GapBorderPainter that)
-
-
Method Detail
-
toPixels
static int toPixels(int points, int dpi)
-
getBottom
public int getBottom(boolean open)
Description copied from class:AbstractBorderPainterReturns the border inset, in pixels, from the bottom.- Specified by:
getBottomin interfaceBorderPainter- Specified by:
getBottomin classAbstractBorderPainter- 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.
-
getLeft
public int getLeft()
Description copied from class:AbstractBorderPainterReturns the border inset, in pixels, from the left.- Specified by:
getLeftin interfaceBorderPainter- Specified by:
getLeftin classAbstractBorderPainter- Returns:
- the border inset, in pixels, from the left.
-
getRight
public int getRight()
Description copied from class:AbstractBorderPainterReturns the border inset, in pixels, from the right.- Specified by:
getRightin interfaceBorderPainter- Specified by:
getRightin classAbstractBorderPainter- Returns:
- the border inset, in pixels, from the right.
-
getTop
public int getTop(boolean open)
Description copied from class:AbstractBorderPainterReturns the border inset, in pixels, from the top.- Specified by:
getTopin interfaceBorderPainter- Specified by:
getTopin classAbstractBorderPainter- 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.
-
getOverlap
public org.eclipse.swt.graphics.Point getOverlap()
Description copied from interface:BorderPainterReturns 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 toGridPrint.BORDER_OVERLAP.- Returns:
- the distance that this border painter would overlap an adjacent one.
-
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:AbstractBorderPainterPaints 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 oftopOpenandbottomOpen.- Specified by:
paintin interfaceBorderPainter- Specified by:
paintin classAbstractBorderPainter- 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 paintheight- The height of the border to painttopOpen- 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.
-
dispose
public void dispose()
Description copied from interface:BorderPainterDisposes 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.
-
-