|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.border.AbstractBorder
javax.swing.border.LineBorder
org.tentackle.ui.EnhancedLineBorder
public class EnhancedLineBorder
A LineBorder with the ability to enable/disable each of its four sides.
| Field Summary |
|---|
| Fields inherited from class javax.swing.border.LineBorder |
|---|
lineColor, roundedCorners, thickness |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
void |
getLineColor(Color lineColor)
Sets 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 |
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. |
| Methods inherited from class javax.swing.border.LineBorder |
|---|
createBlackLineBorder, createGrayLineBorder, getRoundedCorners, isBorderOpaque |
| Methods inherited from class javax.swing.border.AbstractBorder |
|---|
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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 drawn
public 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 drawn
public 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()
| Method Detail |
|---|
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 getLineColor(Color lineColor)
lineColor - the border colorpublic Color getLineColor()
getLineColor in class LineBorderpublic void setThickness(int thickness)
thickness - the thicknesspublic int getThickness()
getThickness in class LineBorder
public 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 LineBorderc - the component for which this border insets value applies
Insets object initialized to 0
public Insets getBorderInsets(Component c,
Insets insets)
getBorderInsets in class LineBorderc - the component for which this border insets value appliesinsets - the object to be reinitialized
insets object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||