class GapBorderPainter extends AbstractBorderPainter
Modifier and Type | Field and Description |
---|---|
(package private) int |
bottom |
(package private) int |
left |
(package private) int |
openBottom |
(package private) int |
openTop |
(package private) int |
right |
(package private) int |
top |
Constructor and Description |
---|
GapBorderPainter(GapBorder target,
org.eclipse.swt.graphics.Device device) |
GapBorderPainter(GapBorderPainter that) |
Modifier and Type | Method and 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.
|
(package private) static int |
toPixels(int points,
int dpi) |
getHeight, getMaxHeight, getWidth
final int top
final int openTop
final int bottom
final int openBottom
final int left
final int right
GapBorderPainter(GapBorder target, org.eclipse.swt.graphics.Device device)
GapBorderPainter(GapBorderPainter that)
static int toPixels(int points, int dpi)
public int getBottom(boolean open)
AbstractBorderPainter
getBottom
in interface BorderPainter
getBottom
in class AbstractBorderPainter
open
- If true, the inset of an open border will be returned. If
false, the inset of a closed border will be returned.public int getLeft()
AbstractBorderPainter
getLeft
in interface BorderPainter
getLeft
in class AbstractBorderPainter
public int getRight()
AbstractBorderPainter
getRight
in interface BorderPainter
getRight
in class AbstractBorderPainter
public int getTop(boolean open)
AbstractBorderPainter
getTop
in interface BorderPainter
getTop
in class AbstractBorderPainter
open
- If true, the inset of an open border will be returned. If
false, the inset of a closed border will be returned.public org.eclipse.swt.graphics.Point getOverlap()
BorderPainter
GridPrint.BORDER_OVERLAP
.public void paint(org.eclipse.swt.graphics.GC gc, int x, int y, int width, int height, boolean topOpen, boolean bottomOpen)
AbstractBorderPainter
topOpen
and bottomOpen
.paint
in interface BorderPainter
paint
in class AbstractBorderPainter
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.public void dispose()
BorderPainter