01: /* ====================================================================
02: Licensed to the Apache Software Foundation (ASF) under one or more
03: contributor license agreements. See the NOTICE file distributed with
04: this work for additional information regarding copyright ownership.
05: The ASF licenses this file to You under the Apache License, Version 2.0
06: (the "License"); you may not use this file except in compliance with
07: the License. You may obtain a copy of the License at
08:
09: 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: package org.apache.poi.hdf.model.hdftypes;
19:
20: import org.apache.poi.hdf.model.hdftypes.definitions.PAPAbstractType;
21:
22: /**
23: * Comment me
24: *
25: * @author Ryan Ackley
26: */
27:
28: public class ParagraphProperties extends PAPAbstractType implements
29: Cloneable {
30:
31: public ParagraphProperties() {
32: short[] lspd = new short[2];
33: setFWidowControl((byte) 1);
34: //lspd[0] = 240;
35: lspd[1] = 1;
36: setIlvl((byte) 9);
37:
38: setLspd(lspd);
39: setBrcBar(new short[2]);
40: setBrcBottom(new short[2]);
41: setBrcLeft(new short[2]);
42: setBrcBetween(new short[2]);
43: setBrcRight(new short[2]);
44: setBrcTop(new short[2]);
45: setPhe(new byte[12]);
46: setAnld(new byte[84]);
47: setDttmPropRMark(new byte[4]);
48: setNumrm(new byte[8]);
49:
50: }
51:
52: public Object clone() throws CloneNotSupportedException {
53: ParagraphProperties clone = (ParagraphProperties) super .clone();
54:
55: short[] brcBar = new short[2];
56: short[] brcBottom = new short[2];
57: short[] brcLeft = new short[2];
58: short[] brcBetween = new short[2];
59: short[] brcRight = new short[2];
60: short[] brcTop = new short[2];
61: short[] lspd = new short[2];
62: byte[] phe = new byte[12];
63: byte[] anld = new byte[84];
64: byte[] dttmPropRMark = new byte[4];
65: byte[] numrm = new byte[8];
66:
67: System.arraycopy(getBrcBar(), 0, brcBar, 0, 2);
68: System.arraycopy(getBrcBottom(), 0, brcBottom, 0, 2);
69: System.arraycopy(getBrcLeft(), 0, brcLeft, 0, 2);
70: System.arraycopy(getBrcBetween(), 0, brcBetween, 0, 2);
71: System.arraycopy(getBrcRight(), 0, brcRight, 0, 2);
72: System.arraycopy(getBrcTop(), 0, brcTop, 0, 2);
73: System.arraycopy(getLspd(), 0, lspd, 0, 2);
74: System.arraycopy(getPhe(), 0, phe, 0, 12);
75: System.arraycopy(getAnld(), 0, anld, 0, 84);
76: System.arraycopy(getDttmPropRMark(), 0, dttmPropRMark, 0, 4);
77: System.arraycopy(getNumrm(), 0, numrm, 0, 8);
78:
79: clone.setBrcBar(brcBar);
80: clone.setBrcBottom(brcBottom);
81: clone.setBrcLeft(brcLeft);
82: clone.setBrcBetween(brcBetween);
83: clone.setBrcRight(brcRight);
84: clone.setBrcTop(brcTop);
85: clone.setLspd(lspd);
86: clone.setPhe(phe);
87: clone.setAnld(anld);
88: clone.setDttmPropRMark(dttmPropRMark);
89: clone.setNumrm(numrm);
90: return clone;
91: }
92:
93: }
|