jxl.biff.drawing
Class DrawingGroup

java.lang.Object
  extended byjxl.biff.drawing.DrawingGroup
All Implemented Interfaces:
jxl.biff.drawing.EscherStream

public class DrawingGroup
extends java.lang.Object
implements jxl.biff.drawing.EscherStream

This class contains the Excel picture data in Escher format for the entire workbook


Constructor Summary
DrawingGroup(DrawingGroup dg)
          Copy constructor Uses a shallow copy for most things, since as soon as anything is changed, the drawing group is invalidated and all the data blocks regenerated
DrawingGroup(Origin o)
          Constructor
 
Method Summary
 void add(Chart c)
          Adds a chart to the drawing group
 void add(DrawingGroupObject d)
          Adds a drawing from the public, writable interface
 void add(MsoDrawingGroupRecord mso)
          /** Adds in a drawing group record to this drawing group.
 void add(Record cont)
          Adds a continue record to this drawing group.
 byte[] getData()
          Gets hold of the binary data
 boolean hasDrawingsOmitted()
          Accessor for the drawingsOmitted flag
 void remove(DrawingGroupObject d)
          Interface method to remove a drawing from the group
 void setDrawingsOmitted(MsoDrawingRecord mso, ObjRecord obj)
          Indicates that at least one of the drawings has been omitted from the worksheet
 void updateData(DrawingGroup dg)
          Updates this with the appropriate data from the drawing group passed in This is called during the copy process: this is first initialised as an empty object, but during the copy, the source DrawingGroup may change.
 void write(File outputFile)
          Writes the drawing group to the output file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawingGroup

public DrawingGroup(Origin o)
Constructor

Parameters:
o - the origin of this drawing group

DrawingGroup

public DrawingGroup(DrawingGroup dg)
Copy constructor Uses a shallow copy for most things, since as soon as anything is changed, the drawing group is invalidated and all the data blocks regenerated

Parameters:
dg - the drawing group to copy
Method Detail

add

public void add(MsoDrawingGroupRecord mso)
/** Adds in a drawing group record to this drawing group. The binary data is extracted from the drawing group and added to a single byte array

Parameters:
mso - the drawing group record to add

add

public void add(Record cont)
Adds a continue record to this drawing group. the binary data is extracted and appended to the byte array

Parameters:
cont - the continue record

add

public void add(Chart c)
Adds a chart to the drawing group

Parameters:
c -

add

public void add(DrawingGroupObject d)
Adds a drawing from the public, writable interface

Parameters:
d - the drawing to add

remove

public void remove(DrawingGroupObject d)
Interface method to remove a drawing from the group

Parameters:
d - the drawing to remove

getData

public byte[] getData()
Gets hold of the binary data

Specified by:
getData in interface jxl.biff.drawing.EscherStream
Returns:
the data

write

public void write(File outputFile)
           throws java.io.IOException
Writes the drawing group to the output file

Parameters:
outputFile - the file to write to
Throws:
java.io.IOException

setDrawingsOmitted

public void setDrawingsOmitted(MsoDrawingRecord mso,
                               ObjRecord obj)
Indicates that at least one of the drawings has been omitted from the worksheet


hasDrawingsOmitted

public boolean hasDrawingsOmitted()
Accessor for the drawingsOmitted flag

Returns:
TRUE if a drawing has been omitted, FALSE otherwise

updateData

public void updateData(DrawingGroup dg)
Updates this with the appropriate data from the drawing group passed in This is called during the copy process: this is first initialised as an empty object, but during the copy, the source DrawingGroup may change. After the copy process, this method is then called to update the relevant fields. Unfortunately, the copy process required the presence of a drawing group

Parameters:
dg - the drawing group containing the updated data