Class ShapeIcon
java.lang.Object
com.inductiveautomation.ignition.client.util.ShapeIcon
- All Implemented Interfaces:
Icon
- Direct Known Subclasses:
JsonEditor.HierarchyIcon
Handy class that lets you use a Shape as an icon. Will paint with anti-alias on.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateScaledInstance
(double scale) static Path2D.Double
fromSvgPolygon
(String polygonPoints) Creates a polygon path from a string which would be of the same format as an SVG polygon element's points attribute.int
int
void
setOffset
(int x, int y)
-
Field Details
-
shape
-
color
-
offX
protected int offX -
offY
protected int offY
-
-
Constructor Details
-
ShapeIcon
-
ShapeIcon
-
-
Method Details
-
paintIcon
-
setColor
-
setOffset
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
-
createScaledInstance
-
fromSvgPolygon
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
-