-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCell.java
More file actions
91 lines (81 loc) · 2.84 KB
/
Cell.java
File metadata and controls
91 lines (81 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*********************************************************************
*
* Copyright (C) 2002 Andrew Khan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
import jxl.format.CellFormat;
/**
* Represents an individual Cell within a Sheet. May be queried for its
* type and its content
*/
public interface Cell
{
/**
* Returns the row number of this cell
*
* @return the row number of this cell
*/
public int getRow();
/**
* Returns the column number of this cell
*
* @return the column number of this cell
*/
public int getColumn();
public default CellCoordinate getCoordinate() {
return new CellCoordinate(getColumn(), getRow());
}
/**
* Returns the content type of this cell
*
* @return the content type for this cell
*/
public CellType getType();
/**
* Indicates whether or not this cell is hidden, by virtue of either
* the entire row or column being collapsed
*
* @return TRUE if this cell is hidden, FALSE otherwise
*/
public boolean isHidden();
/**
* Quick and dirty function to return the contents of this cell as a string.
* For more complex manipulation of the contents, it is necessary to cast
* this interface to correct subinterface
*
* @return the contents of this cell as a string
*/
public String getContents();
/**
* Gets the cell format which applies to this cell
* Note that for cell with a cell type of EMPTY, which has no formatting
* information, this method will return null. Some empty cells (eg. on
* template spreadsheets) may have a cell type of EMPTY, but will
* actually contain formatting information
*
* @return the cell format applied to this cell, or NULL if this is an
* empty cell
*/
public CellFormat getCellFormat();
/**
* Gets any special cell features, such as comments (notes) or cell
* validation present for this cell
*
* @return the cell features, or NULL if this cell has no special features
*/
public CellFeatures getCellFeatures();
}