Class RMReflectionEffect
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.RMReflectionEffect
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,PropertyChangeListener
,Cloneable
,EventListener
This class adds a reflection 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 -
Method Summary
Modifier and TypeMethodDescriptionderiveEffect
(float aReflectionHeight, float aFadeHeight, float aGapHeight) Creates a new reflection effect by cloning this one and substituting given reflection, fade and gap heights, if greater than zero.boolean
Standard equals implementation.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the bounds required to render this fill for this shape.float
Returns the height of the faded region as a fraction of reflection height (defaults to .5).float
Returns the height of the gap between the shape and the reflection in points (defaults to 0).Returns the effect image.float
Returns the height of the reflected image as fraction of shape height (defaults to 1).void
paint
(RMShapePainter aPntr, RMShape aShape) Render this fill in a Java2D Graphics2D.protected void
setFadeHeight
(float aValue) Sets the height of the faded region as a fraction of reflection height.protected void
setGapHeight
(float aValue) Sets the height of the gap between the shape and the reflection in points.protected void
setReflectionHeight
(float aValue) Sets the height of the reflected image as fraction of shape height.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 Details
-
RMReflectionEffect
public RMReflectionEffect()
-
-
Method Details
-
getReflectionHeight
public float getReflectionHeight()Returns the height of the reflected image as fraction of shape height (defaults to 1). -
setReflectionHeight
protected void setReflectionHeight(float aValue) Sets the height of the reflected image as fraction of shape height. -
getFadeHeight
public float getFadeHeight()Returns the height of the faded region as a fraction of reflection height (defaults to .5). -
setFadeHeight
protected void setFadeHeight(float aValue) Sets the height of the faded region as a fraction of reflection height. -
getGapHeight
public float getGapHeight()Returns the height of the gap between the shape and the reflection in points (defaults to 0). -
setGapHeight
protected void setGapHeight(float aValue) Sets the height of the gap between the shape and the reflection in points. -
deriveEffect
public RMReflectionEffect deriveEffect(float aReflectionHeight, float aFadeHeight, float aGapHeight) Creates a new reflection effect by cloning this one and substituting given reflection, fade and gap heights, if greater than zero. -
getBounds
Returns the bounds required to render this fill for this shape. -
getImage
Returns the effect image.- Specified by:
getImage
in classRMImageEffect
-
paint
Render this fill in a Java2D Graphics2D. -
equals
Standard equals implementation. -
toXML
XML archival.- Specified by:
toXML
in interfaceArchivable
- Overrides:
toXML
in classRMEffect
-
fromXML
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classRMEffect
-