Package overit.geocall.basic.ui.xlsx
Class XlsxImage
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.basic.ui.xlsx.XlsxComponent
overit.geocall.basic.ui.xlsx.XlsxImage
- All Implemented Interfaces:
Serializable,XlsxElement,Identified
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected doubleprotected Stringprotected intprotected intprotected intprotected doubleFields inherited from class overit.geocall.basic.ui.xlsx.XlsxComponent
_align, _cellFormat, _cellFormatClass, _font, _format, _valign, _warning -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected XlsxImage.ClientAnchorDetailcalculateColumnLocation(org.apache.poi.ss.usermodel.Sheet sheet, int startingColumn, double reqImageWidthMM) protected XlsxImage.ClientAnchorDetailcalculateRowLocation(org.apache.poi.ss.usermodel.Sheet sheet, int startingRow, double reqImageHeightMM) If the image is to overlie more than one rows, calculations need to be performed to determine how many rows and whether the image will overlie just a part of one row in order to be presented at the required size.protected XlsxImage.ClientAnchorDetailfitImageToColumns(org.apache.poi.ss.usermodel.Sheet sheet, int colNumber, double reqImageWidthMM, int resizeBehaviour) Determines whether the sheets columns should be re-sized to accommodate the image, adjusts the columns width if necessary and creates then returns a ClientAnchorDetail object that facilitates construction of an ClientAnchor that will fix the image on the sheet and establish it's size.protected XlsxImage.ClientAnchorDetailfitImageToRows(org.apache.poi.ss.usermodel.Sheet sheet, int rowNumber, double reqImageHeightMM, int resizeBehaviour) Determines whether the sheets row should be re-sized to accommodate the image, adjusts the rows height if necessary and creates then returns a ClientAnchorDetail object that facilitates construction of a ClientAnchor that will fix the image on the sheet and establish it's size.voidgetContent(org.apache.poi.ss.usermodel.Sheet sheet, int startRow, int startCol) intintvoidSets the number of columns.voidvoidvoidvoidSets the number of rows.voidvoidMethods inherited from class overit.geocall.basic.ui.xlsx.XlsxComponent
getAlign, getBgColor, getBoolean, getBorder, getBorder, getBorder, getBorderColor, getBorderStyle, getCellFormat, getCellStyle, getChildIterator, getChildSize, getColor, getColor, getComment, getDefault, getDocument, getFont, getFontSize, getIdentity, getKey, getLabel, getName, getRegistryName, getSheet, getStyleName, getVAlign, getWarning, hasFontSize, initCellFormat, initChilds, isBold, isEnabled, isForcedBoldState, isForcedFontSize, isHidden, isLocked, isShrinkToFit, isWrap, onInit, setALIGN, setBGCOLOR, setBOLD, setBorder, setBORDER, setBorderColor, setBORDERCOLORRGB, setBorderStyle, setBORDERSTYLE, setCellFormat, setCELLFORMATCLASS, setCellStyle, setCOLOR, setCOMMENT, setDEFAULT, setENABLED, setFONT, setFONTSIZE, setFORMAT, setHIDDEN, setIdentity, setKEY, setLabel, setLABEL, setLOCKED, setNAME, setREGISTRYNAME, setSheet, setSHRINKTOFIT, setSTYLENAME, setUseBGColor, setUSEBGCOLOR, setUSEDECIMALSPERCENTAGE, setUseHeadColor, setUSEHEADCOLOR, setVALIGN, setWRAP, useBGColor, useDecimalsPercentage, useHeaderColorMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.basic.ui.xlsx.XlsxElement
getName, getWarning
-
Field Details
-
_row
protected int _row -
_col
protected int _col -
_resizeMode
protected int _resizeMode -
_image
-
_type
protected int _type -
_width
protected double _width -
_height
protected double _height
-
-
Constructor Details
-
XlsxImage
public XlsxImage()
-
-
Method Details
-
setCOL
Sets the number of columns.- Parameters:
s- The number columns to set.
-
setROW
Sets the number of rows.- Parameters:
s- The number rows to set.
-
setRESIZEMODE
-
setWIDTH
-
setHEIGHT
-
setIMAGE
-
setTYPE
-
getContent
public void getContent(org.apache.poi.ss.usermodel.Sheet sheet, int startRow, int startCol) throws Exception - Specified by:
getContentin interfaceXlsxElement- Throws:
Exception
-
getOccupationRow
public int getOccupationRow()- Specified by:
getOccupationRowin interfaceXlsxElement
-
getOccupationCol
public int getOccupationCol()- Specified by:
getOccupationColin interfaceXlsxElement
-
fitImageToColumns
protected XlsxImage.ClientAnchorDetail fitImageToColumns(org.apache.poi.ss.usermodel.Sheet sheet, int colNumber, double reqImageWidthMM, int resizeBehaviour) Determines whether the sheets columns should be re-sized to accommodate the image, adjusts the columns width if necessary and creates then returns a ClientAnchorDetail object that facilitates construction of an ClientAnchor that will fix the image on the sheet and establish it's size.- Parameters:
sheet- A reference to the sheet that will 'contain' the image.colNumber- A primitive int that contains the index number of a column on the sheet.reqImageWidthMM- A primitive double that contains the required width of the image in millimetresresizeBehaviour- A primitive int whose value will indicate how the width of the column should be adjusted if the required width of the image is greater than the width of the column.- Returns:
- An instance of the ClientAnchorDetail class that will contain the index number of the column containing the cell whose top left hand corner also defines the top left hand corner of the image, the index number column containing the cell whose top left hand corner also defines the bottom right hand corner of the image and an inset that determines how far the right hand edge of the image can protrude into the next column - expressed as a specific number of coordinate positions.
-
calculateColumnLocation
protected XlsxImage.ClientAnchorDetail calculateColumnLocation(org.apache.poi.ss.usermodel.Sheet sheet, int startingColumn, double reqImageWidthMM) -
calculateRowLocation
protected XlsxImage.ClientAnchorDetail calculateRowLocation(org.apache.poi.ss.usermodel.Sheet sheet, int startingRow, double reqImageHeightMM) If the image is to overlie more than one rows, calculations need to be performed to determine how many rows and whether the image will overlie just a part of one row in order to be presented at the required size.- Parameters:
sheet- The sheet that will 'contain' the image.startingRow- A primitive int whose value is the index of the row that contains the cell whose top left hand corner should be aligned with the top left hand corner of the image.reqImageHeightMM- A primitive double whose value will indicate the required height of the image in millimetres.- Returns:
- An instance of the ClientAnchorDetail class that will contain the index number of the row containing the cell whose top left hand corner also defines the top left hand corner of the image, the index number of the row containing the cell whose top left hand corner also defines the bottom right hand corner of the image and an inset that determines how far the bottom edge can protrude into the next (lower) row - expressed as a specific number of coordinate positions.
-
fitImageToRows
protected XlsxImage.ClientAnchorDetail fitImageToRows(org.apache.poi.ss.usermodel.Sheet sheet, int rowNumber, double reqImageHeightMM, int resizeBehaviour) Determines whether the sheets row should be re-sized to accommodate the image, adjusts the rows height if necessary and creates then returns a ClientAnchorDetail object that facilitates construction of a ClientAnchor that will fix the image on the sheet and establish it's size.- Parameters:
sheet- A reference to the sheet that will 'contain' the image.rowNumber- A primitive int that contains the index number of a row on the sheet.reqImageHeightMM- A primitive double that contains the required height of the image in millimetresresizeBehaviour- A primitive int whose value will indicate how the height of the row should be adjusted if the required height of the image is greater than the height of the row.- Returns:
- An instance of the ClientAnchorDetail class that will contain the index number of the row containing the cell whose top left hand corner also defines the top left hand corner of the image, the index number of the row containing the cell whose top left hand corner also defines the bottom right hand corner of the image and an inset that determines how far the bottom edge of the image can protrude into the next (lower) row - expressed as a specific number of coordinate positions.
-