|
||||||||||
| 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
public abstract class AbstractComponentDecoration
Abstract implementation of a decoration that can be attached to a component.
Concrete implementations will just need to provide the size and do the painting on the already-computed location.
| Nested Class Summary | |
|---|---|
protected class |
AbstractComponentDecoration.DecorationPainter
Entity responsible of calling the paint(Graphics) method. |
| Field Summary | |
|---|---|
protected AbstractComponentDecoration.DecorationPainter |
decorationPainter
Decoration painter component. |
| Constructor Summary | |
|---|---|
AbstractComponentDecoration(JComponent decoratedComponent,
AnchorLink anchorLink)
Constructor specifying the component to be decorated and the anchor link between the decorated component and its decoration. |
|
| Method Summary | |
|---|---|
void |
dispose()
|
void |
followAndRepaint()
Triggers a repaint of the component decoration. |
protected void |
followDecoratedComponent()
Updates the decoration painter with respect to the decorated component. |
AnchorLink |
getAnchorLink()
Gets the anchor link between the decorated component and its decoration. |
JComponent |
getClippingAncestor()
Gets the custom clipping ancestor component that will be used to clip the decoration. |
JComponent |
getDecoratedComponent()
Gets the decorated component to which the decoration is attached. |
protected abstract int |
getHeight()
Returns the height of the decoration. |
protected abstract int |
getWidth()
Returns the width of the decoration. |
boolean |
isVisible()
States whether the decoration is visible or not. |
abstract void |
paint(Graphics g)
Paints the decoration in the specified graphics. |
void |
setAnchorLink(AnchorLink anchorLink)
Sets the anchor link between the component and its decoration. |
void |
setClippingAncestor(JComponent decorationClippingAncestor)
Sets the custom clipping ancestor component that will be used to clip the decoration. |
void |
setVisible(boolean visible)
Sets the visibility of the decoration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AbstractComponentDecoration.DecorationPainter decorationPainter
DECORATION_LAYER_OFFSET,
attach(JComponent),
getDecoratedComponentLayerInLayeredPane(javax.swing.JLayeredPane),
decorationPainter| Constructor Detail |
|---|
public AbstractComponentDecoration(JComponent decoratedComponent,
AnchorLink anchorLink)
decoratedComponent - Component to be decorated.anchorLink - Anchor link between the decorated component and its decoration.| Method Detail |
|---|
public JComponent getDecoratedComponent()
public JComponent getClippingAncestor()
public void setClippingAncestor(JComponent decorationClippingAncestor)
decorationClippingAncestor - Clipping ancestor or null topublic AnchorLink getAnchorLink()
public void setAnchorLink(AnchorLink anchorLink)
anchorLink - Anchor link between the component and its decoration.public boolean isVisible()
public void setVisible(boolean visible)
visible - True to make the decoration visible, false to make it invisible.protected void followDecoratedComponent()
public void dispose()
dispose in interface com.google.code.validationframework.api.common.DisposableDisposablepublic void followAndRepaint()
followDecoratedComponent()protected abstract int getWidth()
protected abstract int getHeight()
public abstract void paint(Graphics g)
g - Graphics to paint the decoration to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||