com.im.ijc.widgets/1 5.9.1

com.im.ijc.widgets.abstractwidget
Class TitledIconBorder

java.lang.Object
  extended by javax.swing.border.AbstractBorder
      extended by javax.swing.border.TitledBorder
          extended by 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

Field Summary
protected  Icon icon
           
protected static int TITLE_INSET_H
           
 
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
 
Constructor Summary
TitledIconBorder()
           
TitledIconBorder(Border border)
           
 
Method Summary
 Insets getBorderInsets(Component c, Insets i)
           
 Icon getIcon()
           
 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 setIcon(Icon icon)
           
 void setInternalBorderSpacingOn(boolean internalBorderSpacingOn)
           
 
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 javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

icon

protected Icon icon

TITLE_INSET_H

protected static final int TITLE_INSET_H
See Also:
Constant Field Values
Constructor Detail

TitledIconBorder

public TitledIconBorder()

TitledIconBorder

public TitledIconBorder(Border border)
Method Detail

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 painted
g - The paint graphics
x - The x position of the painted border
y - The y position of the painted border
width - The width of the painted border
height - The height of the painted border

com.im.ijc.widgets/1 5.9.1