Package com.portal.ctrl
Class PSectionBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.CompoundBorder
com.portal.ctrl.PSectionBorder
- All Implemented Interfaces:
Serializable
,Border
Border which allows you to control which sides get drawn. The left/right
sides are drawn partially, not down the entire side of the encompassing
component. The default height of the lines down the side is 20 pixels.
This is intended to represent a container header in the Portal look invalid input: '&'
feel.
- Version:
- %version: 3 % %date_modified: Fri Sep 28 09:51:35 2001 %
- Author:
- kapono
- See Also:
-
Field Summary
Fields inherited from class javax.swing.border.CompoundBorder
insideBorder, outsideBorder
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a compound border consisting of a line border and an empty border.PSectionBorder
(boolean top, boolean bottom, boolean left, boolean right, int inset) Creates a compound border with the specified sides drawn for the internal line border and a left inset as specified. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawBottom
(boolean b) Determines if the bottom line of the border is drawnvoid
drawLeft
(boolean b) Determines if the left line of the border is drawnvoid
drawRight
(boolean b) Determines if the right line of the border is drawnvoid
drawTop
(boolean b) Determines if the top line of the border is drawnvoid
setThickness
(int thick) Determines the thickness of the line used to render the borderMethods inherited from class javax.swing.border.CompoundBorder
getBorderInsets, getInsideBorder, getOutsideBorder, isBorderOpaque, paintBorder
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
-
Constructor Details
-
PSectionBorder
public PSectionBorder()Creates a compound border consisting of a line border and an empty border. The line border has its left and top sides drawn, and the empty border has a left inset of 5 pixels. The default thickness of the line border of 1. -
PSectionBorder
public PSectionBorder(boolean top, boolean bottom, boolean left, boolean right, int inset) Creates a compound border with the specified sides drawn for the internal line border and a left inset as specified.- Parameters:
top
- Flag to determine if the top of the border is drawnbottom
- Flag to determine if the bottom of the border is drawnleft
- Flag to determine if the left of the border is drawnright
- Flag to determine if the right of the border is drawninset
- The indent amount
-
-
Method Details
-
setThickness
public void setThickness(int thick) Determines the thickness of the line used to render the border- Parameters:
thick
- The line thickness when drawn
-
drawTop
public void drawTop(boolean b) Determines if the top line of the border is drawn- Parameters:
b
- if true, the line is drawn. If false, it is not.
-
drawBottom
public void drawBottom(boolean b) Determines if the bottom line of the border is drawn- Parameters:
b
- if true, the line is drawn. If false, it is not.
-
drawLeft
public void drawLeft(boolean b) Determines if the left line of the border is drawn- Parameters:
b
- if true, the line is drawn. If false, it is not.
-
drawRight
public void drawRight(boolean b) Determines if the right line of the border is drawn- Parameters:
b
- if true, the line is drawn. If false, it is not.
-