public class IconComponentDecoration extends AbstractComponentDecoration
AbstractComponentDecoration.DecorationPainter| Modifier and Type | Field and Description |
|---|---|
static AnchorLink |
DEFAULT_ANCHOR_LINK_WITH_OWNER
Default anchor link with the owner component on which the decorator will be attached.
|
decorationPainter| Constructor and Description |
|---|
IconComponentDecoration(JComponent owner)
Constructor specifying the component to be decorated.
|
IconComponentDecoration(JComponent owner,
Anchor ownerAnchor,
Anchor decorationAnchor)
Constructor specifying the component to be decorated and the anchor link with its owner (the decorated
component).
|
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).
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
followAndRepaint, followDecoratedComponent, getAnchorLink, getClippingAncestor, getDecoratedComponent, getPaintWhenDisabled, isVisible, setAnchorLink, setClippingAncestor, setPaintWhenDisabledpublic static final AnchorLink DEFAULT_ANCHOR_LINK_WITH_OWNER
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.IconComponentDecoration(JComponent, Anchor, Anchor)public IconComponentDecoration(JComponent owner, Anchor ownerAnchor, Anchor decorationAnchor)
IconComponentDecoration(JComponent,
AnchorLink).owner - Component to be decorated.ownerAnchor - Anchor on the owner to attach the decoration to.decorationAnchor - Anchor on the decoration to be attached to the owner anchor.IconComponentDecoration(JComponent, AnchorLink)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.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)
AbstractComponentDecorationsetVisible in class AbstractComponentDecorationvisible - True to make the decoration visible, false to make it invisible.AbstractComponentDecoration.setVisible(boolean)protected int getWidth()
AbstractComponentDecorationgetWidth in class AbstractComponentDecorationAbstractComponentDecoration.getWidth()protected int getHeight()
AbstractComponentDecorationgetHeight in class AbstractComponentDecorationAbstractComponentDecoration.getHeight()public void paint(Graphics g)
AbstractComponentDecorationpaint in class AbstractComponentDecorationg - Graphics to paint the decoration to.AbstractComponentDecoration.paint(Graphics)Copyright © 2015. All Rights Reserved.