KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jxl > biff > drawing > BStoreContainer


1 /*********************************************************************
2 *
3 * Copyright (C) 2003 Andrew Khan
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ***************************************************************************/

19
20 package jxl.biff.drawing;
21
22
23 /**
24  * A BStoreContainer escher record
25  */

26 class BStoreContainer extends EscherContainer
27 {
28   /**
29    * The number of blips inside this container
30    */

31   private int numBlips;
32
33   /**
34    * Constructor used to instantiate this object when reading from an
35    * escher stream
36    *
37    * @param erd the escher data
38    */

39   public BStoreContainer(EscherRecordData erd)
40   {
41     super(erd);
42     numBlips = getInstance();
43   }
44
45   /**
46    * Constructor used when writing out an escher record
47    */

48   public BStoreContainer()
49   {
50     super(EscherRecordType.BSTORE_CONTAINER);
51   }
52
53   /**
54    * Sets the number of drawings in this container
55    *
56    * @param count the number of blips
57    */

58   void setNumBlips(int count)
59   {
60     numBlips = count;
61     setInstance(numBlips);
62   }
63
64   /**
65    * Accessor for the number of blips
66    *
67    * @return the number of blips
68    */

69   public int getNumBlips()
70   {
71     return numBlips;
72   }
73
74   /**
75    * Accessor for the drawing
76    *
77    * @param i the index number of the drawing to return
78    */

79   public void getDrawing(int i)
80   {
81     EscherRecord[] children = getChildren();
82     BlipStoreEntry bse = (BlipStoreEntry) children[i];
83   }
84 }
85
Popular Tags