org.apache.poi.xssf.usermodel
Class XSSFClientAnchor
- java.lang.Object
-
- org.apache.poi.xssf.usermodel.XSSFAnchor
-
- org.apache.poi.xssf.usermodel.XSSFClientAnchor
-
- All Implemented Interfaces:
- ClientAnchor
public final class XSSFClientAnchor extends XSSFAnchor implements ClientAnchor
A client anchor is attached to an excel worksheet. It anchors against top-left and bottom-right cells.
-
-
Field Summary
-
Fields inherited from interface org.apache.poi.ss.usermodel.ClientAnchor
DONT_MOVE_AND_RESIZE, MOVE_AND_RESIZE, MOVE_DONT_RESIZE
-
-
Constructor Summary
Constructors Constructor and Description XSSFClientAnchor()Creates a new client anchor and defaults all the anchor positions to 0.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)intgetAnchorType()Gets the anchor typeshortgetCol1()Returns the column (0 based) of the first cell.shortgetCol2()Returns the column (0 based) of the second cell.intgetDx1()Returns the x coordinate within the first cell.intgetDx2()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 ofUnits.EMU_PER_PIXELintgetDy1()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 ofUnits.EMU_PER_PIXELintgetDy2()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 ofUnits.EMU_PER_PIXELorg.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarkergetFrom()Return starting anchor pointintgetRow1()Returns the row (0 based) of the first cell.intgetRow2()Returns the row (0 based) of the second cell.org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarkergetTo()Return ending anchor pointinthashCode()booleanisSet()voidsetAnchorType(int anchorType)Sets the anchor typevoidsetCol1(int col1)Sets the column (0 based) of the first cell.voidsetCol2(int col2)Returns the column (0 based) of the second cell.voidsetDx1(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 ofUnits.EMU_PER_PIXELvoidsetDx2(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 ofUnits.EMU_PER_PIXELvoidsetDy1(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 ofUnits.EMU_PER_PIXELvoidsetDy2(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 ofUnits.EMU_PER_PIXELvoidsetRow1(int row1)Returns the row (0 based) of the first cell.voidsetRow2(int row2)Returns the row (0 based) of the first cell.java.lang.StringtoString()
-
-
-
Constructor Detail
-
XSSFClientAnchor
public XSSFClientAnchor()
Creates a new client anchor and defaults all the anchor positions to 0.
-
XSSFClientAnchor
public 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.- Parameters:
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
-
getCol1
public short getCol1()
Description copied from interface:ClientAnchorReturns the column (0 based) of the first cell.- Specified by:
getCol1in interfaceClientAnchor- Returns:
- 0-based column of the first cell.
-
setCol1
public void setCol1(int col1)
Description copied from interface:ClientAnchorSets the column (0 based) of the first cell.- Specified by:
setCol1in interfaceClientAnchor- Parameters:
col1- 0-based column of the first cell.
-
getCol2
public short getCol2()
Description copied from interface:ClientAnchorReturns the column (0 based) of the second cell.- Specified by:
getCol2in interfaceClientAnchor- Returns:
- 0-based column of the second cell.
-
setCol2
public void setCol2(int col2)
Description copied from interface:ClientAnchorReturns the column (0 based) of the second cell.- Specified by:
setCol2in interfaceClientAnchor- Parameters:
col2- 0-based column of the second cell.
-
getRow1
public int getRow1()
Description copied from interface:ClientAnchorReturns the row (0 based) of the first cell.- Specified by:
getRow1in interfaceClientAnchor- Returns:
- 0-based row of the first cell.
-
setRow1
public void setRow1(int row1)
Description copied from interface:ClientAnchorReturns the row (0 based) of the first cell.- Specified by:
setRow1in interfaceClientAnchor- Parameters:
row1- 0-based row of the first cell.
-
getRow2
public int getRow2()
Description copied from interface:ClientAnchorReturns the row (0 based) of the second cell.- Specified by:
getRow2in interfaceClientAnchor- Returns:
- 0-based row of the second cell.
-
setRow2
public void setRow2(int row2)
Description copied from interface:ClientAnchorReturns the row (0 based) of the first cell.- Specified by:
setRow2in interfaceClientAnchor- Parameters:
row2- 0-based row of the first cell.
-
getDx1
public int getDx1()
Description copied from interface:ClientAnchorReturns 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 ofUnits.EMU_PER_PIXEL- Specified by:
getDx1in interfaceClientAnchor- Specified by:
getDx1in classXSSFAnchor- Returns:
- the x coordinate within the first cell
-
setDx1
public void setDx1(int dx1)
Description copied from interface:ClientAnchorSets 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 ofUnits.EMU_PER_PIXEL- Specified by:
setDx1in interfaceClientAnchor- Specified by:
setDx1in classXSSFAnchor- Parameters:
dx1- the x coordinate within the first cell
-
getDy1
public int getDy1()
Description copied from interface:ClientAnchorReturns 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 ofUnits.EMU_PER_PIXEL- Specified by:
getDy1in interfaceClientAnchor- Specified by:
getDy1in classXSSFAnchor- Returns:
- the y coordinate within the first cell
-
setDy1
public void setDy1(int dy1)
Description copied from interface:ClientAnchorSets 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 ofUnits.EMU_PER_PIXEL- Specified by:
setDy1in interfaceClientAnchor- Specified by:
setDy1in classXSSFAnchor- Parameters:
dy1- the y coordinate within the first cell
-
getDy2
public int getDy2()
Description copied from interface:ClientAnchorSets 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 ofUnits.EMU_PER_PIXEL- Specified by:
getDy2in interfaceClientAnchor- Specified by:
getDy2in classXSSFAnchor- Returns:
- the y coordinate within the second cell
-
setDy2
public void setDy2(int dy2)
Description copied from interface:ClientAnchorSets 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 ofUnits.EMU_PER_PIXEL- Specified by:
setDy2in interfaceClientAnchor- Specified by:
setDy2in classXSSFAnchor- Parameters:
dy2- the y coordinate within the second cell
-
getDx2
public int getDx2()
Description copied from interface:ClientAnchorReturns 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 ofUnits.EMU_PER_PIXEL- Specified by:
getDx2in interfaceClientAnchor- Specified by:
getDx2in classXSSFAnchor- Returns:
- the x coordinate within the second cell
-
setDx2
public void setDx2(int dx2)
Description copied from interface:ClientAnchorSets 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 ofUnits.EMU_PER_PIXEL- Specified by:
setDx2in interfaceClientAnchor- Specified by:
setDx2in classXSSFAnchor- Parameters:
dx2- the x coordinate within the second cell
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getFrom
@Internal public org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker getFrom()
Return starting anchor point- Returns:
- starting anchor point
-
getTo
@Internal public org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker getTo()
Return ending anchor point- Returns:
- ending anchor point
-
setAnchorType
public void setAnchorType(int anchorType)
Sets the anchor type0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.
- Specified by:
setAnchorTypein interfaceClientAnchor- Parameters:
anchorType- the anchor type- See Also:
ClientAnchor.MOVE_AND_RESIZE,ClientAnchor.MOVE_DONT_RESIZE,ClientAnchor.DONT_MOVE_AND_RESIZE
-
getAnchorType
public int getAnchorType()
Gets the anchor type0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.
- Specified by:
getAnchorTypein interfaceClientAnchor- Returns:
- the anchor type
- See Also:
ClientAnchor.MOVE_AND_RESIZE,ClientAnchor.MOVE_DONT_RESIZE,ClientAnchor.DONT_MOVE_AND_RESIZE
-
isSet
public boolean isSet()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG