public static class OptionsPanel.RoundedLineBorder extends Object implements Border
OptionsPanel.beginBorderedGroup(String, boolean). It has rounded corners,
and an optional title label.| Modifier and Type | Field and Description |
|---|---|
static Color |
borderColor
The color of the lines on a RoundedLineBorder.
|
static int |
CORNER_WIDTH
The roundedness of the corners of the border.
|
| Constructor and Description |
|---|
OptionsPanel.RoundedLineBorder(String labelText,
boolean headless)
Constructs a new SimpleLineBorder.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
drawBorderForTopComponent(Component componentToDrawOn,
Component componentToDrawUnder,
Graphics graphics)
For a headless line border, draws the border for the top component (placed directly above the component with the line border, e.g.
|
Insets |
getBorderInsets(Component c) |
String |
getLabel()
Get the label displayed in the top-left of the border.
|
boolean |
isBorderOpaque() |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height) |
OptionsPanel.RoundedLineBorder |
setInsets(Insets insets)
Set the inserts to use.
|
public static final Color borderColor
public static final int CORNER_WIDTH
public OptionsPanel.RoundedLineBorder(String labelText, boolean headless)
labelText - The text for an optional label that appears in the top left of the border (pass in null to have no label)headless - Pass in true to not draw the top of the border (the sides will extend all the way to the top of the component). See drawBorderForTopComponent(java.awt.Component, java.awt.Component, java.awt.Graphics) to draw the top of the border.
No label will be drawn in a headless border.public static void drawBorderForTopComponent(Component componentToDrawOn, Component componentToDrawUnder, Graphics graphics)
componentToDrawOn - the top component (placed directly above the component with the line border, e.g. NORTH in a border layout)componentToDrawUnder - a child component of componentToDrawOn which the border should be drawn underneath. May be null to indicate no component.graphics - the graphics to draw to.public OptionsPanel.RoundedLineBorder setInsets(Insets insets)
insets - the inserts to use.public String getLabel()
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder in interface Borderpublic Insets getBorderInsets(Component c)
getBorderInsets in interface Borderpublic boolean isBorderOpaque()
isBorderOpaque in interface Border