Class RMShadowEffect
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.graphics.RMEffect
-
- com.inductiveautomation.rm.graphics.RMImageEffect
-
- com.inductiveautomation.rm.graphics.RMShadowEffect
-
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.util.EventListener
public class RMShadowEffect extends RMImageEffect
This class adds a shadow to a given shape.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.rm.graphics.RMImageEffect
RMImageEffect.BoxKernel, RMImageEffect.ConeKernel, RMImageEffect.GaussianKernel
-
-
Constructor Summary
Constructors Constructor Description RMShadowEffect()
Creates a new shadow effect.RMShadowEffect(RMColor aColor, int aRadius, int dx, int dy)
Creates a new shadow effect with the parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RMShadowEffect
deriveFill(int aRadius)
Returns a shadow effect just like this one, but with a radius equal to the given value.RMShadowEffect
deriveFill(int dx, int dy)
Returns a shadow effect just like this one, but with new offsets.RMShadowEffect
deriveFill(RMColor aColor)
Returns a shadow effect just like this one, but with a radius equal to the given value.boolean
equals(java.lang.Object anObj)
Standard equals implementation.java.lang.Object
fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.RMRect
getBounds(RMShape aShape)
Returns the bounds required to render this fill for this shape.RMColor
getColor()
Returns the color associated with this fill.int
getDX()
Returns the X offset of the shadow.int
getDY()
Returns the Y offset of the shadow.java.awt.image.BufferedImage
getImage(RMShape aShape)
Returns the effect image.int
getRadius()
Returns the radius of the blur.void
paint(RMShapePainter aPntr, RMShape aShape)
Render this fill in a painter.void
setColor(RMColor aColor)
Sets the color associated with this fill.RXElement
toXML(RXArchiver anArchiver)
XML archival.-
Methods inherited from class com.inductiveautomation.rm.graphics.RMImageEffect
clone, getBlurredImage, getBlurredImage, getCachedImage, getShapeImage, reset
-
Methods inherited from class com.inductiveautomation.rm.graphics.RMEffect
deepChange, getName, isEnabled, propertyChange, setEnabled, toString
-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Constructor Detail
-
RMShadowEffect
public RMShadowEffect()
Creates a new shadow effect.
-
RMShadowEffect
public RMShadowEffect(RMColor aColor, int aRadius, int dx, int dy)
Creates a new shadow effect with the parameters.
-
-
Method Detail
-
getRadius
public int getRadius()
Returns the radius of the blur.
-
getDX
public int getDX()
Returns the X offset of the shadow.
-
getDY
public int getDY()
Returns the Y offset of the shadow.
-
getColor
public RMColor getColor()
Returns the color associated with this fill.
-
setColor
public void setColor(RMColor aColor)
Sets the color associated with this fill.
-
deriveFill
public RMShadowEffect deriveFill(int aRadius)
Returns a shadow effect just like this one, but with a radius equal to the given value.
-
deriveFill
public RMShadowEffect deriveFill(RMColor aColor)
Returns a shadow effect just like this one, but with a radius equal to the given value.
-
deriveFill
public RMShadowEffect deriveFill(int dx, int dy)
Returns a shadow effect just like this one, but with new offsets.
-
getBounds
public RMRect getBounds(RMShape aShape)
Returns the bounds required to render this fill for this shape.
-
getImage
public java.awt.image.BufferedImage getImage(RMShape aShape)
Returns the effect image.- Specified by:
getImage
in classRMImageEffect
-
paint
public void paint(RMShapePainter aPntr, RMShape aShape)
Render this fill in a painter.
-
equals
public boolean equals(java.lang.Object anObj)
Standard equals implementation.- Overrides:
equals
in classjava.lang.Object
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML archival.- Specified by:
toXML
in interfaceArchivable
- Overrides:
toXML
in classRMEffect
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classRMEffect
-
-