Package com.independentsoft.office.diagrams

# Class Diagram

java.lang.Object
com.independentsoft.office.drawing.GraphicObject
com.independentsoft.office.diagrams.Diagram

All Implemented Interfaces:
  `IContentElement`

public class Diagram extends GraphicObject
The Class Diagram.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Diagram()`
  Instantiates a new diagram.
  `Diagram​(byte[] dataModelBuffer, byte[] layoutBuffer, byte[] styleBuffer, byte[] colorBuffer, Relationship dataModelRelationship, Relationship layoutRelationship, Relationship styleRelationship, Relationship colorRelationship)`
  Instantiates a new diagram.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Diagram`
  `clone()`
  `ColorTransform`
  `getColorTransform()`
  Gets the color transform.
  `List<IContentElement>`
  `getContentElements()`
  `DataModel`
  `getDataModel()`
  Gets the data model.
  `byte[]`
  `getDrawingBuffer()`
  Gets the pre-rendered diagram drawing part (`dsp:drawing`, `drawingN.xml`).
  `byte[]`
  `getDrawingRelationshipBuffer()`
  Gets the relationship part of the pre-rendered diagram drawing part.
  `Layout`
  `getLayout()`
  Gets the layout.
  `Style`
  `getStyle()`
  Gets the style.
  `void`
  `setColorTransform​(ColorTransform colorTransform)`
  Sets the color transform.
  `void`
  `setDataModel​(DataModel dataModel)`
  Sets the data model.
  `void`
  `setDrawingBuffer​(byte[] drawingBuffer)`
  Sets the pre-rendered diagram drawing part (`dsp:drawing`, `drawingN.xml`).
  `void`
  `setDrawingRelationshipBuffer​(byte[] drawingRelationshipBuffer)`
  Sets the relationship part of the pre-rendered diagram drawing part.
  `void`
  `setLayout​(Layout layout)`
  Sets the layout.
  `void`
  `setStyle​(Style style)`
  Sets the style.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Diagram

    public Diagram()
    Instantiates a new diagram.

  - ### Diagram

    public Diagram​(byte[] dataModelBuffer, byte[] layoutBuffer, byte[] styleBuffer, byte[] colorBuffer, Relationship dataModelRelationship, Relationship layoutRelationship, Relationship styleRelationship, Relationship colorRelationship) throws XMLStreamException
    Instantiates a new diagram.
    Parameters:
      `dataModelBuffer` - the data model buffer
      `layoutBuffer` - the layout buffer
      `styleBuffer` - the style buffer
      `colorBuffer` - the color buffer
      `dataModelRelationship` - the data model relationship
      `layoutRelationship` - the layout relationship
      `styleRelationship` - the style relationship
      `colorRelationship` - the color relationship
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### getContentElements

    public List<IContentElement> getContentElements()
    Specified by:
      `getContentElements` in interface `IContentElement`
    Specified by:
      `getContentElements` in class `GraphicObject`

  - ### clone

    public Diagram clone()
    Specified by:
      `clone` in interface `IContentElement`
    Specified by:
      `clone` in class `GraphicObject`

  - ### getDrawingBuffer

    public byte[] getDrawingBuffer()
    Gets the pre-rendered diagram drawing part (`dsp:drawing`, `drawingN.xml`).
    Returns:
      the drawing buffer

  - ### setDrawingBuffer

    public void setDrawingBuffer​(byte[] drawingBuffer)
    Sets the pre-rendered diagram drawing part (`dsp:drawing`, `drawingN.xml`).
    Parameters:
      `drawingBuffer` - the new drawing buffer

  - ### getDrawingRelationshipBuffer

    public byte[] getDrawingRelationshipBuffer()
    Gets the relationship part of the pre-rendered diagram drawing part.
    Returns:
      the drawing relationship buffer

  - ### setDrawingRelationshipBuffer

    public void setDrawingRelationshipBuffer​(byte[] drawingRelationshipBuffer)
    Sets the relationship part of the pre-rendered diagram drawing part.
    Parameters:
      `drawingRelationshipBuffer` - the new drawing relationship buffer

  - ### getDataModel

    public DataModel getDataModel()
    Gets the data model.
    Returns:
      the data model

  - ### setDataModel

    public void setDataModel​(DataModel dataModel)
    Sets the data model.
    Parameters:
      `dataModel` - the new data model

  - ### getLayout

    public Layout getLayout()
    Gets the layout.
    Returns:
      the layout

  - ### setLayout

    public void setLayout​(Layout layout)
    Sets the layout.
    Parameters:
      `layout` - the new layout

  - ### getStyle

    public Style getStyle()
    Gets the style.
    Returns:
      the style

  - ### setStyle

    public void setStyle​(Style style)
    Sets the style.
    Parameters:
      `style` - the new style

  - ### getColorTransform

    public ColorTransform getColorTransform()
    Gets the color transform.
    Returns:
      the color transform

  - ### setColorTransform

    public void setColorTransform​(ColorTransform colorTransform)
    Sets the color transform.
    Parameters:
      `colorTransform` - the new color transform