ReportMill 11 API

com.reportmill.shape.fill
Class RMFill

java.lang.Object
  extended by com.reportmill.shape.fill.RMFill
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
RMGradientFill, RMImageFill, RMStroke

public class RMFill
extends java.lang.Object
implements java.lang.Cloneable

This class represents a simple shape fill, drawing a given color in a provided path. Subclasses support things like gradients, textures, etc.


Constructor Summary
RMFill()
          Creates a plain, black fill.
RMFill(RMColor aColor)
          Creates a plain fill with the given color.
 
Method Summary
 RMFill clone()
          Standard clone implementation.
 RMFill deriveFill(RMFill aFill)
          Derives an instance of this class from another fill.
 boolean equals(java.lang.Object anObj)
          Standard equals implementation.
 java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
          XML unarchival.
 RMRect getBounds(RMShape aShape, RMRect pathBounds)
          Returns the bounds required to render this fill for this shape.
 RMColor getColor()
          Returns the color associated with this fill.
 java.lang.String getName()
          Returns the name of the fill.
 boolean hasAlpha()
          Returns whether fill has transparency.
 void paint(com.reportmill.shape.RMShapePainter sp, java.awt.Graphics2D g, RMShape aShape)
          Render this fill in a Java2D Graphics2D.
 void setColor(RMColor aColor)
          Sets the color associated with this fill.
 com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
          XML archival.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMFill

public RMFill()
Creates a plain, black fill.


RMFill

public RMFill(RMColor aColor)
Creates a plain fill with the given color.

Method Detail

getName

public java.lang.String getName()
Returns the name of the fill.


getColor

public RMColor getColor()
Returns the color associated with this fill.


setColor

public void setColor(RMColor aColor)
Sets the color associated with this fill.


getBounds

public RMRect getBounds(RMShape aShape,
                        RMRect pathBounds)
Returns the bounds required to render this fill for this shape.


paint

public void paint(com.reportmill.shape.RMShapePainter sp,
                  java.awt.Graphics2D g,
                  RMShape aShape)
Render this fill in a Java2D Graphics2D.


hasAlpha

public boolean hasAlpha()
Returns whether fill has transparency.


equals

public boolean equals(java.lang.Object anObj)
Standard equals implementation.

Overrides:
equals in class java.lang.Object

clone

public RMFill clone()
Standard clone implementation.

Overrides:
clone in class java.lang.Object

deriveFill

public RMFill deriveFill(RMFill aFill)
Derives an instance of this class from another fill.


toXML

public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver,
                                               java.lang.Object anOwner)
XML archival.


fromXML

public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver,
                                com.reportmill.archiver.RXElement anElement,
                                java.lang.Object anOwner)
XML unarchival.


ReportMill 11 API