public class MacBadgeRenderer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Font |
BADGE_FONT |
protected Color |
fActiveUnselectedColor |
protected Color |
fInactiveUnselectedColor |
protected com.explodingpixels.macwidgets.MacBadgeRenderer.CustomJLabel |
fLabel |
protected boolean |
fSelected |
protected Color |
fSelectedColor |
protected Color |
fTextColor |
| Constructor and Description |
|---|
MacBadgeRenderer(Color selectedColor,
Color activeUnselectedColor,
Color inactiveUnselectedColor,
Color textColor)
Creates a badge renderer.
|
| Modifier and Type | Method and Description |
|---|---|
JComponent |
getComponent()
Gets the user interface component to representing this
SourceListCountBadgeRenderer. |
void |
setState(int count,
boolean selected)
Sets the state to use when drawing the badge.
|
void |
setState(String value,
boolean selected)
Sets the state to use when drawing the badge.
|
protected com.explodingpixels.macwidgets.MacBadgeRenderer.CustomJLabel fLabel
protected boolean fSelected
protected static Font BADGE_FONT
protected final Color fSelectedColor
protected final Color fActiveUnselectedColor
protected final Color fInactiveUnselectedColor
protected final Color fTextColor
public void setState(int count,
boolean selected)
count - the count value to draw in the center of the badge.selected - true if the badge should be rendered in a selected state.public void setState(String value, boolean selected)
value - the text value to draw in the center of the badge.selected - true if the badge should be rendered in a selected state.public JComponent getComponent()
SourceListCountBadgeRenderer.
The returned JComponent should be added to a container that will be displayed.SourceListCountBadgeRenderer.