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 Summary
All 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
- 
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics graphics, int x, int y)- Specified by:
 paintIconin interfacejavax.swing.Icon
 
- 
setColor
public ShapeIcon setColor(java.awt.Color color)
 
- 
setOffset
public ShapeIcon setOffset(int x, int y)
 
- 
getIconWidth
public int getIconWidth()
- Specified by:
 getIconWidthin interfacejavax.swing.Icon
 
- 
getIconHeight
public int getIconHeight()
- Specified by:
 getIconHeightin interfacejavax.swing.Icon
 
- 
createScaledInstance
public ShapeIcon createScaledInstance(double scale)
 
- 
fromSvgPolygon
public 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 
 - 
 
 -