1 2 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 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 clone() 55 throws CloneNotSupportedException 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 |