Package org.miaixz.bus.office.excel
Class SimpleAnchor
java.lang.Object
org.miaixz.bus.office.excel.SimpleAnchor
- All Implemented Interfaces:
org.apache.poi.ss.usermodel.ClientAnchor
简单的ClientAnchor实现,此对象表示一个图形或绘图在Excel中的位置和大小,参数表示:
- dx1和dy1表示在左上角单元格中的偏移量,col1和row1表示左上角单元格
- dx2和dy2表示在右下角单元格中的偏移量,col2和row2表示右下角单元格
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.poi.ss.usermodel.ClientAnchor
org.apache.poi.ss.usermodel.ClientAnchor.AnchorType -
Constructor Summary
ConstructorsConstructorDescriptionSimpleAnchor(int col1, int row1, int col2, int row2) 构造 通过定义左上角和右下角的单元格,创建一个ClientAnchor对象 默认偏移为0,默认type为:ClientAnchor.AnchorType.MOVE_AND_RESIZE.SimpleAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2) 构造 通过定义左上角和右下角的单元格,以及单元格中的偏移量,创建一个ClientAnchor对象 默认type为:ClientAnchor.AnchorType.MOVE_AND_RESIZE. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.poi.ss.usermodel.ClientAnchorcopyTo(org.apache.poi.ss.usermodel.ClientAnchor clientAnchor) 将当前对象中的值复制到目标对象中org.apache.poi.ss.usermodel.ClientAnchor.AnchorTypeshortgetCol1()shortgetCol2()intgetDx1()intgetDx2()intgetDy1()intgetDy2()intgetRow1()intgetRow2()voidsetAnchorType(org.apache.poi.ss.usermodel.ClientAnchor.AnchorType anchorType) voidsetCol1(int col1) voidsetCol2(int col2) voidsetDx1(int dx1) voidsetDx2(int dx2) voidsetDy1(int dy1) voidsetDy2(int dy2) voidsetRow1(int row1) voidsetRow2(int row2)
-
Constructor Details
-
SimpleAnchor
public SimpleAnchor(int col1, int row1, int col2, int row2) 构造 通过定义左上角和右下角的单元格,创建一个ClientAnchor对象 默认偏移为0,默认type为:ClientAnchor.AnchorType.MOVE_AND_RESIZE.- Parameters:
col1- 指定起始的列,下标从0开始row1- 指定起始的行,下标从0开始col2- 指定结束的列,下标从0开始row2- 指定结束的行,下标从0开始
-
SimpleAnchor
public SimpleAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2) 构造 通过定义左上角和右下角的单元格,以及单元格中的偏移量,创建一个ClientAnchor对象 默认type为:ClientAnchor.AnchorType.MOVE_AND_RESIZE.- Parameters:
dx1- 起始单元格中的x偏移像素dy1- 起始单元格中的y偏移像素dx2- 结束单元格中的x偏移像素dy2- 结束单元格中的y偏移像素col1- 指定起始的列,下标从0开始row1- 指定起始的行,下标从0开始col2- 指定结束的列,下标从0开始row2- 指定结束的行,下标从0开始
-
-
Method Details
-
getDx1
public int getDx1()- Specified by:
getDx1in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setDx1
public void setDx1(int dx1) - Specified by:
setDx1in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
getDy1
public int getDy1()- Specified by:
getDy1in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setDy1
public void setDy1(int dy1) - Specified by:
setDy1in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
getDx2
public int getDx2()- Specified by:
getDx2in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setDx2
public void setDx2(int dx2) - Specified by:
setDx2in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
getDy2
public int getDy2()- Specified by:
getDy2in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setDy2
public void setDy2(int dy2) - Specified by:
setDy2in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
getCol1
public short getCol1()- Specified by:
getCol1in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setCol1
public void setCol1(int col1) - Specified by:
setCol1in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
getRow1
public int getRow1()- Specified by:
getRow1in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setRow1
public void setRow1(int row1) - Specified by:
setRow1in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
getCol2
public short getCol2()- Specified by:
getCol2in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setCol2
public void setCol2(int col2) - Specified by:
setCol2in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
getRow2
public int getRow2()- Specified by:
getRow2in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setRow2
public void setRow2(int row2) - Specified by:
setRow2in interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
getAnchorType
public org.apache.poi.ss.usermodel.ClientAnchor.AnchorType getAnchorType()- Specified by:
getAnchorTypein interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
setAnchorType
public void setAnchorType(org.apache.poi.ss.usermodel.ClientAnchor.AnchorType anchorType) - Specified by:
setAnchorTypein interfaceorg.apache.poi.ss.usermodel.ClientAnchor
-
copyTo
public org.apache.poi.ss.usermodel.ClientAnchor copyTo(org.apache.poi.ss.usermodel.ClientAnchor clientAnchor) 将当前对象中的值复制到目标对象中- Parameters:
clientAnchor-ClientAnchor- Returns:
- 目标对象
-