KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > hdf > model > hdftypes > ParagraphProperties


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
20 package org.apache.poi.hdf.model.hdftypes;
21
22 import org.apache.poi.hdf.model.hdftypes.definitions.PAPAbstractType;
23 /**
24  * Comment me
25  *
26  * @author Ryan Ackley
27  */

28
29 public class ParagraphProperties extends PAPAbstractType implements Cloneable JavaDoc
30 {
31
32
33   public ParagraphProperties()
34   {
35     short[] lspd = new short[2];
36     setFWidowControl((byte)1);
37     //lspd[0] = 240;
38
lspd[1] = 1;
39     setIlvl((byte)9);
40
41     setLspd(lspd);
42     setBrcBar(new short[2]);
43     setBrcBottom(new short[2]);
44     setBrcLeft(new short[2]);
45     setBrcBetween(new short[2]);
46     setBrcRight(new short[2]);
47     setBrcTop(new short[2]);
48     setPhe(new byte[12]);
49     setAnld(new byte[84]);
50     setDttmPropRMark(new byte[4]);
51     setNumrm(new byte[8]);
52
53
54   }
55   public Object JavaDoc clone() throws CloneNotSupportedException JavaDoc
56   {
57       ParagraphProperties clone = (ParagraphProperties)super.clone();
58
59       short[] brcBar = new short[2];
60       short[] brcBottom = new short[2];
61       short[] brcLeft = new short[2];
62       short[] brcBetween = new short[2];
63       short[] brcRight = new short[2];
64       short[] brcTop = new short[2];
65       short[] lspd = new short[2];
66       byte[] phe = new byte[12];
67       byte[] anld = new byte[84];
68       byte[] dttmPropRMark = new byte[4];
69       byte[] numrm = new byte[8];
70
71       System.arraycopy(getBrcBar(), 0, brcBar, 0, 2);
72       System.arraycopy(getBrcBottom(), 0, brcBottom, 0, 2);
73       System.arraycopy(getBrcLeft(), 0, brcLeft, 0, 2);
74       System.arraycopy(getBrcBetween(), 0, brcBetween, 0, 2);
75       System.arraycopy(getBrcRight(), 0, brcRight, 0, 2);
76       System.arraycopy(getBrcTop(), 0, brcTop, 0, 2);
77       System.arraycopy(getLspd(), 0, lspd, 0, 2);
78       System.arraycopy(getPhe(), 0, phe, 0, 12);
79       System.arraycopy(getAnld(), 0, anld, 0, 84);
80       System.arraycopy(getDttmPropRMark(), 0, dttmPropRMark, 0, 4);
81       System.arraycopy(getNumrm(), 0, numrm, 0, 8);
82
83
84       clone.setBrcBar(brcBar);
85       clone.setBrcBottom(brcBottom);
86       clone.setBrcLeft(brcLeft);
87       clone.setBrcBetween(brcBetween);
88       clone.setBrcRight(brcRight);
89       clone.setBrcTop(brcTop);
90       clone.setLspd(lspd);
91       clone.setPhe(phe);
92       clone.setAnld(anld);
93       clone.setDttmPropRMark(dttmPropRMark);
94       clone.setNumrm(numrm);
95       return clone;
96   }
97
98 }
99
Popular Tags