public final class Cf extends XLSRecord
Condfmt,
Serialized Formcol, continues, DEBUGLEVEL, hyperlink, idx, isBlank, isBoolean, isContinueMerged, isString, lastidx, myxf, offset, rw, streamer, wkbook, worksheetAI, ALLOWDUPES, ALRUNS, AREA, AREAFORMAT, ARRAY, ATTACHEDLABEL, AUTOFILTER, AXCENT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOPPOPCUSTOM, BOTTOM_MARGIN, BOTTOMMARGIN, BOUNDSHEET, CALC_MODE_PROP, CALCCOUNT, CALCMODE, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, CATLAB, CATSERRANGE, CF, CF12, CHART, CHART3DBARSHAPE, CHARTFORMAT, CHARTFORMATLINK, CHARTFRTINFO, CHARTLINE, CODENAME, COLINFO, CONDFMT, CONDFMT12, CONTINUE, COUNTRY, CRN, CRTLAYOUT12, CRTLAYOUT12A, DAT, DATAFORMAT, DATALABEXT, DATALABEXTCONTENTS, DATE1904, DBCELL, DCON, DCONBIN, DCONNAME, DCONREF, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, DEFAULTENCODING, DEFAULTROWHEIGHT, DEFAULTTEXT, DEFCOLWIDTH, DELTA, DIMENSIONS, DROPBAR, DSF, DV, DVAL, END, ENDBLOCK, ENDEXTSST, ENDOBJECT, EOF, EXCEL2K, EXTERNCOUNT, EXTERNNAME, EXTERNSHEET, EXTSST, FBI, FEATHEADR, FILE_LOCK, FILEPASS, FONT, FONTBASIS, FONTX, FOOTERREC, FORMAT, FORMULA, FRAME, FRTFONTLIST, FRTWRAPPER, GARBAGE, GELFRAME, GUTS, HCENTER, HEADERREC, HLINK, HORIZONTAL_PAGE_BREAKS, IFMT, INDEX, INTERFACE_HDR, ITERATION, LABEL, LABELSST, LEFT_MARGIN, LEFTMARGIN, LEGEND, LEGENDXN, LINE, LINEFORMAT, MARKERFORMAT, MAXCOLS, MAXCOLS_BIFF8, MAXRECLEN, MAXROWS, MAXROWS_BIFF8, MERGEDCELLS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MULBLANK, MULRK, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, OBJPROTECT, OBPROJ, PALETTE, PANE, PASSWORD, PHONETIC, PICF, PIE, PIEFORMAT, PIVOTCHARTBITS, PIVOTCHARTLINK, PLOTAREA, PLOTGROWTH, PLS, PLV, POS, PRECISION, PRINT_GRIDLINES, PRINT_ROW_HEADERS, PRINTGRID, PRINTROWCOL, PROT4REV, PROTECT, QSISXTAG, RADAR, RADARAREA, RANGEPROTECTION, REFMODE, REFTRACK_PROP, RIGHT_MARGIN, RIGHTMARGIN, RK, ROW, RRD_HEAD, RRD_INFO, RSTRING, RTENTEXU, RTMERGECELLS, SBASEREF, SCATTER, SCENPROTECT, SCL, SELECTION, SERAUXERRBAR, SERAUXTREND, SERFMT, SERIES, SERIESLIST, SERIESTEXT, SERPARENT, SERTOCRT, SETUP, SHAREDUPES, SHEETLAYOUT, SHEETPROTECTION, SHRFMLA, SHTPROPS, SIIINDEX, SST, STARTBLOCK, STARTOBJECT, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE, STRINGREC, STYLE, SUPBOOK, SURFACE, SXADDL, SXBOOL, SXDB, SXDBB, SXDBEX, SXDI, SXEX, SXFDB, SXFDBTYPE, SXFORMAT, SXIVD, SXLI, SXNUM, SXPI, SXSTREAMID, SXSTRING, SXVD, SXVDEX, SXVI, SXVIEW, SXVIEWEX9, SXVIEWLINK, SXVS, TABID, TABLE, TABLESTYLES, TEXTDISP, THREED, TICK, TOP_MARGIN, TOPMARGIN, TXO, TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING, UNICODEENCODING, UNITS, USERBVIEW, USERSVIEWBEGIN, USERSVIEWEND, USETEMPFILE_PROP, USR_EXCL, VALIDATEWORKBOOK, VALUERANGE, VB_MODULE, VCENTER, VERTICAL_PAGE_BREAKS, WINDOW_PROTECT, WINDOW1, WINDOW2, WK_CHART, WK_FILE, WK_GLOBALS, WK_MACROSHEET, WK_WORKSHEET, WSBOOL, XCT, XF, XLS_MAX_COLS, YMULT| Constructor and Description |
|---|
Cf()
default constructor
|
Cf(Condfmt f)
constructor which takes the cellrange of cells
and the Condfmt that reference this conditional format rule
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(Ptg refcell)
pass in the referenced cell and attempt to
create a valid formula for this thing and
calculate whether the criteria passes
returns true or false
|
int[] |
getAllBorderColors() |
Color[] |
getBorderColors() |
int |
getBorderLineColorBottom() |
int |
getBorderLineColorLeft() |
int |
getBorderLineColorRight() |
int |
getBorderLineColorTop() |
int |
getBorderLineStylesBottom() |
int |
getBorderLineStylesLeft() |
int |
getBorderLineStylesRight() |
int |
getBorderLineStylesTop() |
int[] |
getBorderSizes() |
int[] |
getBorderStyles()
order= top, left, bottom, right
|
Condfmt |
getCondfmt() |
static byte |
getConditionFromString(String cx)
Returns the byte Condition type from a human-readable string
|
String |
getConditionString()
Returns the human-readable Condition type
|
Fill |
getFill()
return the 2007v Fill element, or null if not set
|
Font |
getFont()
returns the existing font record
for this Cell
|
int |
getFontColorIndex() |
int |
getFontEscapement() |
boolean |
getFontEscapementSub() |
boolean |
getFontEscapementSuper() |
int |
getFontHeight() |
boolean |
getFontItalic() |
int |
getFontOptsCancellation() |
int |
getFontOptsPosture() |
boolean |
getFontStriken() |
int |
getFontUnderlineStyle() |
int |
getFontWeight() |
int |
getForegroundColor() |
Formula |
getFormula1()
return the first formula referenced by the Conditional Format
|
Formula |
getFormula2()
return the second formula referenced by the Conditional Format
|
String |
getOOXML(WorkBookHandle bk,
int priority,
ArrayList dxfs)
generate OOXML for this Cf (BIFF8->OOXML)
attributes: type, dxfId, priority (REQ), stopIfTrue, aboveAverage,
percent, bottom, operator, text, timePeriod, rank, stdDev, equalAverage
children: SEQ: formula (0-3), colorScale, dataBar, iconSet
|
short |
getOperator()
returns the operator or qualifier of this Cf Rue as an int value
possible values: |
String |
getPatternBgColor()
returns the pattern background color, if any, as an HTML color String.
|
String |
getPatternFgColor()
returns the pattern color, if any, as an HTML color String.
|
int |
getPatternFillColor() |
int |
getPatternFillColorBack() |
int |
getPatternFillStyle()
Returns the patternFillStyle.
|
protected static XLSRecord |
getPrototype()
Create a Cf record & populate with prototype bytes
|
short |
getType()
return the type of this Cf Rule as an int
|
String |
getTypeString()
reutrn the string representation of this Cf Rule type
|
String |
getXML()
returns EXML (XMLSS) for the Conditional Format Rule
|
void |
init()
initialize the Cf record
|
static Cf |
parseXML(org.xmlpull.v1.XmlPullParser xpp,
Condfmt cfx,
Boundsheet bs)
creates a Cf record from the EXML nodes
|
void |
setBorderLineColorBottom(int b) |
void |
setBorderLineColorLeft(int borderLineColorLeft) |
void |
setBorderLineColorRight(int borderLineColorRight) |
void |
setBorderLineColorTop(int b) |
void |
setBorderLineStylesBottom(int b) |
void |
setBorderLineStylesLeft(int b) |
void |
setBorderLineStylesRight(int b) |
void |
setBorderLineStylesTop(int b) |
void |
setCondfmt(Condfmt condfmt) |
void |
setCondition1(String s)
sets the first condition from a String
|
void |
setCondition2(String s)
sets the second condition from a String
|
void |
setContainsText(String s)
OOXML-specific, in a containsText-type condition,
this field is the comparitor
|
void |
setFontColorIndex(int fontColorIndex) |
void |
setFontEscapement(int fontEscapementFlag) |
void |
setFontEscapementSub()
sets the font escapement for this conditional format to subscript
|
void |
setFontEscapementSuper()
sets the font escapement for this conditional format to superscript
|
void |
setFontHeight(int fontHeight) |
void |
setFontItalic(boolean italic) |
void |
setFontOptsPosture(int fontOptsPosture) |
void |
setFontStriken(boolean bStriken) |
void |
setFontUnderlineStyle(int fontUnderlineStyle) |
void |
setFontWeight(int f) |
void |
setOperator(int op)
sets the Operator of this Cf Rule
possible values: |
void |
setOperator(String s)
sets the operator for this Cf Rule from a String
|
void |
setPatternFillColor(int p,
String custom) |
void |
setPatternFillColorBack(int p) |
void |
setPatternFillStyle(int p) |
static void |
setStylePropsFromDxf(Dxf dxf,
Cf cf)
set the conditional format format settings from the OOXML dxf, or differential xf, format settings
|
static void |
setStylePropsFromString(String style,
Cf cx)
helper method to set the style values on this object from a style string
each name/value pair is delimited by ; possible tokens: pattern pattern fill # color pattern fg color patterncolor pattern bg color vertical vertical alignnment horizontal horizontal alignment border sub-tokens: border-top, border-left, border-bottom, border-top |
protected void |
setType(int type)
sets the type of this Cf rule from the int value
|
protected static int |
translateOOXMLType(String type)
takes a String representing the type attribute and translates it to
the corresponding integer representation
IMPORTANT NOTE: OOXML-specific types are converted to an integer that is not valid in 2003 versions |
protected static int |
translateOperator(String operator)
taks a String representing the Operator for this Cf Rule
and translates it to an int
NOTE: 2003 versions do not use types 0x9, 0xA, 0xB or 0xC |
protected static String |
translateType(int type)
Given an int type, return it's string representation
NOTE: if type is between 3 and 18, it is an OOXML-specific type. |
void |
updateBorderLineColorsFlag()
Apply all the borderLineColor fields into the current border line colors flag
|
void |
updateBorderLineStylesFlag()
Apply all the borderLineStyle fields into the current border line styles flag
|
void |
updatePatternFillColorsFlag()
Apply all the patternFillColor fields into the current pattern colors flag
|
addContinue, clone, close, copyFormat, getBooleanVal, getByteAt, getByteReader, getBytes, getBytesAt, getCellAddress, getCellAddressWithSheet, getCellType, getColNumber, getColorTable, getContinueVect, getData, getDataType, getDblVal, getDefaultVal, getEncryptedByteReader, getFirstBlock, getFloatVal, getFormatPattern, getFormulaRec, getHyperlink, getInternalVal, getIntLocation, getIntVal, getIxfe, getLastBlock, getLength, getMergeRange, getOffset, getOpcode, getRealRecordIndex, getRecDesc, getRecordIndex, getRow, getRowNumber, getSheet, getStreamer, getStringVal, getStringVal, getWorkBook, getXfRec, hasContinues, initRowCol, isFormula, isNumber, isReadOnly, isValueForCell, mergeContinues, postStream, preStream, remove, removeContinues, resetCacheBytes, setBooleanVal, setByteReader, setCol, setData, setDebugLevel, setDoubleVal, setEncryptedByteReader, setFirstBlock, setFloatVal, setHyperlink, setIndex, setIntVal, setIsValueForCell, setIxfe, setLastBlock, setLength, setMergeRange, setOffset, setOpcode, setRow, setRowCol, setRowNumber, setSheet, setStreamer, setStringVal, setValueForCell, setWorkBook, setXFRecord, setXFRecord, shouldEncrypt, toHexDump, toStringpublic static final int PATTERN_FILL_STYLE
public static final int PATTERN_FILL_COLOR
public static final int PATTERN_FILL_BACK_COLOR
public static final int FONT_OPTIONS_POSTURE
public static final int FONT_OPTIONS_CANCELLATION
public static final int FONT_OPTIONS_POSTURE_NORMAL
public static final int FONT_OPTIONS_POSTURE_ITALIC
public static final int FONT_OPTIONS_CANCELLATION_OFF
public static final int FONT_OPTIONS_CANCELLATION_ON
public static final int FONT_ESCAPEMENT_NONE
public static final int FONT_ESCAPEMENT_SUPER
public static final int FONT_ESCAPEMENT_SUB
public static final int FONT_UNDERLINE_NONE
public static final int FONT_UNDERLINE_SINGLE
public static final int FONT_UNDERLINE_DOUBLE
public static final int FONT_UNDERLINE_SINGLEACCOUNTING
public static final int FONT_UNDERLINE_DOUBLEACCOUNTING
public static final int FONT_MODIFIED_OPTIONS_STYLE
public static final int FONT_MODIFIED_OPTIONS_CANCELLATIONS
public static final int BORDER_LINESTYLE_LEFT
public static final int BORDER_LINESTYLE_RIGHT
public static final int BORDER_LINESTYLE_TOP
public static final int BORDER_LINESTYLE_BOTTOM
public static final int BORDER_MODIFIED_LEFT
public static final int BORDER_MODIFIED_RIGHT
public static final int BORDER_MODIFIED_TOP
public static final int BORDER_MODIFIED_BOTTOM
public static final int BORDER_LINECOLOR_LEFT
public static final int BORDER_LINECOLOR_RIGHT
public static final int BORDER_LINECOLOR_TOP
public static final int BORDER_LINECOLOR_BOTTOM
public Cf()
public Cf(Condfmt f)
f - the condfmtr - the cellrangepublic void init()
public static void setStylePropsFromString(String style, Cf cx)
style - cx - public static void setStylePropsFromDxf(Dxf dxf, Cf cf)
dxf - cf - public void setOperator(String s)
s - public void setOperator(int op)
0= no comparison
1= between
2= not between
3= equal
4= not equal
5= greater than
6= less than
7= greater than or equal
8= less than or equal 2007-specific operators
9= begins With
10= ends With
11= contains Text
12= not contains
int - qualifier - constant value as abovepublic short getOperator()
0= no comparison
1= between
2= not between
3= equal
4= not equal
5= greater than
6= less than
7= greater than or equal
8= less than or equal 2007-specific operators
9= begins With
10= ends With
11= contains Text
12= not contains
protected void setType(int type)
1= Cell is ("Cell value is")
2= expression ("formula value is")
int - type as abovepublic short getType()
1= Cell is ("Cell value is")
2= expression ("formula value is")
public String getTypeString()
public void setCondition1(String s)
s - public void setCondition2(String s)
s - public Condfmt getCondfmt()
public void setCondfmt(Condfmt condfmt)
condfmt - The condfmt to set.public int getFontEscapement()
public String getPatternFgColor()
public String getPatternBgColor()
public void setFontEscapement(int fontEscapementFlag)
fontEscapementFlag - The fontEscapementFlag to set.public void updateBorderLineStylesFlag()
public void updateBorderLineColorsFlag()
public Fill getFill()
public void updatePatternFillColorsFlag()
public Font getFont()
XLSRecordpublic Color[] getBorderColors()
public int[] getAllBorderColors()
public int[] getBorderStyles()
public int[] getBorderSizes()
public int getForegroundColor()
public int getFontOptsPosture()
public void setFontOptsPosture(int fontOptsPosture)
fontOptsPosture - The fontOptsPosture to set.public int getFontOptsCancellation()
public boolean getFontItalic()
public void setFontItalic(boolean italic)
fontOptsItalic - The fontOptsItalic to set.public boolean getFontStriken()
public void setFontStriken(boolean bStriken)
public boolean getFontEscapementSuper()
public void setFontEscapementSuper()
public boolean getFontEscapementSub()
public void setFontEscapementSub()
public int getBorderLineStylesLeft()
public void setBorderLineStylesLeft(int b)
borderLineStylesLeft - The borderLineStylesLeft to set.public int getBorderLineStylesRight()
public void setBorderLineStylesRight(int b)
borderLineStylesRight - The borderLineStylesRight to set.public int getBorderLineStylesTop()
public void setBorderLineStylesTop(int b)
borderLineStylesTop - The borderLineStylesTop to set.public int getBorderLineStylesBottom()
public void setBorderLineStylesBottom(int b)
borderLineStylesBottom - The borderLineStylesBottom to set.public int getBorderLineColorLeft()
public void setBorderLineColorLeft(int borderLineColorLeft)
borderLineColorLeft - The borderLineColorLeft to set.public int getBorderLineColorRight()
public void setBorderLineColorRight(int borderLineColorRight)
borderLineColorRight - The borderLineColorRight to set.public int getBorderLineColorTop()
public void setBorderLineColorTop(int b)
borderLineColorTop - The borderLineColorTop to set.public int getBorderLineColorBottom()
public void setBorderLineColorBottom(int b)
borderLineColorBottom - The borderLineColorBottom to set.public int getPatternFillStyle()
public void setPatternFillStyle(int p)
patternFillStyle - The patternFillStyle to set.public int getPatternFillColor()
public void setPatternFillColor(int p,
String custom)
patternFillColor - The patternFillColor to set.public int getPatternFillColorBack()
public void setPatternFillColorBack(int p)
patternFillColorBack - The patternFillColorBack to set.public int getFontHeight()
public void setFontHeight(int fontHeight)
fontHeight - The fontHeight to set.public int getFontWeight()
public void setFontWeight(int f)
fontWeight - The fontWeight to set.public int getFontUnderlineStyle()
public void setFontUnderlineStyle(int fontUnderlineStyle)
fontUnderlineStyle - The fontUnderlineStyle to set.public int getFontColorIndex()
public void setFontColorIndex(int fontColorIndex)
fontColorIndex - The fontColorIndex to set.protected static XLSRecord getPrototype()
public boolean evaluate(Ptg refcell)
the - reference to evaluatepublic static final byte getConditionFromString(String cx)
public String getConditionString()
public Formula getFormula1()
public Formula getFormula2()
protected static int translateOperator(String operator)
String - operator - String CfRule operator attributeprotected static String translateType(int type)
type - type integertranslateType(String)protected static int translateOOXMLType(String type)
String - type - OOXML CfRule type attributepublic String getXML()
public static Cf parseXML(org.xmlpull.v1.XmlPullParser xpp, Condfmt cfx, Boundsheet bs)
xpp - public void setContainsText(String s)
s - public String getOOXML(WorkBookHandle bk, int priority, ArrayList dxfs)
Copyright © 2002–2019 Starter Inc.. All rights reserved.