Package org.jdesktop.swingx.border
Class MatteBorderExt
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.EmptyBorder
javax.swing.border.MatteBorder
org.jdesktop.swingx.border.MatteBorderExt
- All Implemented Interfaces:
Serializable
,Border
Matte border that allows specialized icons for corners and sides.
- Author:
- Ramesh Gupta
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.border.MatteBorder
color, tileIcon
Fields inherited from class javax.swing.border.EmptyBorder
bottom, left, right, top
-
Constructor Summary
ConstructorsConstructorDescriptionMatteBorderExt
(int top, int left, int bottom, int right, Color matteColor) MatteBorderExt
(int top, int left, int bottom, int right, Icon tileIcon) MatteBorderExt
(int top, int left, int bottom, int right, Icon[] tileIcons) Draws a matte border using specialized icons for corners and sides.MatteBorderExt
(Insets borderInsets, Color matteColor) MatteBorderExt
(Insets borderInsets, Icon tileIcon) MatteBorderExt
(Icon tileIcon) -
Method Summary
Modifier and TypeMethodDescriptionprotected Icon
Only called by paintBorder()Icon[]
Returns the icons used by this borderprotected void
void
paintBorder
(Component c, Graphics g, int x, int y, int width, int height) protected void
paintBottom
(Component c, Graphics g, int x, int y, int width, int height) Only called by paintBorder()protected void
paintBottomLeft
(Component c, Graphics g, int x, int y, int width, int height) Only called by paintBorder()protected void
paintBottomRight
(Component c, Graphics g, int x, int y, int width, int height) Only called by paintBorder()protected void
Only called by paintBorder()protected void
paintRight
(Component c, Graphics g, int x, int y, int width, int height) Only called by paintBorder()protected void
Only called by paintBorder()protected void
paintTopLeft
(Component c, Graphics g, int x, int y, int width, int height) Only called by paintBorder()protected void
paintTopRight
(Component c, Graphics g, int x, int y, int width, int height) Only called by paintBorder()Methods inherited from class javax.swing.border.MatteBorder
getBorderInsets, getBorderInsets, getMatteColor, getTileIcon, isBorderOpaque
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
-
Field Details
-
tileIcons
-
-
Constructor Details
-
MatteBorderExt
Draws a matte border using specialized icons for corners and sides. If tileIcons is null, or if the length of tileIcons array is less than 2, this defaults to thesuperclass
behavior. Otherwise, tileIcons must specify icons in clockwise order, starting with the top-left icon at index zero, culminating with the left icon at index 7. If the length of the tileIcons array is greater than 1, but less than 8, then tileIcons[0] is used to paint the corners, and tileIcons[1] is used to paint the sides, with icons rotated as necessary. Other icons, if any, are ignored.- Parameters:
top
- top insetleft
- left insetbottom
- bottom insetright
- right insettileIcons
- array of icons starting with top-left in index 0, continuing clockwise through the rest of the indices
-
MatteBorderExt
-
MatteBorderExt
-
MatteBorderExt
-
MatteBorderExt
-
MatteBorderExt
- See Also:
-
-
Method Details
-
getTileIcons
Returns the icons used by this border- Returns:
- the icons used by this border
-
paintBorder
- Specified by:
paintBorder
in interfaceBorder
- Overrides:
paintBorder
in classMatteBorder
-
paint
-
paintTopLeft
Only called by paintBorder() -
paintTop
Only called by paintBorder() -
paintTopRight
Only called by paintBorder() -
paintRight
Only called by paintBorder() -
paintBottomRight
Only called by paintBorder() -
paintBottom
Only called by paintBorder() -
paintBottomLeft
Only called by paintBorder() -
paintLeft
Only called by paintBorder() -
getDefaultIcon
Only called by paintBorder()
-