Package org.cytoscape.util.swing
Class TextIcon
java.lang.Object
org.cytoscape.util.swing.TextIcon
- All Implemented Interfaces:
Icon
Renders any text/font as an icon.
-
Constructor Summary
ConstructorDescriptionThe icon color is the target component's foreground.TextIcon
(String[] texts, Font[] fonts, Color[] colors, int width, int height, Integer... disabledLayers) The icon color is the target component's foreground.TextIcon
(String[] texts, Font font, Color[] colors, int width, int height, Integer... disabledLayers) The icon color is the target component's foreground.Create a new TextIcon from another TextIcon but with a new width/height. -
Method Summary
Modifier and TypeMethodDescriptionint
int
void
-
Constructor Details
-
TextIcon
-
TextIcon
The icon color is the target component's foreground. -
TextIcon
-
TextIcon
The icon color is the target component's foreground. -
TextIcon
public TextIcon(String[] texts, Font font, Color[] colors, int width, int height, Integer... disabledLayers) - Parameters:
texts
-font
-colors
-width
-height
-disabledLayers
- The indexes of the layers that must be transparent when the target component is disabled.
-
TextIcon
-
TextIcon
The icon color is the target component's foreground. -
TextIcon
public TextIcon(String[] texts, Font[] fonts, Color[] colors, int width, int height, Integer... disabledLayers) - Parameters:
texts
-fonts
-colors
-width
-height
-disabledLayers
- The indexes of the layers that must be transparent when the target component is disabled.
-
TextIcon
Create a new TextIcon from another TextIcon but with a new width/height.- Parameters:
icon
-width
- the new icon widthheight
- the new icon height
-
-
Method Details
-
paintIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
-