Class RMFill
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.graphics.RMFill
- All Implemented Interfaces:
Archivable, RMPropertyChanger, Cloneable
- Direct Known Subclasses:
RMContourFill, RMGradientFill, RMImageFill, RMStroke
This class represents a simple shape fill, drawing a given color in a provided path. Subclasses
support things like gradients, textures, etc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Standard clone implementation.deriveFill(RMFill aFill) Derives an instance of this class from another fill.booleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the bounds required to render this fill for this shape.@NonNull RMColorgetColor()Returns the color associated with this fill.getName()Returns the name of the fill.booleanhasAlpha()Returns whether fill has transparency.voidpaint(RMShapePainter aPntr, RMShape aShape) Render this fill in a Java2D Graphics2D.protected voidreadAttributes(RXElement anElement) voidSets the color associated with this fill.toString()Returns a string representation.toXML(RXArchiver anArchiver) XML archival.Methods inherited from class RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChangeMethods inherited from class RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Constructor Details
-
RMFill
public RMFill()Creates a plain, black fill. -
RMFill
Creates a plain fill with the given color.
-
-
Method Details
-
getName
Returns the name of the fill. -
getColor
Returns the color associated with this fill. -
setColor
Sets the color associated with this fill. -
getBounds
-
paint
Render this fill in a Java2D Graphics2D. -
hasAlpha
public boolean hasAlpha()Returns whether fill has transparency. -
equals
-
clone
-
deriveFill
-
toXML
XML archival.- Specified by:
toXMLin interfaceArchivable
-
fromXML
XML unarchival.- Specified by:
fromXMLin interfaceArchivable
-
readAttributes
-
toString
-