|
xelem.3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.fountain.xelem.Address
nl.fountain.xelem.CellPointer
public class CellPointer
Keeps track of the position of cells being added to the
Worksheet.
[The position of the cellpointer is not displayed in the
actual Excel worksheet. If you wish to set the active cell in the
actual Excel worksheet on a position other then row 1, column 1, you
should use
WorksheetOptions.setActiveCell(int, int).]
The position of the cellpointer is reflected in it's
getRowIndex- and
getColumnIndex-values.
The cellpointer moves to a new position relative to its old
position at a call to move(). In what direction it moves and over
how many cells depends on it's settings. The default setting is to step
1 column to the right.
| Field Summary | |
|---|---|
static int |
MOVE_DOWN
A constant for the method setMovement(int). |
static int |
MOVE_LEFT
A constant for the method setMovement(int). |
static int |
MOVE_RIGHT
A constant for the method setMovement(int). |
static int |
MOVE_UP
A constant for the method setMovement(int). |
| Fields inherited from class nl.fountain.xelem.Address |
|---|
c, r |
| Constructor Summary | |
|---|---|
CellPointer()
Constructs a new CellPointer. |
|
| Method Summary | |
|---|---|
Address |
getAddress()
Gets the address of the cell where this cellpointer is pointing at. |
int |
getHorizontalStepDistance()
Gets the horizontalStepDistance. |
int |
getMovement()
Gets the direction into which this cellpointer will move. |
int |
getVerticalStepDistance()
Gets the verticalStepDistance. |
void |
move()
Moves this cellpointer. |
void |
move(int rows,
int columns)
Moves this cellpointer to a new position relative to it's old position. |
void |
moveCRLF()
Moves this cellpointer to the first column of the next row. |
void |
moveHome()
Moves this cellpointer to the first column of the present row. |
void |
moveTo(Address address)
Moves this cellpointer to the specified address. |
void |
moveTo(int row,
int column)
Moves this cellpointer to the specified row and column number. |
void |
moveTo(String a1_ref)
Moves this cellpointer to the address specified by the given A1-reference string. |
void |
setHorizontalStepDistance(int distance)
Sets the number of cells this cellpointer will move in the horizontal axis after a call to move(). |
void |
setMovement(int moveConst)
Sets the direction this cellpointer will move after a call to move(). |
void |
setVerticalStepDistance(int distance)
Sets the number of cells this cellpointer will move in the vertical axis after a call to move(). |
| Methods inherited from class nl.fountain.xelem.Address |
|---|
calculateColumn, calculateColumn, calculateRow, compareTo, equals, getA1Reference, getAbsoluteAddress, getAbsoluteRange, getAbsoluteRange, getAbsoluteRange, getColumnIndex, getRefTo, getRefTo, getRefTo, getRefTo, getRefTo, getRefTo, getRowIndex, isWithinSheet, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MOVE_RIGHT
setMovement(int).
public static final int MOVE_LEFT
setMovement(int).
public static final int MOVE_DOWN
setMovement(int).
public static final int MOVE_UP
setMovement(int).
| Constructor Detail |
|---|
public CellPointer()
move() is to move one
column to the right.
Worksheet.getCellPointer()| Method Detail |
|---|
public Address getAddress()
public void setHorizontalStepDistance(int distance)
move().
The default is 1.
If the movement of this cellpointer is set to MOVE_DOWN or MOVE_UP the value of horizontalStepDistance has no influence on this pointers move-behavior.
If the horizontalStepDistance is set to a negative value the pointer will move to the left when movement is set to MOVE_RIGHT and to the right when movement is set to MOVE_LEFT.
If the horizontalStepDistance is set to 0,
the pointer will not move when movement is set to
MOVE_RIGHT or MOVE_LEFT.
distance - The number of cells to move in the horizontal
axis.setMovement(int)public int getHorizontalStepDistance()
public void setVerticalStepDistance(int distance)
move().
The default is 1.
If the movement of this cellpointer is set to MOVE_RIGHT or MOVE_LEFT the value of verticalStepDistance has no influence on this pointers move-behavior.
If the verticalStepDistance is set to a negative value the pointer will move up when movement is set to MOVE_DOWN and down when movement is set to MOVE_UP.
If the verticalStepDistance is set to 0,
the pointer will not move when movement is set to
MOVE_DOWN or MOVE_UP.
distance - The number of cells to move in the vertical
axis.setMovement(int)public int getVerticalStepDistance()
public void setMovement(int moveConst)
move(). The default is MOVE_RIGHT.
moveConst - One of CellPointer's MOVE_RIGHT, MOVE_LEFT, MOVE_DOWN
or MOVE_UP values.
IllegalArgumentException - at values less than 0 or greater then 3.public int getMovement()
public void move()
setMovement(int). How many cells the pointer will
move depends on the setting of the step distance.
setMovement(int),
setHorizontalStepDistance(int),
setVerticalStepDistance(int)
public void move(int rows,
int columns)
rows - the number of rows to movecolumns - the number of columns to move
public void moveTo(int row,
int column)
row - the row where this cellpointer should move tocolumn - the column where this cellpointer should move topublic void moveTo(String a1_ref)
a1_ref - a string of A1-reference typepublic void moveTo(Address address)
address - the address where this cellpointer should move topublic void moveHome()
Worksheet.firstColumn.
public void moveCRLF()
Worksheet.firstColumn.
How many rows the new position will be from the present position
is determined by the value of
verticalStepDistance.
|
xelem.3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||