com.mindfusion.diagramming
Class SolidBrush

java.lang.Object
  extended by com.mindfusion.diagramming.Brush
      extended by com.mindfusion.diagramming.SolidBrush
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable

public class SolidBrush
extends Brush

Represents a brush that paints the interior of objects with a single color.

See Also:
Serialized Form

Constructor Summary
SolidBrush()
          Initializes a new SolidBrush instance.
SolidBrush(java.awt.Color color)
          Initializes a new SolidBrush instance.
 
Method Summary
 void applyTo(java.awt.Graphics2D g, java.awt.geom.Rectangle2D bounds)
           
 java.lang.Object clone()
          Create a copy of this brush.
 java.awt.Color getColor()
          Gets the color that fills the interior of objects painted with this brush.
 void readExternal(java.io.ObjectInput in)
          Implements Externalizable.
 void setColor(java.awt.Color value)
          Sets the color that fills the interior of objects painted with this brush.
 void writeExternal(java.io.ObjectOutput out)
          Implements Externalizable.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolidBrush

public SolidBrush(java.awt.Color color)
Initializes a new SolidBrush instance.

Parameters:
color - A Color object representing the brush color.

SolidBrush

public SolidBrush()
Initializes a new SolidBrush instance.

Method Detail

applyTo

public void applyTo(java.awt.Graphics2D g,
                    java.awt.geom.Rectangle2D bounds)
Specified by:
applyTo in class Brush

clone

public java.lang.Object clone()
Create a copy of this brush.

Overrides:
clone in class Brush
Returns:
The new SolidBrush object.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Implements Externalizable.

Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implements Externalizable.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

getColor

public java.awt.Color getColor()
Gets the color that fills the interior of objects painted with this brush.

Returns:
A Color object representing the brush color.

setColor

public void setColor(java.awt.Color value)
Sets the color that fills the interior of objects painted with this brush.

Parameters:
value - The new brush color.