public class RectEclipseBorder
extends java.lang.Object
implements javax.swing.border.Border
setRoundEdges(int)
.Modifier and Type | Field and Description |
---|---|
static int |
BOTTOM_LEFT
constant indicating the bottom left edge has to be painted round
|
static int |
BOTTOM_RIGHT
constant indicating the bottom right edge has to be painted round
|
static int |
TOP_LEFT
constant indicating the top left edge has to be painted round
|
static int |
TOP_RIGHT
constant indicating the top right edge has to be painted round
|
Constructor and Description |
---|
RectEclipseBorder(DockController controller,
boolean fillEdges)
Creates a new border.
|
RectEclipseBorder(DockController controller,
boolean fillEdges,
int roundEdges)
Creates a new border.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Insets |
getBorderInsets(java.awt.Component c) |
boolean |
isBorderOpaque() |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height) |
void |
setRoundEdges(int roundEdges)
Sets the edges which have to be painted round, see
TOP_LEFT ,
TOP_RIGHT , BOTTOM_LEFT and BOTTOM_RIGHT . |
public static final int TOP_LEFT
public static final int TOP_RIGHT
public static final int BOTTOM_LEFT
public static final int BOTTOM_RIGHT
public RectEclipseBorder(DockController controller, boolean fillEdges)
controller
- the controller for which this border will be usedfillEdges
- whether the top edges should be filled with the
background color or let empty.public RectEclipseBorder(DockController controller, boolean fillEdges, int roundEdges)
controller
- the controller for which this border will be usedfillEdges
- whether the top edges should be filled with the
background color or let empty.roundEdges
- which edges to paint roundpublic void setRoundEdges(int roundEdges)
TOP_LEFT
,
TOP_RIGHT
, BOTTOM_LEFT
and BOTTOM_RIGHT
.roundEdges
- the round edgespublic void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
paintBorder
in interface javax.swing.border.Border
public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets
in interface javax.swing.border.Border
public boolean isBorderOpaque()
isBorderOpaque
in interface javax.swing.border.Border