public class XSSFClientAnchor extends XSSFAnchor implements ClientAnchor
AnchorType.ClientAnchor.AnchorType| Modifier | Constructor and Description |
|---|---|
|
XSSFClientAnchor()
Creates a new client anchor and defaults all the anchor positions to 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.
|
|
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.
|
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.
|
| 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.
|
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 |
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.
|
int |
getRow2()
Returns the row (0 based) of the second cell, or -1 if there is no bottom-right anchor cell.
|
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.
|
void |
setCol2(int col2)
Returns the column (0 based) of the second cell.
|
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 |
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.
|
void |
setRow2(int row2)
Returns the row (0 based) of the first cell.
|
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.public XSSFClientAnchor(int dx1,
int dy1,
int dx2,
int dy2,
int col1,
int row1,
int col2,
int row2)
AnchorType#MOVE_AND_RESIZE.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.protected XSSFClientAnchor(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell1,
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell2)
AnchorType#MOVE_AND_RESIZE.cell1 - starting anchor pointcell2 - ending anchor pointprotected XSSFClientAnchor(XSSFSheet sheet, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker cell1, org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D size)
AnchorType#MOVE_DONT_RESIZE.sheet - needed to calculate ending point based on column/row sizescell1 - starting anchor pointsize - object size, to calculate ending anchor pointprotected XSSFClientAnchor(XSSFSheet sheet, org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D position, org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D size)
AnchorType#DONT_MOVE_AND_RESIZE.sheet - needed to calculate starting and ending points based on column/row sizesposition - starting absolute positionsize - object size, to calculate ending positionpublic short getCol1()
ClientAnchorClientAnchor.AnchorType.MOVE_AND_RESIZEgetCol1 in interface ClientAnchorpublic void setCol1(int col1)
ClientAnchorsetCol1 in interface ClientAnchorcol1 - 0-based column of the first cell.java.lang.NullPointerException - if cell1 is null (fixed position)ClientAnchor.setCol1(int)public short getCol2()
ClientAnchorClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE)
and absolute sizing (ClientAnchor.AnchorType.MOVE_DONT_RESIZE.getCol2 in interface ClientAnchorpublic void setCol2(int col2)
ClientAnchorsetCol2 in interface ClientAnchorcol2 - 0-based column of the second cell.java.lang.NullPointerException - if cell2 is null (fixed size)ClientAnchor.setCol2(int)public int getRow1()
ClientAnchorClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE).getRow1 in interface ClientAnchorpublic void setRow1(int row1)
ClientAnchorsetRow1 in interface ClientAnchorrow1 - 0-based row of the first cell.java.lang.NullPointerException - if cell1 is null (fixed position)ClientAnchor.setRow1(int)public int getRow2()
ClientAnchorClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE)
and absolute sizing (ClientAnchor.AnchorType.MOVE_DONT_RESIZE.getRow2 in interface ClientAnchorpublic void setRow2(int row2)
ClientAnchorsetRow2 in interface ClientAnchorrow2 - 0-based row of the first cell.java.lang.NullPointerException - if cell2 is null (fixed size)ClientAnchor.setRow2(int)public int getDx1()
ClientAnchorUnits.EMU_PER_PIXELgetDx1 in interface ChildAnchorgetDx1 in interface ClientAnchorpublic void setDx1(int dx1)
ClientAnchorUnits.EMU_PER_PIXELsetDx1 in interface ChildAnchorsetDx1 in interface ClientAnchordx1 - the x coordinate within the first celljava.lang.NullPointerException - if cell1 is null (fixed position)ChildAnchor.setDx1(int)public int getDy1()
ClientAnchorUnits.EMU_PER_PIXELgetDy1 in interface ChildAnchorgetDy1 in interface ClientAnchorpublic void setDy1(int dy1)
ClientAnchorUnits.EMU_PER_PIXELsetDy1 in interface ChildAnchorsetDy1 in interface ClientAnchordy1 - the y coordinate within the first celljava.lang.NullPointerException - if cell1 is null (fixed position)ChildAnchor.setDy1(int)public int getDy2()
ClientAnchorUnits.EMU_PER_PIXELgetDy2 in interface ChildAnchorgetDy2 in interface ClientAnchorpublic void setDy2(int dy2)
ClientAnchorUnits.EMU_PER_PIXELsetDy2 in interface ChildAnchorsetDy2 in interface ClientAnchordy2 - the y coordinate within the second celljava.lang.NullPointerException - if cell2 is null (fixed size)ChildAnchor.setDy2(int)public int getDx2()
ClientAnchorUnits.EMU_PER_PIXELgetDx2 in interface ChildAnchorgetDx2 in interface ClientAnchorpublic void setDx2(int dx2)
ClientAnchorUnits.EMU_PER_PIXELsetDx2 in interface ChildAnchorsetDx2 in interface ClientAnchordx2 - the x coordinate within the second celljava.lang.NullPointerException - if cell2 is null (fixed size)ChildAnchor.setDx2(int)public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic 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 ClientAnchoranchorType - the anchor type to setpublic ClientAnchor.AnchorType getAnchorType()
getAnchorType in interface ClientAnchorpublic boolean isSet()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.