|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.code.validationframework.swing.decoration.AbstractComponentDecoration
com.google.code.validationframework.swing.decoration.IconComponentDecoration
public class IconComponentDecoration
Component decoration showing an icon, possibly with a tooltip.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.code.validationframework.swing.decoration.AbstractComponentDecoration |
|---|
AbstractComponentDecoration.DecorationPainter |
| Field Summary | |
|---|---|
static AnchorLink |
DEFAULT_ANCHOR_LINK_WITH_OWNER
Default anchor link with the owner component on which the decorator will be attached. |
| Fields inherited from class com.google.code.validationframework.swing.decoration.AbstractComponentDecoration |
|---|
decorationPainter |
| Constructor Summary | |
|---|---|
IconComponentDecoration(JComponent owner)
Constructor specifying the component to be decorated. |
|
IconComponentDecoration(JComponent owner,
AnchorLink anchorLinkWithOwner)
Constructor specifying the component to be decorated and the anchor link with its owner (the decorated component). |
|
IconComponentDecoration(JComponent owner,
AnchorLink anchorLinkWithOwner,
Icon icon)
Constructor specifying the component to be decorated and the anchor link with its owner (the decorated component). |
|
IconComponentDecoration(JComponent owner,
Icon icon)
Constructor specifying the component to be decorated and the anchor link with its owner (the decorated component). |
|
| Method Summary | |
|---|---|
void |
dispose()
|
AnchorLink |
getAnchorLinkWithToolTip()
Gets the anchor link used to slave the tooltip to this decoration. |
protected int |
getHeight()
Returns the height of the decoration. |
Icon |
getIcon()
Gets the decoration icon. |
String |
getToolTipText()
Gets the text for the tooltip to be used on this decoration. |
protected int |
getWidth()
Returns the width of the decoration. |
void |
paint(Graphics g)
Paints the decoration in the specified graphics. |
void |
setAnchorLinkWithToolTip(AnchorLink anchorLinkWithToolTip)
Sets the anchor link used to slave the tooltip to this decoration. |
void |
setIcon(Icon icon)
Sets the decoration. |
void |
setToolTipText(String text)
Sets the text for the tooltip to be used on this decoration. |
void |
setVisible(boolean visible)
Sets the visibility of the decoration. |
| Methods inherited from class com.google.code.validationframework.swing.decoration.AbstractComponentDecoration |
|---|
followAndRepaint, followDecoratedComponent, getAnchorLink, getClippingAncestor, getDecoratedComponent, isVisible, setAnchorLink, setClippingAncestor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final AnchorLink DEFAULT_ANCHOR_LINK_WITH_OWNER
| Constructor Detail |
|---|
public IconComponentDecoration(JComponent owner)
owner - Component to be decorated.
public IconComponentDecoration(JComponent owner,
AnchorLink anchorLinkWithOwner)
owner - Component to be decorated.anchorLinkWithOwner - Anchor link between the decorated component and the decoration icon.
public IconComponentDecoration(JComponent owner,
Icon icon)
owner - Component to be decorated.icon - Decoration icon.
public IconComponentDecoration(JComponent owner,
AnchorLink anchorLinkWithOwner,
Icon icon)
owner - Component to be decorated.anchorLinkWithOwner - Anchor link between the decorated component and the decoration icon.icon - Decoration icon.| Method Detail |
|---|
public void dispose()
dispose in interface com.google.code.validationframework.api.common.Disposabledispose in class AbstractComponentDecorationAbstractComponentDecoration.dispose()public Icon getIcon()
public void setIcon(Icon icon)
icon - Decoration icon to be attached to the owner component.public String getToolTipText()
public void setToolTipText(String text)
text - Tooltip text for this decoration, or null if this decoration should have no tooltip.public AnchorLink getAnchorLinkWithToolTip()
public void setAnchorLinkWithToolTip(AnchorLink anchorLinkWithToolTip)
anchorLinkWithToolTip - Anchor link to be used to slave the tooltip to this decoration.public void setVisible(boolean visible)
AbstractComponentDecoration
setVisible in class AbstractComponentDecorationvisible - True to make the decoration visible, false to make it invisible.AbstractComponentDecoration.setVisible(boolean)protected int getWidth()
AbstractComponentDecoration
getWidth in class AbstractComponentDecorationAbstractComponentDecoration.getWidth()protected int getHeight()
AbstractComponentDecoration
getHeight in class AbstractComponentDecorationAbstractComponentDecoration.getHeight()public void paint(Graphics g)
AbstractComponentDecoration
paint in class AbstractComponentDecorationg - Graphics to paint the decoration to.AbstractComponentDecoration.paint(Graphics)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||