use of org.apache.poi.hssf.record.cf.IconMultiStateThreshold in project poi by apache.
the class CFRule12Record method create.
/**
* Creates a new Icon Set / Multi-State formatting
*
* @param sheet the sheet
* @param iconSet the icon set
*
* @return a new Icon Set / Multi-State formatting
*/
public static CFRule12Record create(HSSFSheet sheet, IconSet iconSet) {
Threshold[] ts = new Threshold[iconSet.num];
for (int i = 0; i < ts.length; i++) {
ts[i] = new IconMultiStateThreshold();
}
CFRule12Record r = new CFRule12Record(CONDITION_TYPE_ICON_SET, ComparisonOperator.NO_COMPARISON);
IconMultiStateFormatting imf = r.createMultiStateFormatting();
imf.setIconSet(iconSet);
imf.setThresholds(ts);
return r;
}
Aggregations