Search in sources :

Example 1 with Threshold

use of org.apache.poi.hssf.record.cf.Threshold 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;
}
Also used : IconMultiStateThreshold(org.apache.poi.hssf.record.cf.IconMultiStateThreshold) IconMultiStateFormatting(org.apache.poi.hssf.record.cf.IconMultiStateFormatting) ColorGradientThreshold(org.apache.poi.hssf.record.cf.ColorGradientThreshold) Threshold(org.apache.poi.hssf.record.cf.Threshold) DataBarThreshold(org.apache.poi.hssf.record.cf.DataBarThreshold) IconMultiStateThreshold(org.apache.poi.hssf.record.cf.IconMultiStateThreshold)

Aggregations

ColorGradientThreshold (org.apache.poi.hssf.record.cf.ColorGradientThreshold)1 DataBarThreshold (org.apache.poi.hssf.record.cf.DataBarThreshold)1 IconMultiStateFormatting (org.apache.poi.hssf.record.cf.IconMultiStateFormatting)1 IconMultiStateThreshold (org.apache.poi.hssf.record.cf.IconMultiStateThreshold)1 Threshold (org.apache.poi.hssf.record.cf.Threshold)1