public class EnhancedLineBorder extends LineBorder
lineColor, roundedCorners, thickness| Constructor and Description |
|---|
EnhancedLineBorder()
Creates a line border with black color, a thickness of 1
and all four sides enabled.
|
EnhancedLineBorder(boolean topEnabled,
boolean leftEnabled,
boolean bottomEnabled,
boolean rightEnabled)
Creates a line border with the black color, thickness 1 and
all four sides enabled separately.
|
EnhancedLineBorder(Color color)
Creates a line border with the specified color, a thickness of 1
and all four sides enabled.
|
EnhancedLineBorder(Color color,
int thickness)
Creates a line border with the specified color, thickness
and all four sides enabled.
|
EnhancedLineBorder(Color color,
int thickness,
boolean topEnabled,
boolean leftEnabled,
boolean bottomEnabled,
boolean rightEnabled)
Creates a line border with the specified color, thickness and
all four sides enabled separately.
|
| Modifier and Type | Method and Description |
|---|---|
Insets |
getBorderInsets(Component c)
Returns the insets of the border.
|
Insets |
getBorderInsets(Component c,
Insets insets)
Reinitialize the insets parameter with this Border's current Insets.
|
Color |
getLineColor()
Returns the color of the border.
|
int |
getThickness()
Returns the thickness of the border.
|
boolean |
isBottomEnabled()
Returns whether bottom border is enabled.
|
boolean |
isLeftEnabled()
Returns whether left border is enabled.
|
boolean |
isRightEnabled()
Returns whether right border is enabled.
|
boolean |
isTopEnabled()
Returns whether top border is enabled.
|
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Paints the border for the specified component with the
specified position and size.
|
void |
setBottomEnabled(boolean enabled)
Enables the bottom border.
|
void |
setLeftEnabled(boolean enabled)
Enables the left border.
|
void |
setLineColor(Color lineColor)
Sets the color of the border.
|
void |
setRightEnabled(boolean enabled)
Enables the right border.
|
void |
setThickness(int thickness)
Sets the thickness of the border.
|
void |
setTopEnabled(boolean enabled)
Enables the top border.
|
createBlackLineBorder, createGrayLineBorder, getRoundedCorners, isBorderOpaquegetBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectanglepublic EnhancedLineBorder(Color color, int thickness, boolean topEnabled, boolean leftEnabled, boolean bottomEnabled, boolean rightEnabled)
color - the color of the borderthickness - the thickness of the bordertopEnabled - true if top border is drawnleftEnabled - true if left border is drawnbottomEnabled - true if bottom border is drawnrightEnabled - true if right border is drawnpublic EnhancedLineBorder(boolean topEnabled,
boolean leftEnabled,
boolean bottomEnabled,
boolean rightEnabled)
topEnabled - true if top border is drawnleftEnabled - true if left border is drawnbottomEnabled - true if bottom border is drawnrightEnabled - true if right border is drawnpublic EnhancedLineBorder(Color color, int thickness)
color - the color of the borderthickness - the thickness of the borderpublic EnhancedLineBorder(Color color)
color - the color for the borderpublic EnhancedLineBorder()
public void setTopEnabled(boolean enabled)
enabled - true if draw top borderpublic boolean isTopEnabled()
public void setBottomEnabled(boolean enabled)
enabled - true if draw bottom borderpublic boolean isBottomEnabled()
public void setLeftEnabled(boolean enabled)
enabled - true if draw left borderpublic boolean isLeftEnabled()
public void setRightEnabled(boolean enabled)
enabled - true if draw right borderpublic boolean isRightEnabled()
public void setLineColor(Color lineColor)
lineColor - the border colorpublic Color getLineColor()
getLineColor in class LineBorderpublic void setThickness(int thickness)
thickness - the thicknesspublic int getThickness()
getThickness in class LineBorderpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder in interface BorderpaintBorder in class LineBorderc - the component for which this border is being paintedg - the paint graphicsx - the x position of the painted bordery - the y position of the painted borderwidth - the width of the painted borderheight - the height of the painted borderpublic Insets getBorderInsets(Component c)
getBorderInsets in interface BordergetBorderInsets in class AbstractBorderc - the component for which this border insets value appliespublic Insets getBorderInsets(Component c, Insets insets)
getBorderInsets in class LineBorderc - the component for which this border insets value appliesinsets - the object to be reinitializedTentackle - a domain driven enterprise framework