com.aspose.cells
Class ConditionalFormattingIconCollection
java.lang.Object
CollectionBase
com.aspose.cells.ConditionalFormattingIconCollection
- All Implemented Interfaces:
- java.lang.Iterable
public class ConditionalFormattingIconCollection
- extends CollectionBase
Represents a collection of ConditionalFormattingIcon objects.
Example:
//Instantiating a Workbook object
Workbook workbook = new Workbook();
Worksheet sheet = workbook.getWorksheets().get(0);
//Get Conditional Formatting
ConditionalFormattingCollection cformattings = sheet.getConditionalFormattings();
//Adds an empty conditional formatting
int index = cformattings.add();
//Get newly added Conditional formatting
FormatConditionCollection fcs = cformattings.get(index);
//Sets the conditional format range.
CellArea ca = new CellArea();
ca.StartRow = 0;
ca.EndRow = 0;
ca.StartColumn = 0;
ca.EndColumn = 0;
fcs.addArea(ca);
ca = new CellArea();
ca.StartRow = 1;
ca.EndRow = 1;
ca.StartColumn = 1;
ca.EndColumn = 1;
fcs.addArea(ca);
//Sets condition
int idx = fcs.addCondition(FormatConditionType.ICON_SET);
FormatCondition cond = fcs.get(idx);
//Sets condition's type
cond.getIconSet().setType(IconSetType.ARROWS_GRAY_3);
//Add custom iconset condition.
ConditionalFormattingIcon cfIcon = cond.getIconSet().getCfIcons().get(0);
cfIcon.setType(IconSetType.ARROWS_3);
cfIcon.setIndex(0);
ConditionalFormattingIcon cfIcon1 = cond.getIconSet().getCfIcons().get(1);
cfIcon1.setType(IconSetType.ARROWS_GRAY_3);
cfIcon1.setIndex(1);
ConditionalFormattingIcon cfIcon2 = cond.getIconSet().getCfIcons().get(2);
cfIcon2.setType(IconSetType.BOXES_5);
cfIcon2.setIndex(2);
//Saving the Excel file
workbook.save("output.xls");
Property Getters/Setters Summary |
int | getCount() | → inherited from com.aspose.cells.CollectionBase
|
| |
ConditionalFormattingIcon | get(int) | |
|
Gets the ConditionalFormattingIcon element at the specified index.
|
Method Summary |
int | add(ConditionalFormattingIcon cficon) | |
Adds ConditionalFormattingIcon object.
|
int | add(int type, int index) | |
Adds ConditionalFormattingIcon object.
|
int | add(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
void | clear() | → inherited from com.aspose.cells.CollectionBase
|
|
boolean | contains(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
int | indexOf(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
java.util.Iterator | iterator() | → inherited from com.aspose.cells.CollectionBase
|
|
void | removeAt(int index) | → inherited from com.aspose.cells.CollectionBase
|
|
Property Getters/Setters Detail |
getCount | → inherited from com.aspose.cells.CollectionBase
|
public int getCount()
|
-
-
Gets the ConditionalFormattingIcon element at the specified index.
- Parameters:
index
- The zero based index of the element.
- Returns:
- The element at the specified index.
add | |
public int add(int type, int index) |
-
Adds ConditionalFormattingIcon object.
- Parameters:
type
- A IconSetType value. The value type.index
- The Index.
- Returns:
- Returns the index of new object in the list.
-
Adds ConditionalFormattingIcon object.
- Parameters:
cficon
- Returns the index of new object in the list.
clear | → inherited from com.aspose.cells.CollectionBase
|
public void clear() |
-
removeAt | → inherited from com.aspose.cells.CollectionBase
|
public void removeAt(int index) |
-
iterator | → inherited from com.aspose.cells.CollectionBase
|
public java.util.Iterator iterator() |
-
contains | → inherited from com.aspose.cells.CollectionBase
|
public boolean contains(java.lang.Object value) |
- Reserved for internal use.
add | → inherited from com.aspose.cells.CollectionBase
|
public int add(java.lang.Object value) |
- Reserved for internal use.
indexOf | → inherited from com.aspose.cells.CollectionBase
|
public int indexOf(java.lang.Object value) |
- Reserved for internal use.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.