KickJava   Java API By Example, From Geeks To Geeks.

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


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