public class ConditionalFormatHandle extends Object implements Handle
ConditionalFormatHandle allows for manipulation of the ConditionalFormat cells in Excel Using the ConditionalFormatHandle, the affected range of ConditionalFormats can be modified, along with the formatting applied to the cells when the condition is true. Each ConditionalFormatHandle represents a range of cells and can have a number of formatting rules and formats (ConditionalFormatRule) applied. The ConditionalFormatHandle affected range can either be a contiguous range, or a series of cells and ranges. Each ConditionalFormatRule contains one rule and corresponding format data. Many of these calls are very self-explanatory and can be found in the api.
| Modifier | Constructor and Description |
|---|---|
protected |
ConditionalFormatHandle(Condfmt c,
WorkSheetHandle workSheetHandle)
For internal use only.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCell(CellHandle cellHandle)
Add a cell to this conditional format record
|
boolean |
contains(CellHandle cellHandle)
Determine if the conditional format contains/affects the cell handle passed in
|
boolean |
contains(String celladdy)
Determines if the ConditionalFormatHandle contains the cell address passed in
|
ConditionalFormatRule |
evaluate(CellHandle refcell)
evaluates the criteria for this Conditional Format
if the criteria involves a comparison i.e. |
String[] |
getAllAffectedRanges()
Return a string representing all ranges that this conditional format handle can affect
|
protected Condfmt |
getCndfmt() |
String |
getEncompassingRange()
Return the range of data this ConditionalFormatHandle refers to as a string
This location is the largest bounding rectangle that all cells utilized in this conditional
format can be contained in.
|
FormatHandle[] |
getFormats()
returns the formatting for each rule of this Contditional Format Handle
|
ConditionalFormatRule[] |
getRules()
Get all the rules assocated with this conditional format record
|
WorkSheetHandle |
getWorkSheetHandle()
get the WorkSheetHandle for this ConditionalFormat
ConditionalFormats are bound to a specific worksheet and cannot be
applied to multiple worksheets
|
String |
getXML()
Return an xml representation of the ConditionalFormatHandle
|
protected void |
setCndfmt(Condfmt cndfmt) |
void |
setRange(String range)
Set the range this ConditionalFormatHandle refers to.
|
String |
toString()
return a string representation of this Conditional Format
This method is still incomplete as it only returns data for one rule, and only refers to one range
|
protected ConditionalFormatHandle(Condfmt c, WorkSheetHandle workSheetHandle)
workBookHandle - Condfmt - public ConditionalFormatRule evaluate(CellHandle refcell)
CellHandle - refcell - the cell to obtain a value from in order for evaluation to occurCf.evaluate(io.starter.formats.XLS.formulas.Ptg)public ConditionalFormatRule[] getRules()
public WorkSheetHandle getWorkSheetHandle()
public String getEncompassingRange()
public String[] getAllAffectedRanges()
public boolean contains(CellHandle cellHandle)
cellHandle - public void setRange(String range)
range - = standard excel range without worksheet information ("A1" or "A1:A10")public boolean contains(String celladdy)
cellAddress - a cell address in the format "A1"public String getXML()
public String toString()
protected Condfmt getCndfmt()
protected void setCndfmt(Condfmt cndfmt)
cndfmt - The cndfmt to set.public void addCell(CellHandle cellHandle)
cellHandle - public FormatHandle[] getFormats()
Copyright © 2002–2019 Starter Inc.. All rights reserved.