public final class HSSFClientAnchor extends HSSFAnchor implements ClientAnchor
ClientAnchor.AnchorType
Modifier and Type | Field and Description |
---|---|
static int |
MAX_COL |
static int |
MAX_ROW |
_isHorizontallyFlipped, _isVerticallyFlipped
Constructor and Description |
---|
HSSFClientAnchor()
Creates a new client anchor and defaults all the anchor positions to 0.
|
HSSFClientAnchor(EscherClientAnchorRecord escherClientAnchorRecord) |
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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createEscherAnchor() |
boolean |
equals(java.lang.Object obj) |
float |
getAnchorHeightInPoints(HSSFSheet sheet)
Calculates the height of a client anchor in points.
|
ClientAnchor.AnchorType |
getAnchorType()
Gets the anchor type
Changed from returning an int to an enum in POI 3.14 beta 1.
|
short |
getCol1()
Returns the column (0 based) of the first cell, or -1 if there is no top-left anchor cell.
|
short |
getCol2()
Returns the column (0 based) of the second cell, or -1 if there is no bottom-right anchor cell.
|
int |
getDx1()
Returns the x coordinate within the first cell.
|
int |
getDx2()
Returns the x coordinate within the second cell
Note - XSSF and HSSF have a slightly different coordinate
system, values in XSSF are larger by a factor of
Units.EMU_PER_PIXEL |
int |
getDy1()
Returns the y coordinate within the first cell
Note - XSSF and HSSF have a slightly different coordinate
system, values in XSSF are larger by a factor of
Units.EMU_PER_PIXEL |
int |
getDy2()
Sets the y coordinate within the second cell
Note - XSSF and HSSF have a slightly different coordinate
system, values in XSSF are larger by a factor of
Units.EMU_PER_PIXEL |
protected EscherRecord |
getEscherAnchor() |
int |
getRow1()
Returns the row (0 based) of the first cell, or -1 if there is no bottom-right anchor cell.
|
int |
getRow2()
Returns the row (0 based) of the second cell, or -1 if there is no bottom-right anchor cell.
|
int |
hashCode() |
boolean |
isHorizontallyFlipped() |
boolean |
isVerticallyFlipped() |
void |
setAnchor(short col1,
int row1,
int x1,
int y1,
short col2,
int row2,
int x2,
int y2)
Sets the top-left and bottom-right coordinates of
the anchor.
|
void |
setAnchorType(ClientAnchor.AnchorType 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 |
setDx1(int dx1)
Sets the x coordinate within the first cell
Note - XSSF and HSSF have a slightly different coordinate
system, values in XSSF are larger by a factor of
Units.EMU_PER_PIXEL |
void |
setDx2(int dx2)
Sets the x coordinate within the second cell
Note - XSSF and HSSF have a slightly different coordinate
system, values in XSSF are larger by a factor of
Units.EMU_PER_PIXEL |
void |
setDy1(int dy1)
Sets the y coordinate within the first cell
Note - XSSF and HSSF have a slightly different coordinate
system, values in XSSF are larger by a factor of
Units.EMU_PER_PIXEL |
void |
setDy2(int dy2)
Sets the y coordinate within the second cell
Note - XSSF and HSSF have a slightly different coordinate
system, values in XSSF are larger by a factor of
Units.EMU_PER_PIXEL |
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.
|
createAnchorFromEscher
public HSSFClientAnchor(EscherClientAnchorRecord escherClientAnchorRecord)
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.public float getAnchorHeightInPoints(HSSFSheet sheet)
sheet
- the sheet the anchor will be attached topublic short getCol1()
ClientAnchor
ClientAnchor.AnchorType.MOVE_AND_RESIZE
getCol1
in interface ClientAnchor
public void setCol1(short col1)
col1
- the column(0 based) of the first cell.public void setCol1(int col1)
ClientAnchor
setCol1
in interface ClientAnchor
col1
- 0-based column of the first cell.public short getCol2()
ClientAnchor
ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE
)
and absolute sizing (ClientAnchor.AnchorType.MOVE_DONT_RESIZE
.getCol2
in interface ClientAnchor
public void setCol2(short col2)
col2
- the column(0 based) of the second cell.public void setCol2(int col2)
ClientAnchor
setCol2
in interface ClientAnchor
col2
- the column(0 based) of the second cell.public int getRow1()
ClientAnchor
ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE
).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
ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE
)
and absolute sizing (ClientAnchor.AnchorType.MOVE_DONT_RESIZE
.getRow2
in interface ClientAnchor
public void setRow2(int row2)
ClientAnchor
setRow2
in interface ClientAnchor
row2
- the row(0 based) of the second 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
protected EscherRecord getEscherAnchor()
getEscherAnchor
in class HSSFAnchor
protected void createEscherAnchor()
createEscherAnchor
in class HSSFAnchor
public ClientAnchor.AnchorType getAnchorType()
getAnchorType
in interface ClientAnchor
public void setAnchorType(ClientAnchor.AnchorType anchorType)
setAnchorType
in interface ClientAnchor
anchorType
- the anchor type to setpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int getDx1()
ClientAnchor
Units.EMU_PER_PIXEL
getDx1
in interface ChildAnchor
getDx1
in interface ClientAnchor
public void setDx1(int dx1)
ClientAnchor
Units.EMU_PER_PIXEL
setDx1
in interface ChildAnchor
setDx1
in interface ClientAnchor
dx1
- the x coordinate within the first cellpublic int getDy1()
ClientAnchor
Units.EMU_PER_PIXEL
getDy1
in interface ChildAnchor
getDy1
in interface ClientAnchor
public void setDy1(int dy1)
ClientAnchor
Units.EMU_PER_PIXEL
setDy1
in interface ChildAnchor
setDy1
in interface ClientAnchor
dy1
- the y coordinate within the first cellpublic int getDy2()
ClientAnchor
Units.EMU_PER_PIXEL
getDy2
in interface ChildAnchor
getDy2
in interface ClientAnchor
public void setDy2(int dy2)
ClientAnchor
Units.EMU_PER_PIXEL
setDy2
in interface ChildAnchor
setDy2
in interface ClientAnchor
dy2
- the y coordinate within the second cellpublic int getDx2()
ClientAnchor
Units.EMU_PER_PIXEL
getDx2
in interface ChildAnchor
getDx2
in interface ClientAnchor
public void setDx2(int dx2)
ClientAnchor
Units.EMU_PER_PIXEL
setDx2
in interface ChildAnchor
setDx2
in interface ClientAnchor
dx2
- the x coordinate within the second cellCopyright 2020 The Apache Software Foundation or its licensors, as applicable.