com.google.code.validationframework.swing.resulthandler
Class AbstractIconFeedback<RHI>

java.lang.Object
  extended by com.google.code.validationframework.swing.resulthandler.AbstractIconFeedback<RHI>
Type Parameters:
RHI - Type of result handler input.
All Implemented Interfaces:
com.google.code.validationframework.api.common.Disposable, com.google.code.validationframework.api.resulthandler.ResultHandler<RHI>
Direct Known Subclasses:
AbstractCellIconFeedback, IconBooleanFeedback

public abstract class AbstractIconFeedback<RHI>
extends Object
implements com.google.code.validationframework.api.resulthandler.ResultHandler<RHI>, com.google.code.validationframework.api.common.Disposable

Abstract implementation of a result handler using an IconComponentDecoration to show feedback to the user on component.

Concrete classes only need to implement the ResultHandler.handleResult(Object) method by calling the showIcon() and hideIcon() methods according to the result.


Constructor Summary
AbstractIconFeedback(JComponent decoratedComponent)
           
 
Method Summary
 void attach(JComponent decoratedComponent)
           
 void attach(JComponent decoratedComponent, AnchorLink anchorLinkWithOwner)
           
 void detach()
           
 void dispose()
           
 AnchorLink getAnchorLink()
           
 JComponent getClippingAncestor()
           
 JComponent getDecoratedComponent()
           
protected  Icon getIcon()
           
protected  String getToolTipText()
           
protected  void hideIcon()
           
 void setAnchorLink(AnchorLink anchorLink)
           
 void setClippingAncestor(JComponent decorationClippingAncestor)
           
protected  void setIcon(Icon icon)
           
protected  void setToolTipText(String text)
           
protected  void showIcon()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.code.validationframework.api.resulthandler.ResultHandler
handleResult
 

Constructor Detail

AbstractIconFeedback

public AbstractIconFeedback(JComponent decoratedComponent)
Method Detail

attach

public void attach(JComponent decoratedComponent)

attach

public void attach(JComponent decoratedComponent,
                   AnchorLink anchorLinkWithOwner)

detach

public void detach()

getDecoratedComponent

public JComponent getDecoratedComponent()
See Also:
AbstractComponentDecoration.getDecoratedComponent()

getClippingAncestor

public JComponent getClippingAncestor()
See Also:
AbstractComponentDecoration.getClippingAncestor()

setClippingAncestor

public void setClippingAncestor(JComponent decorationClippingAncestor)
See Also:
AbstractComponentDecoration.setClippingAncestor(JComponent)

getAnchorLink

public AnchorLink getAnchorLink()
See Also:
AbstractComponentDecoration.getAnchorLink()

setAnchorLink

public void setAnchorLink(AnchorLink anchorLink)
See Also:
AbstractComponentDecoration.setAnchorLink(AnchorLink)

getIcon

protected Icon getIcon()
See Also:
IconComponentDecoration.getIcon()

setIcon

protected void setIcon(Icon icon)
See Also:
IconComponentDecoration.setIcon(Icon)

getToolTipText

protected String getToolTipText()
See Also:
IconComponentDecoration.getToolTipText()

setToolTipText

protected void setToolTipText(String text)
See Also:
IconComponentDecoration.setToolTipText(String)

showIcon

protected void showIcon()
See Also:
IconComponentDecoration.setVisible(boolean)

hideIcon

protected void hideIcon()
See Also:
IconComponentDecoration.setVisible(boolean)

dispose

public void dispose()
Specified by:
dispose in interface com.google.code.validationframework.api.common.Disposable
See Also:
Disposable.dispose()


Copyright © 2013. All Rights Reserved.