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, getWidthfinal 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)
AbstractBorderPaintergetBottom in interface BorderPaintergetBottom in class AbstractBorderPainteropen - 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()
AbstractBorderPaintergetLeft in interface BorderPaintergetLeft in class AbstractBorderPainterpublic int getRight()
AbstractBorderPaintergetRight in interface BorderPaintergetRight in class AbstractBorderPainterpublic int getTop(boolean open)
AbstractBorderPaintergetTop in interface BorderPaintergetTop in class AbstractBorderPainteropen - 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()
BorderPainterGridPrint.BORDER_OVERLAP.public void paint(org.eclipse.swt.graphics.GC gc,
int x,
int y,
int width,
int height,
boolean topOpen,
boolean bottomOpen)
AbstractBorderPaintertopOpen and bottomOpen.paint in interface BorderPainterpaint in class AbstractBorderPaintergc - 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