jxl.biff.drawing
Interface DrawingGroupObject

All Known Implementing Classes:
Button, Comment, Drawing

public interface DrawingGroupObject

Interface for the various object types that can be added to a drawing group


Method Summary
 int getBlipId()
          Accessor for the blip id
 DrawingGroup getDrawingGroup()
          Accessor for the drawing group
 double getHeight()
          Accessor for the height of this drawing
 byte[] getImageBytes()
          Accessor for the image data
 byte[] getImageData()
          Accessor for the image data
 java.lang.String getImageFilePath()
          Accessor for the image file path.
 MsoDrawingRecord getMsoDrawingRecord()
          Gets the drawing record which was read in
 int getObjectId()
          Accessor for the object id
 Origin getOrigin()
          Gets the origin of this drawing
 int getReferenceCount()
          Accessor for the reference count on this drawing
 int getShapeId()
          Accessor for the shape id
 jxl.biff.drawing.EscherContainer getSpContainer()
          Creates the main Sp container for the drawing
 jxl.biff.drawing.ShapeType getType()
          Accessor for the type
 double getWidth()
          Accessor for the width of this drawing
 double getX()
          Accessor for the column of this drawing
 double getY()
          Accessor for the row of this drawing
 boolean isFirst()
          Accessor for the first drawing on the sheet.
 boolean isFormObject()
          Queries whether this object is a form object.
 void setDrawingGroup(DrawingGroup dg)
          Sets the drawing group for this drawing.
 void setHeight(double h)
          Accessor for the height of this drawing
 void setObjectId(int objid, int bip, int sid)
          Sets the object id.
 void setReferenceCount(int r)
          Sets the new reference count on the drawing
 void setWidth(double w)
          Accessor for the width
 void setX(double x)
          Sets the column position of this drawing
 void setY(double y)
          Accessor for the row of the drawing
 void writeAdditionalRecords(File outputFile)
          Writes any other records associated with this drawing group object
 void writeTailRecords(File outputFile)
          Writes any records that need to be written after all the drawing group objects have been written
 

Method Detail

setObjectId

public void setObjectId(int objid,
                        int bip,
                        int sid)
Sets the object id. Invoked by the drawing group when the object is added to id

Parameters:
objid - the object id
bip - the blip id
sid - the shape id

getObjectId

public int getObjectId()
Accessor for the object id

Returns:
the object id

getBlipId

public int getBlipId()
Accessor for the blip id

Returns:
the blip id

getShapeId

public int getShapeId()
Accessor for the shape id

Returns:
the shape id

getMsoDrawingRecord

public MsoDrawingRecord getMsoDrawingRecord()
Gets the drawing record which was read in

Returns:
the drawing record

getSpContainer

public jxl.biff.drawing.EscherContainer getSpContainer()
Creates the main Sp container for the drawing

Returns:
the SP container

setDrawingGroup

public void setDrawingGroup(DrawingGroup dg)
Sets the drawing group for this drawing. Called by the drawing group when this drawing is added to it

Parameters:
dg - the drawing group

getDrawingGroup

public DrawingGroup getDrawingGroup()
Accessor for the drawing group

Returns:
the drawing group

getOrigin

public Origin getOrigin()
Gets the origin of this drawing

Returns:
where this drawing came from

getReferenceCount

public int getReferenceCount()
Accessor for the reference count on this drawing

Returns:
the reference count

setReferenceCount

public void setReferenceCount(int r)
Sets the new reference count on the drawing

Parameters:
r - the new reference count

getX

public double getX()
Accessor for the column of this drawing

Returns:
the column

setX

public void setX(double x)
Sets the column position of this drawing

Parameters:
x - the column

getY

public double getY()
Accessor for the row of this drawing

Returns:
the row

setY

public void setY(double y)
Accessor for the row of the drawing

Parameters:
y - the row

getWidth

public double getWidth()
Accessor for the width of this drawing

Returns:
the number of columns spanned by this image

setWidth

public void setWidth(double w)
Accessor for the width

Parameters:
w - the number of columns to span

getHeight

public double getHeight()
Accessor for the height of this drawing

Returns:
the number of rows spanned by this image

setHeight

public void setHeight(double h)
Accessor for the height of this drawing

Parameters:
h - the number of rows spanned by this image

getType

public jxl.biff.drawing.ShapeType getType()
Accessor for the type

Returns:
the type

getImageData

public byte[] getImageData()
Accessor for the image data

Returns:
the image data

getImageBytes

public byte[] getImageBytes()
                     throws java.io.IOException
Accessor for the image data

Returns:
the image data
Throws:
java.io.IOException

getImageFilePath

public java.lang.String getImageFilePath()
Accessor for the image file path. Normally this is the absolute path of a file on the directory system, but if this drawing was constructed using an byte[] then the blip id is returned

Returns:
the image file path, or the blip id

writeAdditionalRecords

public void writeAdditionalRecords(File outputFile)
                            throws java.io.IOException
Writes any other records associated with this drawing group object

Throws:
java.io.IOException

writeTailRecords

public void writeTailRecords(File outputFile)
                      throws java.io.IOException
Writes any records that need to be written after all the drawing group objects have been written

Throws:
java.io.IOException

isFirst

public boolean isFirst()
Accessor for the first drawing on the sheet. This is used when copying unmodified sheets to indicate that this drawing contains the first time Escher gubbins

Returns:
TRUE if this MSORecord is the first drawing on the sheet

isFormObject

public boolean isFormObject()
Queries whether this object is a form object. Form objects have their drawings records spread over TXO and CONTINUE records and require special handling

Returns:
TRUE if this is a form object, FALSE otherwise