Class RMShapeIcon

java.lang.Object
com.inductiveautomation.rm.swing.RMShapeIcon
All Implemented Interfaces:
Icon

public class RMShapeIcon extends Object implements Icon
An icon to paint a shape.
  • Constructor Details

    • RMShapeIcon

      public RMShapeIcon(RMShape aShape)
      Creates a new ShapeIcon.
    • RMShapeIcon

      public RMShapeIcon(RMShape aShape, double aWidth, double aHeight)
      Creates a new ShapeIcon.
    • RMShapeIcon

      public RMShapeIcon(Object aSource, double aWidth, double aHeight)
      Creates a shape painter from any objects (assumed to be a document source).
  • Method Details

    • getShape

      public RMShape getShape()
      Returns the shape.
    • setShape

      public void setShape(RMShape aShape)
      Sets the shape.
    • getIconWidth

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

      public int getIconHeight()
      Returns height.
      Specified by:
      getIconHeight in interface Icon
    • setSize

      public void setSize(double aWidth, double aHeight)
      Sets the size.
    • paintIcon

      public void paintIcon(Component aComponent, Graphics aGraphics, int x, int y)
      Paints the icon.
      Specified by:
      paintIcon in interface Icon