org.apache.poi.hssf.model
Class AbstractShape

java.lang.Object
  extended by org.apache.poi.hssf.model.AbstractShape
Direct Known Subclasses:
LineShape, PictureShape, PolygonShape, SimpleFilledShape, TextboxShape

public abstract class AbstractShape
extends java.lang.Object

An abstract shape is the lowlevel model for a shape.

Author:
Glen Stampoultzis (glens at apache.org)

Constructor Summary
protected AbstractShape()
           
 
Method Summary
protected  int addStandardOptions(HSSFShape shape, EscherOptRecord opt)
          Add standard properties to the opt record.
protected  EscherRecord createAnchor(HSSFAnchor userAnchor)
          Creates an escher anchor record from a HSSFAnchor.
static AbstractShape createShape(HSSFShape hssfShape, int shapeId)
          Create a new shape object used to create the escher records.
abstract  ObjRecord getObjRecord()
           
abstract  EscherContainerRecord getSpContainer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractShape

protected AbstractShape()
Method Detail

createShape

public static AbstractShape createShape(HSSFShape hssfShape,
                                        int shapeId)
Create a new shape object used to create the escher records.

Parameters:
hssfShape - The simple shape this is based on.

getSpContainer

public abstract EscherContainerRecord getSpContainer()
Returns:
The shape container and it's children that can represent this shape.

getObjRecord

public abstract ObjRecord getObjRecord()
Returns:
The object record that is associated with this shape.

createAnchor

protected EscherRecord createAnchor(HSSFAnchor userAnchor)
Creates an escher anchor record from a HSSFAnchor.

Parameters:
userAnchor - The high level anchor to convert.
Returns:
An escher anchor record.

addStandardOptions

protected int addStandardOptions(HSSFShape shape,
                                 EscherOptRecord opt)
Add standard properties to the opt record. These properties effect all records.

Parameters:
shape - The user model shape.
opt - The opt record to add the properties to.
Returns:
The number of options added.


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