public class IconBooleanFeedback extends AbstractIconFeedback<Boolean>
AbstractIconFeedback| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
attach, attach, detach, dispose, getAnchorLink, getClippingAncestor, getDecoratedComponent, getIcon, getToolTipText, hideIcon, setAnchorLink, setClippingAncestor, setIcon, setToolTipText, showIconpublic static final Icon DEFAULT_VALID_ICON
public static final Icon DEFAULT_INVALID_ICON
public IconBooleanFeedback(JComponent owner)
owner - Component to which the decoration will be attached.public IconBooleanFeedback(JComponent owner, String invalidText)
owner - Component to which the decoration will be attached.invalidText - Tooltip text for the invalid icon.public IconBooleanFeedback(JComponent owner, Icon invalidIcon, String invalidText)
owner - Component to which the decoration will be attached.invalidIcon - Icon to be used for invalid results.invalidText - Tooltip text for the invalid icon.public IconBooleanFeedback(JComponent owner, Icon validIcon, Icon invalidIcon)
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.public IconBooleanFeedback(JComponent owner, String validText, String invalidText)
owner - Component to which the decoration will be attached.validText - Tooltip text for the valid icon.invalidText - Tooltip text for the invalid icon.public IconBooleanFeedback(JComponent owner, Icon validIcon, String validText, Icon invalidIcon, String invalidText)
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.public Icon getValidIcon()
public void setValidIcon(Icon validIcon)
validIcon - Icon to be used for valid results.public String getValidText()
public void setValidText(String validText)
validText - Tooltip text for the valid icon.public Icon getInvalidIcon()
public void setInvalidIcon(Icon invalidIcon)
invalidIcon - Icon to be used for invalid results.public String getInvalidText()
public void setInvalidText(String invalidText)
invalidText - Tooltip text for the invalid icon.public void handleResult(Boolean valid)
ResultHandler.handleResult(Object)Copyright © 2015. All Rights Reserved.