KickJava   Java API By Example, From Geeks To Geeks.

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


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.TAPAbstractType;
22
23 public class TableProperties
24   extends TAPAbstractType
25     implements Cloneable JavaDoc
26 {
27
28   public TableProperties()
29   {
30
31   }
32   public TableProperties(int columns)
33   {
34     field_7_itcMac = (short)columns;
35     field_10_rgshd = new ShadingDescriptor[columns];
36     for (int x = 0; x < columns; x++)
37     {
38       field_10_rgshd[x] = new ShadingDescriptor();
39     }
40     field_11_brcBottom = new BorderCode();
41     field_12_brcTop = new BorderCode();
42     field_13_brcLeft = new BorderCode();
43     field_14_brcRight = new BorderCode();
44     field_15_brcVertical = new BorderCode();
45     field_16_brcHorizontal = new BorderCode();
46     field_8_rgdxaCenter = new short[columns];
47     field_9_rgtc = new TableCellDescriptor[columns];
48     for (int x = 0; x < columns; x++)
49     {
50       field_9_rgtc[x] = new TableCellDescriptor();
51     }
52   }
53
54   public Object JavaDoc clone()
55     throws CloneNotSupportedException JavaDoc
56   {
57     TableProperties tap = (TableProperties)super.clone();
58     tap.field_10_rgshd = new ShadingDescriptor[field_10_rgshd.length];
59     for (int x = 0; x < field_10_rgshd.length; x++)
60     {
61       tap.field_10_rgshd[x] = (ShadingDescriptor)field_10_rgshd[x].clone();
62     }
63     tap.field_11_brcBottom = (BorderCode)field_11_brcBottom.clone();
64     tap.field_12_brcTop = (BorderCode)field_12_brcTop.clone();
65     tap.field_13_brcLeft = (BorderCode)field_13_brcLeft.clone();
66     tap.field_14_brcRight = (BorderCode)field_14_brcRight.clone();
67     tap.field_15_brcVertical = (BorderCode)field_15_brcVertical.clone();
68     tap.field_16_brcHorizontal = (BorderCode)field_16_brcHorizontal.clone();
69     tap.field_8_rgdxaCenter = (short[])field_8_rgdxaCenter.clone();
70     tap.field_9_rgtc = new TableCellDescriptor[field_9_rgtc.length];
71     for (int x = 0; x < field_9_rgtc.length; x++)
72     {
73       tap.field_9_rgtc[x] = (TableCellDescriptor)field_9_rgtc[x].clone();
74     }
75     return tap;
76   }
77
78 }
79
Popular Tags