|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.presentation.stream.SpreadSheet.Locator
public class SpreadSheet.Locator
Helper class that represents the location of cell within the workbook.
Represents the SpreadSheet cell reference according to used style.
Field Summary | |
---|---|
protected int |
column
|
protected int |
row
|
protected int |
sheet
|
Constructor Summary | |
---|---|
protected |
SpreadSheet.Locator(int sheet,
int row,
int column)
Constructor with sheet index, row and column. |
Method Summary | |
---|---|
SpreadSheet.Locator |
add(SpreadSheet.Locator other)
Update the specified other location by the current, so to represent the movement on certain
offset. |
Object |
clone()
Returns the clone of this location. |
void |
extendBy(SpreadSheet.Locator other)
Update the current location by the specified offset. |
void |
increaseRow()
|
protected SpreadSheet.Locator |
parse(String address)
Parses the Spreadsheet Cell address from textual form. |
String |
toExcelForm()
Returns the textual representation of this location (non-zero based). |
String |
toString()
Returns the textual representation of this location (zero based). |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int sheet
protected int row
protected int column
Constructor Detail |
---|
protected SpreadSheet.Locator(int sheet, int row, int column)
-1
) value means that it is mean the
current sheet and it should be resolved by
sheet resolution procedure
for
correct representation.
sheet
- The zero-based index of sheet within current workbook.row
- The zero based index of row withing current sheet.column
- the zero-based index of column within current row.Method Detail |
---|
public SpreadSheet.Locator add(SpreadSheet.Locator other)
other
location by the current, so to represent the movement on certain
offset.
Returns the updated location that is increased by this one if it is not null
. Otherwise, the
cloned current location is returned. Also, depends on nature of provided location, it will be updated or not.
The absolute location (i.e. with specified sheet that is differ from current) is returned without any
changes.
other
- the location that is assumed as new location, updated by this one.
public void extendBy(SpreadSheet.Locator other)
other
one. So, this location will keep the maximal
values of row and column withing current sheet. (I.e. if specified other
located on other sheet
the update will not happened.)
other
- The location by which this location should be extend. May be null
.public String toString()
another textual representation
returns the
zero-based representation of row / column addressing.
toString
in class Object
public String toExcelForm()
another textual representation
returns the
non-zero based representation of row / column addressing.
public Object clone()
clone support
contract but it is
subject of change (In the JVM before 1.5 there was a problem with native clone implementation so construction
of new was better.)
clone
in class Object
Error
- if cloning failed to do.protected SpreadSheet.Locator parse(String address)
address
- The cell address to be parsed.
address
instance that points on
addressed cell.
NullPointerException
- If provided address is empty or null
IllegalArgumentException
- If provided address is invalid.
IndexOutOfBoundsException
- If provided address referred the absent sheet.public void increaseRow()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |