KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > hwpf > usermodel > TableCellDescriptor


1
2 /* ====================================================================
3    Copyright 2002-2004 Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16 ==================================================================== */

17         
18
19 package org.apache.poi.hwpf.usermodel;
20
21 import org.apache.poi.hwpf.model.types.TCAbstractType;
22
23 public class TableCellDescriptor
24   extends TCAbstractType
25 {
26   public static final int SIZE = 20;
27
28   public TableCellDescriptor()
29   {
30     field_3_brcTop = new BorderCode();
31     field_4_brcLeft = new BorderCode();
32     field_5_brcBottom = new BorderCode();
33     field_6_brcRight = new BorderCode();
34
35   }
36
37   public Object JavaDoc clone()
38     throws CloneNotSupportedException JavaDoc
39   {
40     TableCellDescriptor tc = (TableCellDescriptor)super.clone();
41     tc.field_3_brcTop = (BorderCode)field_3_brcTop.clone();
42     tc.field_4_brcLeft = (BorderCode)field_4_brcLeft.clone();
43     tc.field_5_brcBottom = (BorderCode)field_5_brcBottom.clone();
44     tc.field_6_brcRight = (BorderCode)field_6_brcRight.clone();
45     return tc;
46   }
47
48   public static TableCellDescriptor convertBytesToTC(byte[] buf, int offset)
49   {
50     TableCellDescriptor tc = new TableCellDescriptor();
51     tc.fillFields(buf, offset);
52     return tc;
53   }
54
55 }
56
Popular Tags