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.hwpf.usermodel;
19:
20: public class TableCell extends Range {
21: private int _levelNum;
22: private TableCellDescriptor _tcd;
23: private int _leftEdge;
24: private int _width;
25:
26: public TableCell(int startIdx, int endIdx, TableRow parent,
27: int levelNum, TableCellDescriptor tcd, int leftEdge,
28: int width) {
29: super (startIdx, endIdx, Range.TYPE_PARAGRAPH, parent);
30: _tcd = tcd;
31: _leftEdge = leftEdge;
32: _width = width;
33: _levelNum = levelNum;
34: }
35:
36: public boolean isFirstMerged() {
37: return _tcd.isFFirstMerged();
38: }
39:
40: public boolean isMerged() {
41: return _tcd.isFMerged();
42: }
43:
44: public boolean isVertical() {
45: return _tcd.isFVertical();
46: }
47:
48: public boolean isBackward() {
49: return _tcd.isFBackward();
50: }
51:
52: public boolean isRotateFont() {
53: return _tcd.isFRotateFont();
54: }
55:
56: public boolean isVerticallyMerged() {
57: return _tcd.isFVertMerge();
58: }
59:
60: public boolean isFirstVerticallyMerged() {
61: return _tcd.isFVertRestart();
62: }
63:
64: public byte getVertAlign() {
65: return _tcd.getVertAlign();
66: }
67:
68: public BorderCode getBrcTop() {
69: return _tcd.getBrcTop();
70: }
71:
72: public BorderCode getBrcBottom() {
73: return _tcd.getBrcBottom();
74: }
75:
76: public BorderCode getBrcLeft() {
77: return _tcd.getBrcLeft();
78: }
79:
80: public BorderCode getBrcRight() {
81: return _tcd.getBrcRight();
82: }
83:
84: public int getLeftEdge() // twips
85: {
86: return _leftEdge;
87: }
88:
89: public int getWidth() // twips
90: {
91: return _width;
92: }
93:
94: }
|