com.mindfusion.diagramming
Class ShapeDecoration

java.lang.Object
  extended by com.mindfusion.diagramming.ShapeDecoration

public class ShapeDecoration
extends java.lang.Object

That class contained an array of shape template elements that define shape decorations. Can contain lines, arcs and Bézier curves. The shape is closed and filled.


Constructor Summary
ShapeDecoration(ElementTemplate[] elements, Brush brush, int fillMode, Pen pen)
          Initializes a new instance of the ShapeDecoration class with the specified outline, brush, pen and rule.
 
Method Summary
 void draw(java.awt.Graphics2D graphics, double rotation)
           
static ShapeDecoration fromXmlElement(org.w3c.dom.Element e)
           
 Brush getBrush()
          Gets the brush used to fill the interior of this shape.
 int getFillMode()
          Gets a value indicating how the area is filled.
 Pen getPen()
          Gets the pen used to paint the frame of the shape.
 void setBrush(Brush brush)
          Sets the brush used to fill the interior of this shape.
 void setFillMode(int fillMode)
          Sets a value indicating how the area is filled.
 void setPen(Pen pen)
          Sets the pen used to paint the frame of the shape.
static org.w3c.dom.Element toDOM(ShapeDecoration decoration, org.w3c.dom.Document owner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeDecoration

public ShapeDecoration(ElementTemplate[] elements,
                       Brush brush,
                       int fillMode,
                       Pen pen)
Initializes a new instance of the ShapeDecoration class with the specified outline, brush, pen and rule.

Parameters:
elements - An array of shape template elements that define shape decoration.
brush - Used to fill the interior of the shape.
fillMode - Specifies how areas are filled.
pen - Used to paint the frame of the shape.
Method Detail

draw

public void draw(java.awt.Graphics2D graphics,
                 double rotation)

toDOM

public static org.w3c.dom.Element toDOM(ShapeDecoration decoration,
                                        org.w3c.dom.Document owner)

fromXmlElement

public static ShapeDecoration fromXmlElement(org.w3c.dom.Element e)
                                      throws javax.xml.transform.TransformerException,
                                             XmlException
Throws:
javax.xml.transform.TransformerException
XmlException

getBrush

public Brush getBrush()
Gets the brush used to fill the interior of this shape.

Returns:

setBrush

public void setBrush(Brush brush)
Sets the brush used to fill the interior of this shape.

Parameters:
brush -

getFillMode

public int getFillMode()
Gets a value indicating how the area is filled.

Returns:

setFillMode

public void setFillMode(int fillMode)
Sets a value indicating how the area is filled.

Parameters:
fillMode -

getPen

public Pen getPen()
Gets the pen used to paint the frame of the shape.

Returns:

setPen

public void setPen(Pen pen)
Sets the pen used to paint the frame of the shape.

Parameters:
pen -