com.google.code.validationframework.swing.resulthandler.bool
Class IconBooleanFeedback

java.lang.Object
  extended by com.google.code.validationframework.swing.resulthandler.AbstractIconFeedback<Boolean>
      extended by com.google.code.validationframework.swing.resulthandler.bool.IconBooleanFeedback
All Implemented Interfaces:
com.google.code.validationframework.api.common.Disposable, com.google.code.validationframework.api.resulthandler.ResultHandler<Boolean>

public class IconBooleanFeedback
extends AbstractIconFeedback<Boolean>

Concrete implementation of an icon feedback result handler handling boolean results.

See Also:
AbstractIconFeedback

Field Summary
static Icon DEFAULT_INVALID_ICON
          Default icon to be used for invalid results.
static Icon DEFAULT_VALID_ICON
          Default icon to be used for valid results.
 
Constructor Summary
IconBooleanFeedback(JComponent owner)
          Constructor specifying the component to which the decoration will be attached.
By default, the decoration will show the default valid and invalid icons without any tooltip.
IconBooleanFeedback(JComponent owner, Icon validIcon, Icon invalidIcon)
          Constructor specifying the component to which the decoration will be attached, as well as the valid and invalid icons.
By default, the icons will have no tooltip.
IconBooleanFeedback(JComponent owner, Icon invalidIcon, String invalidText)
          Constructor specifying the component to which the decoration will be attached, as well as the invalid icon and its tooltip text.
By default, the decoration will have no valid icon.
IconBooleanFeedback(JComponent owner, Icon validIcon, String validText, Icon invalidIcon, String invalidText)
          Constructor specifying the component to which the decoration will be attached, as well as the valid and invalid icons and their tooltip texts.
IconBooleanFeedback(JComponent owner, String invalidText)
          Constructor specifying the component to which the decoration will be attached and the tooltip text for the invalid icon.
By default, the decoration will use the default invalid icon, but will have no valid icon.
IconBooleanFeedback(JComponent owner, String validText, String invalidText)
          Constructor specifying the component to which the decoration will be attached, as well as the tooltip texts for the valid and invalid icons.
The default valid and invalid icons will be used.
 
Method Summary
 Icon getInvalidIcon()
          Gets the icon used for invalid results.
 String getInvalidText()
          Gets the tooltip text for the invalid icon.
 Icon getValidIcon()
          Gets the icon used for valid results.
 String getValidText()
          Gets the tooltip text for the valid icon.
 void handleResult(Boolean valid)
           
 void setInvalidIcon(Icon invalidIcon)
          Sets the icon to be used for invalid results.
 void setInvalidText(String invalidText)
          Sets the tooltip text for the invalid icon.
 void setValidIcon(Icon validIcon)
          Sets the icon to be used for valid results.
 void setValidText(String validText)
          Sets the tooltip text for the valid icon.
 
Methods inherited from class com.google.code.validationframework.swing.resulthandler.AbstractIconFeedback
attach, attach, detach, dispose, getAnchorLink, getClippingAncestor, getDecoratedComponent, getIcon, getToolTipText, hideIcon, setAnchorLink, setClippingAncestor, setIcon, setToolTipText, showIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_VALID_ICON

public static final Icon DEFAULT_VALID_ICON
Default icon to be used for valid results.


DEFAULT_INVALID_ICON

public static final Icon DEFAULT_INVALID_ICON
Default icon to be used for invalid results.

Constructor Detail

IconBooleanFeedback

public IconBooleanFeedback(JComponent owner)
Constructor specifying the component to which the decoration will be attached.
By default, the decoration will show the default valid and invalid icons without any tooltip.

Parameters:
owner - Component to which the decoration will be attached.

IconBooleanFeedback

public IconBooleanFeedback(JComponent owner,
                           String invalidText)
Constructor specifying the component to which the decoration will be attached and the tooltip text for the invalid icon.
By default, the decoration will use the default invalid icon, but will have no valid icon.

Parameters:
owner - Component to which the decoration will be attached.
invalidText - Tooltip text for the invalid icon.

IconBooleanFeedback

public IconBooleanFeedback(JComponent owner,
                           Icon invalidIcon,
                           String invalidText)
Constructor specifying the component to which the decoration will be attached, as well as the invalid icon and its tooltip text.
By default, the decoration will have no valid icon.

Parameters:
owner - Component to which the decoration will be attached.
invalidIcon - Icon to be used for invalid results.
invalidText - Tooltip text for the invalid icon.

IconBooleanFeedback

public IconBooleanFeedback(JComponent owner,
                           Icon validIcon,
                           Icon invalidIcon)
Constructor specifying the component to which the decoration will be attached, as well as the valid and invalid icons.
By default, the icons will have no tooltip.

Parameters:
owner - Component to which the decoration will be attached.
validIcon - Icon to be used for valid results.
invalidIcon - Icon to be used for invalid results.

IconBooleanFeedback

public IconBooleanFeedback(JComponent owner,
                           String validText,
                           String invalidText)
Constructor specifying the component to which the decoration will be attached, as well as the tooltip texts for the valid and invalid icons.
The default valid and invalid icons will be used.

Parameters:
owner - Component to which the decoration will be attached.
validText - Tooltip text for the valid icon.
invalidText - Tooltip text for the invalid icon.

IconBooleanFeedback

public IconBooleanFeedback(JComponent owner,
                           Icon validIcon,
                           String validText,
                           Icon invalidIcon,
                           String invalidText)
Constructor specifying the component to which the decoration will be attached, as well as the valid and invalid icons and their tooltip texts.

Parameters:
owner - Component to which the decoration will be attached.
validIcon - Icon to be used for valid results.
validText - Tooltip text for the valid icon.
invalidIcon - Icon to be used for invalid results.
invalidText - Tooltip text for the invalid icon.
Method Detail

getValidIcon

public Icon getValidIcon()
Gets the icon used for valid results.

Returns:
Icon used for valid results.

setValidIcon

public void setValidIcon(Icon validIcon)
Sets the icon to be used for valid results.

Parameters:
validIcon - Icon to be used for valid results.

getValidText

public String getValidText()
Gets the tooltip text for the valid icon.

Returns:
Tooltip text for the valid icon.

setValidText

public void setValidText(String validText)
Sets the tooltip text for the valid icon.

Parameters:
validText - Tooltip text for the valid icon.

getInvalidIcon

public Icon getInvalidIcon()
Gets the icon used for invalid results.

Returns:
Icon used for invalid results.

setInvalidIcon

public void setInvalidIcon(Icon invalidIcon)
Sets the icon to be used for invalid results.

Parameters:
invalidIcon - Icon to be used for invalid results.

getInvalidText

public String getInvalidText()
Gets the tooltip text for the invalid icon.

Returns:
Tooltip text for the invalid icon.

setInvalidText

public void setInvalidText(String invalidText)
Sets the tooltip text for the invalid icon.

Parameters:
invalidText - Tooltip text for the invalid icon.

handleResult

public void handleResult(Boolean valid)
See Also:
ResultHandler.handleResult(Object)


Copyright © 2013. All Rights Reserved.