public interface BorderPainter
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 |
getHeight(boolean topOpen,
boolean bottomOpen)
Returns the sum of the top and bottom border insets.
|
int |
getLeft()
Returns the border inset, in pixels, from the left.
|
int |
getMaxHeight()
Returns the sum of the maximum top and bottom border insets.
|
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.
|
int |
getWidth()
Returns the sum of the left and right border insets.
|
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.
|
int getLeft()
int getRight()
int getWidth()
int getTop(boolean open)
open
- If true, the inset of an open border will be returned. If
false, the inset of a closed border will be returned.int getBottom(boolean open)
open
- If true, the inset of an open border will be returned. If
false, the inset of a closed border will be returned.int getHeight(boolean topOpen, boolean bottomOpen)
topOpen
- If true, the inset of an open border will be returned. If
false, the inset of a closed border will be returned.bottomOpen
- If true, the inset of an open border will be returned. If
false, the inset of a closed border will be returned.int getMaxHeight()
org.eclipse.swt.graphics.Point getOverlap()
GridPrint.BORDER_OVERLAP
.void paint(org.eclipse.swt.graphics.GC gc, int x, int y, int width, int height, boolean topOpen, boolean bottomOpen)
topOpen
and bottomOpen
.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.void dispose()