Package com.tagtraum.core.image
Class Icons
- java.lang.Object
-
- com.tagtraum.core.image.Icons
-
public class Icons extends Object
Special effects forIcon
s.- Author:
- Hendrik Schreiber
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Icon
createBufferedIcon(Icon icon)
Creates an icon backed by aBufferedImage
, which is guaranteed to quickly drawable.static Icon
createNegative(Icon icon)
Creates a negative version of the icon.static Icon
createTextIcon(JComponent component, Color color, String text)
Creates a text icon for a given font and color.static Icon
createTextIcon(JComponent component, Color color, String text, String badge)
Creates a text icon for a given font and color along with a color inverted badge.static Icon
createTextIcon(JComponent component, String text)
Creates a text icon for a given component using the component's font and foreground color.static Icon
createTextIcon(JComponent component, String text, int padding)
Creates a text icon for a given component using the component's font and foreground color.static Icon
createTextIcon(JComponent component, String text, String badge)
Creates a text icon for a given component using the component's font and foreground color along with a color inverted badge.static Icon
rotateDown(Icon icon)
Rotate the icon down.static Icon
rotateUp(Icon icon)
Rotate the icon up.
-
-
-
Method Detail
-
createBufferedIcon
public static Icon createBufferedIcon(Icon icon)
Creates an icon backed by aBufferedImage
, which is guaranteed to quickly drawable.- Parameters:
icon
- icon- Returns:
- buffered icon
-
rotateUp
public static Icon rotateUp(Icon icon)
Rotate the icon up.- Parameters:
icon
- icon- Returns:
- rotated icon
-
rotateDown
public static Icon rotateDown(Icon icon)
Rotate the icon down.- Parameters:
icon
- icon- Returns:
- rotated icon
-
createTextIcon
public static Icon createTextIcon(JComponent component, String text)
Creates a text icon for a given component using the component's font and foreground color.- Parameters:
component
- componenttext
- text- Returns:
- icon
-
createTextIcon
public static Icon createTextIcon(JComponent component, String text, String badge)
Creates a text icon for a given component using the component's font and foreground color along with a color inverted badge.- Parameters:
component
- componenttext
- textbadge
- badge- Returns:
- icon
-
createTextIcon
public static Icon createTextIcon(JComponent component, Color color, String text)
Creates a text icon for a given font and color.- Parameters:
color
- colortext
- text- Returns:
- icon
-
createTextIcon
public static Icon createTextIcon(JComponent component, Color color, String text, String badge)
Creates a text icon for a given font and color along with a color inverted badge.- Parameters:
color
- colortext
- textbadge
- badge- Returns:
- icon
-
createTextIcon
public static Icon createTextIcon(JComponent component, String text, int padding)
Creates a text icon for a given component using the component's font and foreground color.- Parameters:
component
- componenttext
- textpadding
- padding around the icon- Returns:
- icon
-
createNegative
public static Icon createNegative(Icon icon)
Creates a negative version of the icon.- Parameters:
icon
- icon- Returns:
- negative icon
- See Also:
ImageFX.NegativeOp
-
-