Class ShapeIcon
- java.lang.Object
- 
- com.inductiveautomation.ignition.client.util.ShapeIcon
 
- 
- All Implemented Interfaces:
- javax.swing.Icon
 - Direct Known Subclasses:
- JsonEditor.HierarchyIcon
 
 public class ShapeIcon extends java.lang.Object implements javax.swing.IconHandy class that lets you use a Shape as an icon. Will paint with anti-alias on.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ShapeIconcreateScaledInstance(double scale)static java.awt.geom.Path2D.DoublefromSvgPolygon(java.lang.String polygonPoints)Creates a polygon path from a string which would be of the same format as an SVG polygon element's points attribute.intgetIconHeight()intgetIconWidth()voidpaintIcon(java.awt.Component c, java.awt.Graphics graphics, int x, int y)ShapeIconsetColor(java.awt.Color color)ShapeIconsetOffset(int x, int y)
 
- 
- 
- 
Method Detail- 
paintIconpublic void paintIcon(java.awt.Component c, java.awt.Graphics graphics, int x, int y)- Specified by:
- paintIconin interface- javax.swing.Icon
 
 - 
setColorpublic ShapeIcon setColor(java.awt.Color color) 
 - 
setOffsetpublic ShapeIcon setOffset(int x, int y) 
 - 
getIconWidthpublic int getIconWidth() - Specified by:
- getIconWidthin interface- javax.swing.Icon
 
 - 
getIconHeightpublic int getIconHeight() - Specified by:
- getIconHeightin interface- javax.swing.Icon
 
 - 
createScaledInstancepublic ShapeIcon createScaledInstance(double scale) 
 - 
fromSvgPolygonpublic static java.awt.geom.Path2D.Double fromSvgPolygon(java.lang.String polygonPoints) Creates a polygon path from a string which would be of the same format as an SVG polygon element's points attribute. https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/points
 
- 
 
-