com.im.ijc.widgets.abstractwidget
Class TitledIconBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.TitledBorder
com.im.ijc.widgets.abstractwidget.TitledIconBorder
- All Implemented Interfaces:
- Serializable, Border
public class TitledIconBorder
- extends TitledBorder
An TitledBorder with ability to draw an icon and turn off the edge spacing.
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.border.TitledBorder |
ABOVE_BOTTOM, ABOVE_TOP, BELOW_BOTTOM, BELOW_TOP, border, BOTTOM, CENTER, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, EDGE_SPACING, LEADING, LEFT, RIGHT, TEXT_INSET_H, TEXT_SPACING, title, titleColor, titleFont, titleJustification, titlePosition, TOP, TRAILING |
| Methods inherited from class javax.swing.border.TitledBorder |
getBaseline, getBaselineResizeBehavior, getBorder, getBorderInsets, getFont, getMinimumSize, getTitle, getTitleColor, getTitleFont, getTitleJustification, getTitlePosition, isBorderOpaque, setBorder, setTitle, setTitleColor, setTitleFont, setTitleJustification, setTitlePosition |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
icon
protected Icon icon
TITLE_INSET_H
protected static final int TITLE_INSET_H
- See Also:
- Constant Field Values
TitledIconBorder
public TitledIconBorder()
TitledIconBorder
public TitledIconBorder(Border border)
setIcon
public void setIcon(Icon icon)
getIcon
public Icon getIcon()
setInternalBorderSpacingOn
public void setInternalBorderSpacingOn(boolean internalBorderSpacingOn)
getBorderInsets
public Insets getBorderInsets(Component c,
Insets i)
- Overrides:
getBorderInsets in class TitledBorder
paintBorder
public 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.
- Specified by:
paintBorder in interface Border- Overrides:
paintBorder in class TitledBorder
- Parameters:
c - 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 border