|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.border.AbstractBorder javax.swing.border.EmptyBorder javax.swing.border.MatteBorder com.jidesoft.swing.IconBorder
public class IconBorder
IconBorder creates a border that places an Icon in the border on one or several sides. For example, if you want to an
icon on the left side, you make the left inset to be the width of the icon, and 0 for the top, right and bottom
insets. Then you can call setHorizontalIconAlignment(int)
and set it to TOP or CENTER or BOTTOM.
Field Summary |
---|
Fields inherited from class javax.swing.border.MatteBorder |
---|
color, tileIcon |
Fields inherited from class javax.swing.border.EmptyBorder |
---|
bottom, left, right, top |
Constructor Summary | |
---|---|
IconBorder(Icon icon)
Creates an IconBorder with an icon. |
|
IconBorder(Icon icon,
int verticalIconAlignment)
Creates an IconBorder with an icon. |
|
IconBorder(Insets borderInsets,
Icon icon)
Creates an IconBorder. |
|
IconBorder(int top,
int left,
int bottom,
int right,
Icon icon)
Creates an IconBorder. |
Method Summary | |
---|---|
int |
getHorizontalIconAlignment()
Gets the icon alignment on the x axis. |
int |
getVerticalIconAlignment()
Gets the icon alignment on the y axis. |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
|
void |
setHorizontalIconAlignment(int horizontalIconAlignment)
Sets the alignment of the icon relative to the component contents. |
void |
setVerticalIconAlignment(int verticalIconAlignment)
Sets the alignment of the icon relative to the component contents. |
Methods inherited from class javax.swing.border.MatteBorder |
---|
getBorderInsets, getBorderInsets, getBorderInsets, getMatteColor, getTileIcon, isBorderOpaque |
Methods inherited from class javax.swing.border.AbstractBorder |
---|
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IconBorder(Icon icon)
icon
- the icon.public IconBorder(Icon icon, int verticalIconAlignment)
icon
- the icon.verticalIconAlignment
- the vertical icon alignment.public IconBorder(Insets borderInsets, Icon icon)
borderInsets
- the insets of the border.icon
- the iconpublic IconBorder(int top, int left, int bottom, int right, Icon icon)
top
- the top inset of the borderleft
- the left inset of the borderbottom
- the bottom inset of the borderright
- the right inset of the bordericon
- the icon.Method Detail |
---|
public int getHorizontalIconAlignment()
public void setHorizontalIconAlignment(int horizontalIconAlignment)
horizontalIconAlignment
- one of the five SwingConstants listed above.public int getVerticalIconAlignment()
public void setVerticalIconAlignment(int verticalIconAlignment)
verticalIconAlignment
- one of the three SwingConstants listed above.public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
in interface Border
paintBorder
in class MatteBorder
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |