java.lang.Object
com.inductiveautomation.ignition.client.icons.VectorIcon
All Implemented Interfaces:
Icon
Direct Known Subclasses:
InteractiveVectorIcon

public class VectorIcon extends Object implements Icon
A Vector icon is an Icon implementation that uses Java2D to draw the icon from a Shape object, rather than using a raster image.

The icon will use the component's foreground color as the fill color for the shape if the icon's color property is null.

  • Constructor Details

    • VectorIcon

      public VectorIcon(Shape shape, int width, int height, @Nullable Color color)
  • Method Details

    • fromPath

      public static VectorIcon fromPath(String path, int width, int height, double scale, Color color)
    • paintIcon

      public void paintIcon(Component c, Graphics graphics, int x, int y)
      Specified by:
      paintIcon in interface Icon
    • copy

      public VectorIcon copy()
    • scale

      public VectorIcon scale(double scale)
    • scaleToSize

      public VectorIcon scaleToSize(int squareSize)
    • setOpacity

      public VectorIcon setOpacity(float opacity)
    • setColor

      public VectorIcon setColor(Color color)
    • setOffset

      public VectorIcon setOffset(int x, int y)
    • setShape

      public void setShape(Shape shape)
    • setSize

      public void setSize(int w, int h)
    • getScaledInstance

      public VectorIcon getScaledInstance(int squareSize)
    • getIconWidth

      public int getIconWidth()
      Specified by:
      getIconWidth in interface Icon
    • getIconHeight

      public int getIconHeight()
      Specified by:
      getIconHeight in interface Icon