net.jbeans.ui.border
Class TiledMatteBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.EmptyBorder
javax.swing.border.MatteBorder
net.jbeans.ui.border.TiledMatteBorder
- All Implemented Interfaces:
- javax.swing.border.Border, java.io.Serializable
- public class TiledMatteBorder
- extends javax.swing.border.MatteBorder
- implements java.io.Serializable
A class which is similar to the javax.swing.border.MatteBorder.
This border, however, can alternate two tiled icons to create border.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- Masahiro Takatsuka (masa@jbeans.net)
- See Also:
MatteBorder
,
Serialized Form
Fields inherited from class javax.swing.border.MatteBorder |
color, tileIcon |
Fields inherited from class javax.swing.border.EmptyBorder |
bottom, left, right, top |
Constructor Summary |
TiledMatteBorder(javax.swing.Icon tileIcon,
javax.swing.Icon tileIconAlt)
Creates a matte border with the specified tile icon. |
TiledMatteBorder(int top,
int left,
int bottom,
int right,
javax.swing.Icon tileIcon,
javax.swing.Icon tileIconAlt)
Creates a matte border with the specified insets and tile icon. |
Method Summary |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the matte border. |
Methods inherited from class javax.swing.border.MatteBorder |
getBorderInsets, getBorderInsets, getBorderInsets, getMatteColor, getTileIcon, isBorderOpaque |
Methods inherited from class javax.swing.border.AbstractBorder |
getInteriorRectangle, getInteriorRectangle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tileIconAlt
protected javax.swing.Icon tileIconAlt
TiledMatteBorder
public TiledMatteBorder(int top,
int left,
int bottom,
int right,
javax.swing.Icon tileIcon,
javax.swing.Icon tileIconAlt)
- Creates a matte border with the specified insets and tile icon.
The two tile icons have to be the same size.
- Parameters:
top
- the top inset of the borderleft
- the left inset of the borderbottom
- the bottom inset of the borderright
- the right inset of the bordertileIcon
- the icon to be used for tiling the bordertileIconAlt
- the alternate icon to be used for tiling the border
TiledMatteBorder
public TiledMatteBorder(javax.swing.Icon tileIcon,
javax.swing.Icon tileIconAlt)
- Creates a matte border with the specified tile icon. The
insets will be calculated dynamically based on the size of
the tile icon, where the top and bottom will be equal to the
tile icon's height, and the left and right will be equal to
the tile icon's width.
- Parameters:
tileIcon
- the icon to be used for tiling the bordertileIconAlt
- the alternate icon to be used for tiling the border
paintBorder
public void paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
- Paints the matte border.
- Specified by:
paintBorder
in interface javax.swing.border.Border
Copyright © 2003 JBean project. All Rights Reserved.