|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.usermodel.HSSFAnchor org.apache.poi.hssf.usermodel.HSSFClientAnchor
public final class HSSFClientAnchor
A client anchor is attached to an excel worksheet. It anchors against a top-left and buttom-right cell.
Field Summary |
---|
Fields inherited from interface org.apache.poi.ss.usermodel.ClientAnchor |
---|
DONT_MOVE_AND_RESIZE, MOVE_AND_RESIZE, MOVE_DONT_RESIZE |
Constructor Summary | |
---|---|
HSSFClientAnchor()
Creates a new client anchor and defaults all the anchor positions to 0. |
|
HSSFClientAnchor(int dx1,
int dy1,
int dx2,
int dy2,
short col1,
int row1,
short col2,
int row2)
Creates a new client anchor and sets the top-left and bottom-right coordinates of the anchor. |
Method Summary | |
---|---|
float |
getAnchorHeightInPoints(HSSFSheet sheet)
Calculates the height of a client anchor in points. |
int |
getAnchorType()
Gets the anchor type |
short |
getCol1()
Returns the column (0 based) of the first cell. |
short |
getCol2()
Returns the column (0 based) of the second cell. |
int |
getRow1()
Returns the row (0 based) of the first cell. |
int |
getRow2()
Returns the row (0 based) of the second cell. |
boolean |
isHorizontallyFlipped()
|
boolean |
isVerticallyFlipped()
|
void |
setAnchor(short col1,
int row1,
int x1,
int y1,
short col2,
int row2,
int x2,
int y2)
Dets the top-left and bottom-right coordinates of the anchor. |
void |
setAnchorType(int anchorType)
Sets the anchor type |
void |
setCol1(int col1)
Sets the column (0 based) of the first cell. |
void |
setCol1(short col1)
|
void |
setCol2(int col2)
Returns the column (0 based) of the second cell. |
void |
setCol2(short col2)
|
void |
setRow1(int row1)
Returns the row (0 based) of the first cell. |
void |
setRow2(int row2)
Returns the row (0 based) of the first cell. |
Methods inherited from class org.apache.poi.hssf.usermodel.HSSFAnchor |
---|
getDx1, getDx2, getDy1, getDy2, setDx1, setDx2, setDy1, setDy2 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.poi.ss.usermodel.ClientAnchor |
---|
getDx1, getDx2, getDy1, getDy2, setDx1, setDx2, setDy1, setDy2 |
Constructor Detail |
---|
public HSSFClientAnchor()
public HSSFClientAnchor(int dx1, int dy1, int dx2, int dy2, short col1, int row1, short col2, int row2)
dx1
- the x coordinate within the first cell.dy1
- the y coordinate within the first cell.dx2
- the x coordinate within the second cell.dy2
- the y coordinate within the second cell.col1
- the column (0 based) of the first cell.row1
- the row (0 based) of the first cell.col2
- the column (0 based) of the second cell.row2
- the row (0 based) of the second cell.Method Detail |
---|
public float getAnchorHeightInPoints(HSSFSheet sheet)
sheet
- the sheet the anchor will be attached to
public short getCol1()
ClientAnchor
getCol1
in interface ClientAnchor
public void setCol1(short col1)
public void setCol1(int col1)
ClientAnchor
setCol1
in interface ClientAnchor
col1
- 0-based column of the first cell.public short getCol2()
ClientAnchor
getCol2
in interface ClientAnchor
public void setCol2(short col2)
public void setCol2(int col2)
ClientAnchor
setCol2
in interface ClientAnchor
col2
- 0-based column of the second cell.public int getRow1()
ClientAnchor
getRow1
in interface ClientAnchor
public void setRow1(int row1)
ClientAnchor
setRow1
in interface ClientAnchor
row1
- 0-based row of the first cell.public int getRow2()
ClientAnchor
getRow2
in interface ClientAnchor
public void setRow2(int row2)
ClientAnchor
setRow2
in interface ClientAnchor
row2
- 0-based row of the first cell.public void setAnchor(short col1, int row1, int x1, int y1, short col2, int row2, int x2, int y2)
x1
- the x coordinate within the first cell.y1
- the y coordinate within the first cell.x2
- the x coordinate within the second cell.y2
- the y coordinate within the second cell.col1
- the column (0 based) of the first cell.row1
- the row (0 based) of the first cell.col2
- the column (0 based) of the second cell.row2
- the row (0 based) of the second cell.public boolean isHorizontallyFlipped()
isHorizontallyFlipped
in class HSSFAnchor
public boolean isVerticallyFlipped()
isVerticallyFlipped
in class HSSFAnchor
public int getAnchorType()
0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.
getAnchorType
in interface ClientAnchor
ClientAnchor.MOVE_AND_RESIZE
,
ClientAnchor.MOVE_DONT_RESIZE
,
ClientAnchor.DONT_MOVE_AND_RESIZE
public void setAnchorType(int anchorType)
0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.
setAnchorType
in interface ClientAnchor
anchorType
- the anchor typeClientAnchor.MOVE_AND_RESIZE
,
ClientAnchor.MOVE_DONT_RESIZE
,
ClientAnchor.DONT_MOVE_AND_RESIZE
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |