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.boolean
Standard equals implementation.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the bounds required to render this fill for this shape.getColor()
Returns the color associated with this fill.getName()
Returns the name of the fill.boolean
hasAlpha()
Returns whether fill has transparency.void
paint
(RMShapePainter aPntr, RMShape aShape) Render this fill in a Java2D Graphics2D.protected void
readAttributes
(RXElement anElement) void
Sets the color associated with this fill.toString()
Returns a string representation.toXML
(RXArchiver anArchiver) XML archival.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
-
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
Returns the bounds required to render this fill for this shape. -
paint
Render this fill in a Java2D Graphics2D. -
hasAlpha
public boolean hasAlpha()Returns whether fill has transparency. -
equals
Standard equals implementation. -
clone
Standard clone implementation.- Overrides:
clone
in classRMListenerList
-
deriveFill
Derives an instance of this class from another fill. -
toXML
XML archival.- Specified by:
toXML
in interfaceArchivable
-
fromXML
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
-
readAttributes
-
toString
Returns a string representation.
-