org.apache.poi.xdgf.usermodel

## Class XDGFBaseContents

- java.lang.Object
- - org.apache.poi.ooxml.POIXMLDocumentPart
  - - org.apache.poi.xdgf.xml.XDGFXMLDocumentPart
    - - org.apache.poi.xdgf.usermodel.XDGFBaseContents

- Direct Known Subclasses:
    XDGFMasterContents, XDGFPageContents

      public class XDGFBaseContents
      extends XDGFXMLDocumentPart

  Container of shapes for a page in a Visio diagram. Shapes are not necessarily literal shapes in the diagram, but is the term that is used to describe the basic elements that make up a Visio diagram.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.poi.ooxml.POIXMLDocumentPart

      `POIXMLDocumentPart.RelationPart`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<XDGFConnection>` | `_connections`
    `protected com.microsoft.schemas.office.visio.x2012.main.PageContentsType` | `_pageContents`
    `protected java.util.Map<java.lang.Long,XDGFShape>` | `_shapes`
    `protected java.util.List<XDGFShape>` | `_toplevelShapes`

    - ### Fields inherited from class org.apache.poi.xdgf.xml.XDGFXMLDocumentPart

      `_document`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XDGFBaseContents(PackagePart part)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addToShapeIndex(XDGFShape shape)`
    `void` | `draw(java.awt.Graphics2D graphics)` Draws the contents of a page onto a Graphics2D object
    `java.util.List<XDGFConnection>` | `getConnections()`
    `XDGFShape` | `getShapeById(long id)`
    `java.util.Collection<XDGFShape>` | `getShapes()`
    `java.util.Map<java.lang.Long,XDGFShape>` | `getShapesMap()`
    `java.util.List<XDGFShape>` | `getTopLevelShapes()`
    `com.microsoft.schemas.office.visio.x2012.main.PageContentsType` | `getXmlObject()`
    `protected void` | `onDocumentRead()` Fired when a package part is read
    `java.lang.String` | `toString()`
    `void` | `visitShapes(ShapeVisitor visitor)` Provides iteration over the shapes using the visitor pattern, and provides an easy way to convert shape coordinates into global coordinates

    - ### Methods inherited from class org.apache.poi.xdgf.xml.XDGFXMLDocumentPart

      `setDocument`

    - ### Methods inherited from class org.apache.poi.ooxml.POIXMLDocumentPart

      `_invokeOnDocumentRead, addRelation, commit, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommited, isCommitted, onDocumentCreate, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, removeRelation, setCommited, setCommitted`

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

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

- - ### Field Detail

    - #### _pageContents

          protected com.microsoft.schemas.office.visio.x2012.main.PageContentsType _pageContents

    - #### _toplevelShapes

          protected java.util.List<XDGFShape> _toplevelShapes

    - #### _shapes

          protected java.util.Map<java.lang.Long,XDGFShape> _shapes

    - #### _connections

          protected java.util.List<XDGFConnection> _connections

  - ### Constructor Detail

    - #### XDGFBaseContents

          public XDGFBaseContents(PackagePart part)

      Since:
        POI 3.14-Beta1

  - ### Method Detail

    - #### getXmlObject

          @Internal
          public com.microsoft.schemas.office.visio.x2012.main.PageContentsType getXmlObject()

    - #### onDocumentRead

          protected void onDocumentRead()

      Description copied from class: `POIXMLDocumentPart`
      Fired when a package part is read
      Overrides:
        `onDocumentRead` in class `POIXMLDocumentPart`

    - #### addToShapeIndex

          protected void addToShapeIndex(XDGFShape shape)

    - #### draw

          public void draw(java.awt.Graphics2D graphics)

      Draws the contents of a page onto a Graphics2D object
      Parameters:
        `graphics` - The context to draw on.

    - #### getShapeById

          public XDGFShape getShapeById(long id)

    - #### getShapesMap

          public java.util.Map<java.lang.Long,XDGFShape> getShapesMap()

    - #### getShapes

          public java.util.Collection<XDGFShape> getShapes()

    - #### getTopLevelShapes

          public java.util.List<XDGFShape> getTopLevelShapes()

    - #### getConnections

          public java.util.List<XDGFConnection> getConnections()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `POIXMLDocumentPart`

    - #### visitShapes

          public void visitShapes(ShapeVisitor visitor)

      Provides iteration over the shapes using the visitor pattern, and provides an easy way to convert shape coordinates into global coordinates

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.