Package com.inductiveautomation.rm.swing
Class RMShapeIcon
- java.lang.Object
-
- com.inductiveautomation.rm.swing.RMShapeIcon
-
- All Implemented Interfaces:
javax.swing.Icon
public class RMShapeIcon extends java.lang.Object implements javax.swing.Icon
An icon to paint a shape.
-
-
Constructor Summary
Constructors Constructor Description RMShapeIcon(RMShape aShape)
Creates a new ShapeIcon.RMShapeIcon(RMShape aShape, double aWidth, double aHeight)
Creates a new ShapeIcon.RMShapeIcon(java.lang.Object aSource, double aWidth, double aHeight)
Creates a shape painter from any objects (assumed to be a document source).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIconHeight()
Returns height.int
getIconWidth()
Returns width.RMShape
getShape()
Returns the shape.void
paintIcon(java.awt.Component aComponent, java.awt.Graphics aGraphics, int x, int y)
Paints the icon.void
setShape(RMShape aShape)
Sets the shape.void
setSize(double aWidth, double aHeight)
Sets the size.
-
-
-
Constructor Detail
-
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(java.lang.Object aSource, double aWidth, double aHeight)
Creates a shape painter from any objects (assumed to be a document source).
-
-
Method Detail
-
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 interfacejavax.swing.Icon
-
getIconHeight
public int getIconHeight()
Returns height.- Specified by:
getIconHeight
in interfacejavax.swing.Icon
-
setSize
public void setSize(double aWidth, double aHeight)
Sets the size.
-
paintIcon
public void paintIcon(java.awt.Component aComponent, java.awt.Graphics aGraphics, int x, int y)
Paints the icon.- Specified by:
paintIcon
in interfacejavax.swing.Icon
-
-