com.f1j.drawing
Interface Drawing

All Known Subinterfaces:
Drawing, DrawingModel, DrawingModel

public interface Drawing
extends Lockable

This interface defines the drawing API.


Method Summary
 Shape addPicture(byte[] data, ShapeAnchor shapeAnchor)
          Adds a new picture to the drawing.
 Shape addPicture(java.io.InputStream input, ShapeAnchor shapeAnchor)
          Adds a new picture to the drawing.
 Shape addShape(EAutoShape eShape, ShapeAnchor shapeAnchor)
          Adds a new AutoShape to the drawing.
 Shape findShape(int spid)
          Finds a shape from a shape ID.
 ShapeRange findShapes(int[] shapeIDs)
          Finds a range of shapes from an array of shape IDs.
 ShapeRange getAllShapes()
          Returns a range of all shapes in the drawing.
 Shape getShape(int nIndex)
          Gets a shape based on its index in the drawing.
 int getShapeCount()
          Returns the number of shapes in the drawing.
 
Methods inherited from interface com.f1j.util.Lockable
getLock, releaseLock
 

Method Detail

addShape

public Shape addShape(EAutoShape eShape,
                      ShapeAnchor shapeAnchor)
               throws AccessDeniedException,
                      F1Exception
Adds a new AutoShape to the drawing.
Parameters:
eShape - An enumerated value defined in the AutoShapeTypes interface.
shapeAnchor - An interface to a client-defined object specifying the position and size of the shape.
Returns:
the new shape object.

addPicture

public Shape addPicture(byte[] data,
                        ShapeAnchor shapeAnchor)
                 throws AccessDeniedException,
                        InvalidArgumentException,
                        F1Exception
Adds a new picture to the drawing.
Parameters:
data - Image data
shapeAnchor - An interface to a client-defined object specifying the position and size of the shape.
Returns:
the new picture.

addPicture

public Shape addPicture(java.io.InputStream input,
                        ShapeAnchor shapeAnchor)
                 throws AccessDeniedException,
                        InvalidArgumentException,
                        F1Exception
Adds a new picture to the drawing.
Parameters:
input - Input stream containing image data
shapeAnchor - An interface to a client-defined object specifying the position and size of the shape.
Returns:
the new picture.

findShape

public Shape findShape(int spid)
                throws InvalidArgumentException
Finds a shape from a shape ID.
Parameters:
spid - The shape ID
Returns:
the shape that corresponds to the shape ID.

findShapes

public ShapeRange findShapes(int[] shapeIDs)
                      throws InvalidArgumentException
Finds a range of shapes from an array of shape IDs.
Parameters:
shapeIDs - The shape IDs
Returns:
the shape range that corresponds to the shape IDs.

getAllShapes

public ShapeRange getAllShapes()
Returns a range of all shapes in the drawing.
Returns:
the shape range that contains all shapes in the drawing.

getShape

public Shape getShape(int nIndex)
Gets a shape based on its index in the drawing.
Parameters:
nIndex - The index
Returns:
the shape that corresponds to the index.

getShapeCount

public int getShapeCount()
Returns the number of shapes in the drawing.
Returns:
the number of shapes in the drawing.