public class XSSFClientAnchor extends XSSFAnchor implements ClientAnchor
AnchorType
.
(客户端锚附加到 Excel 工作表。它锚定于: 固定位置和固定大小 相对于单元格的位置(左上角)和固定大小 相对于单元格的位置(左上角)和相对于另一个单元格的大小(右下角) 使用哪种方法由 AnchorType 决定。)
ClientAnchor.AnchorType
Modifier | Constructor and Description |
---|---|
|
XSSFClientAnchor()
Creates a new client anchor and defaults all the anchor positions to 0.
(创建一个新的客户端锚点并将所有锚点位置默认为 0。)
|
protected |
XSSFClientAnchor(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell1, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell2)
Create XSSFClientAnchor from existing xml beans, sized and positioned relative to a pair of cells.
(从现有的 xml bean 创建 XSSFClientAnchor,其大小和位置相对于一对单元格。)
|
|
XSSFClientAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2)
Creates a new client anchor and sets the top-left and bottom-right coordinates of the anchor by cell references and offsets.
(创建一个新的客户端锚点,并通过单元格引用和偏移设置锚点的左上角和右下角坐标。)
|
protected |
XSSFClientAnchor(XSSFSheet sheet, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell1, org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D size)
Create XSSFClientAnchor from existing xml beans, sized and positioned relative to a pair of cells.
(从现有的 xml bean 创建 XSSFClientAnchor,其大小和位置相对于一对单元格。)
|
protected |
XSSFClientAnchor(XSSFSheet sheet, org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D position, org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D size)
Create XSSFClientAnchor from existing xml beans, sized and positioned relative to a pair of cells.
(从现有的 xml bean 创建 XSSFClientAnchor,其大小和位置相对于一对单元格。)
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
ClientAnchor.AnchorType |
getAnchorType()
Gets the anchor type Changed from returning an int to an enum in POI 3.14 beta 1.
(在 POI 3.14 beta 1 中获取锚类型从返回 int 更改为 enum。)
|
short |
getCol1()
Returns the column (0 based) of the first cell, or -1 if there is no top-left anchor cell.
(返回第一个单元格的列(基于 0),如果没有左上锚单元格,则返回 -1。)
|
short |
getCol2()
Returns the column (0 based) of the second cell, or -1 if there is no bottom-right anchor cell.
(返回第二个单元格的列(基于 0),如果没有右下锚单元格,则返回 -1。)
|
int |
getDx1()
Returns the x coordinate within the first cell.
(返回第一个单元格内的 x 坐标。)
|
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
(返回第二个单元格内的 x 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 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
(返回第一个单元格内的 y 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 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
(设置第二个单元格内的 y 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
|
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker |
getFrom()
Return starting anchor point
(返回起始锚点)
|
org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D |
getPosition() |
int |
getRow1()
Returns the row (0 based) of the first cell, or -1 if there is no bottom-right anchor cell.
(返回第一个单元格的行(基于 0),如果没有右下锚单元格,则返回 -1。)
|
int |
getRow2()
Returns the row (0 based) of the second cell, or -1 if there is no bottom-right anchor cell.
(返回第二个单元格的行(基于 0),如果没有右下锚单元格,则返回 -1。)
|
org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D |
getSize() |
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker |
getTo()
Return ending anchor point
(返回结束锚点)
|
int |
hashCode() |
boolean |
isSet() |
void |
setAnchorType(ClientAnchor.AnchorType anchorType)
Sets the anchor type
(设置锚点类型)
|
void |
setCol1(int col1)
Sets the column (0 based) of the first cell.
(设置第一个单元格的列(基于 0)。)
|
void |
setCol2(int col2)
Returns the column (0 based) of the second cell.
(返回第二个单元格的列(基于 0)。)
|
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
(设置第一个单元格内的 x 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大 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
(设置第二个单元格内的 x 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 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
(设置第一个单元格内的 y 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 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
(设置第二个单元格内的 y 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
|
protected void |
setFrom(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker from) |
void |
setPosition(org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D position)
Sets the top-left absolute position of the object.
(设置对象的左上角绝对位置。)
|
void |
setRow1(int row1)
Returns the row (0 based) of the first cell.
(返回第一个单元格的行(基于 0)。)
|
void |
setRow2(int row2)
Returns the row (0 based) of the first cell.
(返回第一个单元格的行(基于 0)。)
|
void |
setSize(org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D size)
Sets the size of the object.
(设置对象的大小。)
|
protected void |
setTo(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker to) |
java.lang.String |
toString() |
public XSSFClientAnchor()
AnchorType#MOVE_AND_RESIZE
relative to cell range A1:A1.
(创建一个新的客户端锚点并将所有锚点位置默认为 0。将类型设置为相对于单元格范围 A1:A1 的 AnchorType#MOVE_AND_RESIZE。)
public XSSFClientAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2)
AnchorType#MOVE_AND_RESIZE
.
(创建一个新的客户端锚点,并通过单元格引用和偏移设置锚点的左上角和右下角坐标。将类型设置为 AnchorType#MOVE_AND_RESIZE。)
dx1
- the x coordinate within the first cell.
(dx1 - 第一个单元格内的 x 坐标。)
dy1
- the y coordinate within the first cell.
(dy1 - 第一个单元格内的 y 坐标。)
dx2
- the x coordinate within the second cell.
(dx2 - 第二个单元格内的 x 坐标。)
dy2
- the y coordinate within the second cell.
(dy2 - 第二个单元格内的 y 坐标。)
col1
- the column (0 based) of the first cell.
(col1 - 第一个单元格的列(基于 0)。)
row1
- the row (0 based) of the first cell.
(row1 - 第一个单元格的行(基于 0)。)
col2
- the column (0 based) of the second cell.
(col2 - 第二个单元格的列(基于 0)。)
row2
- the row (0 based) of the second cell.
(row2 - 第二个单元格的行(基于 0)。)
protected XSSFClientAnchor(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell1, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell2)
AnchorType#MOVE_AND_RESIZE
.
(从现有的 xml bean 创建 XSSFClientAnchor,其大小和位置相对于一对单元格。将类型设置为 AnchorType#MOVE_AND_RESIZE。)
cell1
- starting anchor point
(cell1 - 起始锚点)
cell2
- ending anchor point
(cell2 - 结束锚点)
protected XSSFClientAnchor(XSSFSheet sheet, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell1, org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D size)
AnchorType#MOVE_DONT_RESIZE
.
(从现有的 xml bean 创建 XSSFClientAnchor,其大小和位置相对于一对单元格。将类型设置为 AnchorType#MOVE_DONT_RESIZE。)
sheet
- needed to calculate ending point based on column/row sizes
(sheet - 需要根据列/行大小计算终点)
cell1
- starting anchor point
(cell1 - 起始锚点)
size
- object size, to calculate ending anchor point
(size - 对象大小,用于计算结束锚点)
protected XSSFClientAnchor(XSSFSheet sheet, org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D position, org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D size)
AnchorType#DONT_MOVE_AND_RESIZE
.
(从现有的 xml bean 创建 XSSFClientAnchor,其大小和位置相对于一对单元格。将类型设置为 AnchorType#DONT_MOVE_AND_RESIZE。)
sheet
- needed to calculate starting and ending points based on column/row sizes
(sheet - 需要根据列/行大小计算起点和终点)
position
- starting absolute position
(position - 起始绝对位置)
size
- object size, to calculate ending position
(size - 对象大小,计算结束位置)
public short getCol1()
ClientAnchor
ClientAnchor.AnchorType.MOVE_AND_RESIZE
(返回第一个单元格的列(基于 0),如果没有左上锚单元格,则返回 -1。这是绝对定位的情况 ClientAnchor.AnchorType.MOVE_AND_RESIZE)
getCol1
in interface
ClientAnchor
(接口 ClientAnchor 中的 getCol1)
public void setCol1(int col1)
ClientAnchor
setCol1
in interface
ClientAnchor
(接口 ClientAnchor 中的 setCol1)
col1
- 0-based column of the first cell.
(col1 - 第一个单元格的基于 0 的列。)
java.lang.NullPointerException
- if cell1 is null (fixed position)
(java.lang.NullPointerException - 如果 cell1 为空(固定位置))
ClientAnchor.setCol1(int)
public short getCol2()
ClientAnchor
ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE
) and absolute sizing (
ClientAnchor.AnchorType.MOVE_DONT_RESIZE
.
(返回第二个单元格的列(基于 0),如果没有右下锚单元格,则返回 -1。绝对定位 (ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE) 和绝对大小 (ClientAnchor.AnchorType.MOVE_DONT_RESIZE) 就是这种情况。)
getCol2
in interface
ClientAnchor
(接口 ClientAnchor 中的 getCol2)
public void setCol2(int col2)
ClientAnchor
setCol2
in interface
ClientAnchor
(接口 ClientAnchor 中的 setCol2)
col2
- 0-based column of the second cell.
(col2 - 第二个单元格的基于 0 的列。)
java.lang.NullPointerException
- if cell2 is null (fixed size)
(java.lang.NullPointerException - 如果 cell2 为空(固定大小))
ClientAnchor.setCol2(int)
public int getRow1()
ClientAnchor
ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE
).
(返回第一个单元格的行(基于 0),如果没有右下锚单元格,则返回 -1。这是绝对定位的情况(ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE)。)
getRow1
in interface
ClientAnchor
(接口 ClientAnchor 中的 getRow1)
public void setRow1(int row1)
ClientAnchor
setRow1
in interface
ClientAnchor
(接口 ClientAnchor 中的 setRow1)
row1
- 0-based row of the first cell.
(row1 - 第一个单元格的从 0 开始的行。)
java.lang.NullPointerException
- if cell1 is null (fixed position)
(java.lang.NullPointerException - 如果 cell1 为空(固定位置))
ClientAnchor.setRow1(int)
public int getRow2()
ClientAnchor
ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE
) and absolute sizing (
ClientAnchor.AnchorType.MOVE_DONT_RESIZE
.
(返回第二个单元格的行(基于 0),如果没有右下锚单元格,则返回 -1。这是绝对定位 (ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE) 和绝对大小 (ClientAnchor.AnchorType.MOVE_DONT_RESIZE) 的情况。)
getRow2
in interface
ClientAnchor
(接口 ClientAnchor 中的 getRow2)
public void setRow2(int row2)
ClientAnchor
setRow2
in interface
ClientAnchor
(接口 ClientAnchor 中的 setRow2)
row2
- 0-based row of the first cell.
(row2 - 第一个单元格的从 0 开始的行。)
java.lang.NullPointerException
- if cell2 is null (fixed size)
(java.lang.NullPointerException - 如果 cell2 为空(固定大小))
ClientAnchor.setRow2(int)
public int getDx1()
ClientAnchor
Units.EMU_PER_PIXEL
(返回第一个单元格内的 x 坐标。注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
getDx1
in interface
ChildAnchor
(接口 ChildAnchor 中的 getDx1)
getDx1
in interface
ClientAnchor
(接口 ClientAnchor 中的 getDx1)
public void setDx1(int dx1)
ClientAnchor
Units.EMU_PER_PIXEL
(设置第一个单元格内的 x 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大 Units.EMU_PER_PIXEL 的一个因子)
setDx1
in interface
ChildAnchor
(接口 ChildAnchor 中的 setDx1)
setDx1
in interface
ClientAnchor
(接口 ClientAnchor 中的 setDx1)
dx1
- the x coordinate within the first cell
(dx1 - 第一个单元格内的 x 坐标)
java.lang.NullPointerException
- if cell1 is null (fixed position)
(java.lang.NullPointerException - 如果 cell1 为空(固定位置))
ChildAnchor.setDx1(int)
public int getDy1()
ClientAnchor
Units.EMU_PER_PIXEL
(返回第一个单元格内的 y 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
getDy1
in interface
ChildAnchor
(接口 ChildAnchor 中的 getDy1)
getDy1
in interface
ClientAnchor
(接口 ClientAnchor 中的 getDy1)
public void setDy1(int dy1)
ClientAnchor
Units.EMU_PER_PIXEL
(设置第一个单元格内的 y 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
setDy1
in interface
ChildAnchor
(接口 ChildAnchor 中的 setDy1)
setDy1
in interface
ClientAnchor
(接口 ClientAnchor 中的 setDy1)
dy1
- the y coordinate within the first cell
(dy1 - 第一个单元格内的 y 坐标)
java.lang.NullPointerException
- if cell1 is null (fixed position)
(java.lang.NullPointerException - 如果 cell1 为空(固定位置))
ChildAnchor.setDy1(int)
public int getDy2()
ClientAnchor
Units.EMU_PER_PIXEL
(设置第二个单元格内的 y 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
getDy2
in interface
ChildAnchor
(接口 ChildAnchor 中的 getDy2)
getDy2
in interface
ClientAnchor
(接口 ClientAnchor 中的 getDy2)
public void setDy2(int dy2)
ClientAnchor
Units.EMU_PER_PIXEL
(设置第二个单元格内的 y 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
setDy2
in interface
ChildAnchor
(接口 ChildAnchor 中的 setDy2)
setDy2
in interface
ClientAnchor
(接口 ClientAnchor 中的 setDy2)
dy2
- the y coordinate within the second cell
(dy2 - 第二个单元格内的 y 坐标)
java.lang.NullPointerException
- if cell2 is null (fixed size)
(java.lang.NullPointerException - 如果 cell2 为空(固定大小))
ChildAnchor.setDy2(int)
public int getDx2()
ClientAnchor
Units.EMU_PER_PIXEL
(返回第二个单元格内的 x 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
getDx2
in interface
ChildAnchor
(接口 ChildAnchor 中的 getDx2)
getDx2
in interface
ClientAnchor
(接口 ClientAnchor 中的 getDx2)
public void setDx2(int dx2)
ClientAnchor
Units.EMU_PER_PIXEL
(设置第二个单元格内的 x 坐标 注意 - XSSF 和 HSSF 的坐标系略有不同,XSSF 中的值大了 Units.EMU_PER_PIXEL 的一个因子)
setDx2
in interface
ChildAnchor
(接口 ChildAnchor 中的 setDx2)
setDx2
in interface
ClientAnchor
(接口 ClientAnchor 中的 setDx2)
dx2
- the x coordinate within the second cell
(dx2 - 第二个单元格内的 x 坐标)
java.lang.NullPointerException
- if cell2 is null (fixed size)
(java.lang.NullPointerException - 如果 cell2 为空(固定大小))
ChildAnchor.setDx2(int)
public boolean equals(java.lang.Object o)
equals
in class
java.lang.Object
public int hashCode()
hashCode
in class
java.lang.Object
public java.lang.String toString()
toString
in class
java.lang.Object
@Internal public org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker getFrom()
protected void setFrom(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker from)
@Internal public org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker getTo()
protected void setTo(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker to)
public org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D getPosition()
public void setPosition(org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D position)
position
-
(位置 -)
public org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D getSize()
public void setSize(org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D size)
size
-
(尺寸 -)
public void setAnchorType(ClientAnchor.AnchorType anchorType)
setAnchorType
in interface
ClientAnchor
(接口 ClientAnchor 中的 setAnchorType)
anchorType
- the anchor type to set
(anchorType - 要设置的锚类型)
public ClientAnchor.AnchorType getAnchorType()
getAnchorType
in interface
ClientAnchor
(接口 ClientAnchor 中的 getAnchorType)
public boolean isSet()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.