Home » JCraft » jxl » biff » drawing » [javadoc | source]
jxl.biff.drawing
public class: Drawing [javadoc | source]
java.lang.Object
   jxl.biff.drawing.Drawing

All Implemented Interfaces:
    DrawingGroupObject, Image

Direct Known Subclasses:
    WritableImage

Contains the various biff records used to insert a drawing into a worksheet
Nested Class Summary:
protected static class  Drawing.ImageAnchorProperties   
Field Summary
public static  ImageAnchorProperties MOVE_AND_SIZE_WITH_CELLS     
public static  ImageAnchorProperties MOVE_WITH_CELLS     
public static  ImageAnchorProperties NO_MOVE_OR_SIZE_WITH_CELLS     
Constructor:
 protected Drawing(DrawingGroupObject dgo,
    DrawingGroup dg) 
    Copy constructor used to copy drawings from read to write
    Parameters:
    dgo - the drawing group object
    dg - the drawing group
 public Drawing(MsoDrawingRecord mso,
    ObjRecord obj,
    DrawingData dd,
    DrawingGroup dg,
    Sheet s) 
    Constructor used when reading images
    Parameters:
    mso - the drawing record
    obj - the object record
    dd - the drawing data for all drawings on this sheet
    dg - the drawing group
 public Drawing(double x,
    double y,
    double w,
    double h,
    File image) 
    Constructor invoked when writing the images
    Parameters:
    x - the column
    y - the row
    w - the width in cells
    h - the height in cells
    image - the image file
 public Drawing(double x,
    double y,
    double w,
    double h,
    byte[] image) 
Method from jxl.biff.drawing.Drawing Summary:
getBlipId,   getColumn,   getDrawingGroup,   getHeight,   getHeight,   getHorizontalResolution,   getImageAnchor,   getImageBytes,   getImageData,   getImageFile,   getImageFilePath,   getImageHeight,   getImageWidth,   getMsoDrawingRecord,   getObjectId,   getOrigin,   getReferenceCount,   getRow,   getShapeId,   getSpContainer,   getType,   getVerticalResolution,   getWidth,   getWidth,   getX,   getY,   isFirst,   isFormObject,   removeRow,   setDrawingGroup,   setHeight,   setImageAnchor,   setObjectId,   setReferenceCount,   setWidth,   setX,   setY,   writeAdditionalRecords,   writeTailRecords
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from jxl.biff.drawing.Drawing Detail:
 public final int getBlipId() 
    Accessor for the blip id
 public double getColumn() 
    Interface method
 public DrawingGroup getDrawingGroup() 
    Accessor for the drawing group
 public double getHeight() 
    Accessor for the height of this drawing
 public double getHeight(LengthUnit unit) 
    Get the height of this image as rendered within Excel
 public double getHorizontalResolution(LengthUnit unit) 
    Gets the horizontal resolution of the image, if that information is available.
 protected ImageAnchorProperties getImageAnchor() 
    Accessor for the anchor properties
 public byte[] getImageBytes() throws IOException 
    Accessor for the image data
 public byte[] getImageData() 
    Accessor for the image data
 public File getImageFile() 
    Accessor for the image file
 public 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
 public int getImageHeight() 
    Gets the height of the image. Note that this is the height of the underlying image, and does not take into account any size manipulations that may have occurred when the image was added into Excel
 public int getImageWidth() 
    Gets the width of the image. Note that this is the width of the underlying image, and does not take into account any size manipulations that may have occurred when the image was added into Excel
 public MsoDrawingRecord getMsoDrawingRecord() 
    Gets the drawing record which was read in
 public final int getObjectId() 
    Accessor for the object id
 public Origin getOrigin() 
    Gets the origin of this drawing
 public int getReferenceCount() 
    Accessor for the reference count on this drawing
 public double getRow() 
    Interface method
 public int getShapeId() 
    Accessor for the shape id
 public EscherContainer getSpContainer() 
    Creates the main Sp container for the drawing
 public ShapeType getType() 
    Accessor for the type
 public double getVerticalResolution(LengthUnit unit) 
    Gets the vertical resolution of the image, if that information is available.
 public double getWidth() 
    Accessor for the width of this drawing
 public double getWidth(LengthUnit unit) 
    Get the width of this image as rendered within Excel
 public double getX() 
    Accessor for the column of this drawing
 public double getY() 
    Accessor for the row of this drawing
 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
 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
 public  void removeRow(int r) 
    Removes a row
 public  void setDrawingGroup(DrawingGroup dg) 
    Sets the drawing group for this drawing. Called by the drawing group when this drawing is added to it
 public  void setHeight(double h) 
    Accessor for the height of this drawing
 protected  void setImageAnchor(ImageAnchorProperties iap) 
    Accessor for the anchor properties
 public final  void setObjectId(int objid,
    int bip,
    int sid) 
    Sets the object id. Invoked by the drawing group when the object is added to id
 public  void setReferenceCount(int r) 
    Sets the new reference count on the drawing
 public  void setWidth(double w) 
    Accessor for the width
 public  void setX(double x) 
    Sets the column position of this drawing
 public  void setY(double y) 
    Accessor for the row of the drawing
 public  void writeAdditionalRecords(File outputFile) throws IOException 
    Writes any other records associated with this drawing group object
 public  void writeTailRecords(File outputFile) throws IOException 
    Writes any records that need to be written after all the drawing group objects have been written Does nothing here