Modifier and Type | Field and Description |
---|---|
static int |
EMBOSSED_OUT |
static int |
ETCHED_IN |
static int |
LINE |
static int |
NONE |
static int |
ROUND_RECT |
static int |
THREED_IN |
static int |
THREED_OUT |
Constructor and Description |
---|
Border() |
Modifier and Type | Method and Description |
---|---|
static Color |
brighter(Color color)
Returns a brighter version of this color.
|
Object |
clone()
Returns a clone of this Border
|
static Color |
darker(Color color)
Returns a darker version of this color.
|
Color |
getBorder()
Returns the current border color.
|
int |
getBorderThickness()
Returns the current setting for the border thickness
|
int |
getBottomMargin()
Returns the bottom margin.
|
Insets |
getInsets()
returns the left, right, top, and bottom insets of the background of the
current style, taking into account thickness and margins.
|
int |
getLeftMargin()
Returns the left margin.
|
int |
getRightMargin()
Returns the right margin.
|
int |
getTopMargin()
Returns the top margin.
|
int |
getType()
Returns the border type (e.g., Border.LINE)
|
void |
paint(Graphics g,
Color background,
int x,
int y,
int width,
int height)
returns the left, right, top, and bottom insets of the background of the
current style, taking into account thickness and margins.
|
void |
setBorder(Color border)
Sets the current border color.
|
void |
setBorderThickness(int borderThickness)
Sets the border thickness
|
void |
setBottomMargin(int margin)
Sets the bottom margin
|
void |
setLeftMargin(int margin)
Sets the left margin
|
void |
setMargins(int margin)
Sets all margins (top, left, bottom, and right) to the same, given value.
|
void |
setMargins(int top,
int left,
int bottom,
int right)
Sets all margins (top, left, bottom, and right) to the given values.
|
void |
setNoInsets()
sets all margins and thicknesses to zero
|
void |
setRightMargin(int margin)
Sets the right margin
|
void |
setTopMargin(int margin)
Sets the top margin
|
void |
setType(int type)
Sets the border type (e.g., to Border.LINE)
|
public static final int NONE
public static final int LINE
public static final int THREED_IN
public static final int THREED_OUT
public static final int ETCHED_IN
public static final int EMBOSSED_OUT
public static final int ROUND_RECT
public static Color brighter(Color color)
color
- the color to which to apply the factorpublic static Color darker(Color color)
color
- the color to which to apply the factorpublic Object clone()
public void setNoInsets()
public int getType()
public void setType(int type)
type
- the border typepublic Color getBorder()
public void setBorder(Color border)
border
- the new border colorpublic int getTopMargin()
public int getLeftMargin()
public int getBottomMargin()
public int getRightMargin()
public void setMargins(int margin)
margin
- the marginpublic void setMargins(int top, int left, int bottom, int right)
top
- the top marginleft
- the left marginbottom
- the bottom marginright
- the right marginpublic void setTopMargin(int margin)
margin
- the top marginpublic void setLeftMargin(int margin)
margin
- the left marginpublic void setBottomMargin(int margin)
margin
- the bottom marginpublic void setRightMargin(int margin)
margin
- the right marginpublic int getBorderThickness()
public void setBorderThickness(int borderThickness)
borderThickness
- the border thicknesspublic Insets getInsets()
public void paint(Graphics g, Color background, int x, int y, int width, int height)
g
- the Graphics in which to paintbackground
- the current background color (or null), used if available to
calculate the border color if that is null.x
- the x location of the upper-left point of the bordery
- the y location of the upper-left point of the borderwidth
- the width of the rectangle in which to draw the borderheight
- the height of the rectangle in which to draw the borderCopyright © 2015–2021 Fiji. All rights reserved.