Top Description Inners Methods
org.apache.poi.ss.usermodel

public Interface ConditionalFormattingThreshold

Known Direct Implementers
org.apache.poi.hssf.usermodel.HSSFConditionalFormattingThreshold

The Threshold / CFVO / Conditional Formatting Value Object.

This defines how to calculate the ranges for a conditional formatting rule, eg which values get a Green Traffic Light icon and which Yellow or Red.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public String
getFormula()

Formula to use to calculate the threshold, or null if no formula

public ConditionalFormattingThreshold.RangeType
getRangeType()

Get the Range Type used

public Double
getValue()

Gets the value used for the threshold, or null if there isn't one.

public void
setFormula(String formula)

Sets the formula used to calculate the threshold, or unsets it if null is given.

public void
setRangeType(ConditionalFormattingThreshold.RangeType type)

Changes the Range Type used

If you change the range type, you need to ensure that the Formula and Value parameters are compatible with it before saving

public void
setValue(Double value)

Sets the value used for the threshold.

Method Detail

getFormulaback to summary
public String getFormula()

Formula to use to calculate the threshold, or null if no formula

getRangeTypeback to summary
public ConditionalFormattingThreshold.RangeType getRangeType()

Get the Range Type used

getValueback to summary
public Double getValue()

Gets the value used for the threshold, or null if there isn't one.

setFormulaback to summary
public void setFormula(String formula)

Sets the formula used to calculate the threshold, or unsets it if null is given.

setRangeTypeback to summary
public void setRangeType(ConditionalFormattingThreshold.RangeType type)

Changes the Range Type used

If you change the range type, you need to ensure that the Formula and Value parameters are compatible with it before saving

setValueback to summary
public void setValue(Double value)

Sets the value used for the threshold.

If the type is RangeType#PERCENT or RangeType#PERCENTILE it must be between 0 and 100.

If the type is RangeType#MIN or RangeType#MAX or RangeType#FORMULA it shouldn't be set.

Use null to unset

org.apache.poi.ss.usermodel back to summary

public final Enum ConditionalFormattingThreshold.RangeType

extends Enum<ConditionalFormattingThreshold.RangeType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ConditionalFormattingThreshold.RangeType
FORMULA

Formula result

public final int
id

Numeric ID of the type

public static final ConditionalFormattingThreshold.RangeType
MAX

The maximum value from the range

public static final ConditionalFormattingThreshold.RangeType
MIN

The minimum value from the range

public final String
name

Hides java.lang.Enum.name.

Name (system) of the type
public static final ConditionalFormattingThreshold.RangeType
NUMBER

Number / Parameter

public static final ConditionalFormattingThreshold.RangeType
PERCENT

Percent of the way from the mi to the max value in the range

public static final ConditionalFormattingThreshold.RangeType
PERCENTILE

The minimum value of the cell that is in X percentile of the range

public static final ConditionalFormattingThreshold.RangeType

Constructor Summary

AccessConstructor and Description
private
RangeType(int id, String name)

Method Summary

Modifier and TypeMethod and Description
public static ConditionalFormattingThreshold.RangeType
byId(int id)

public static ConditionalFormattingThreshold.RangeType
byName(String name)

public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static ConditionalFormattingThreshold.RangeType
public static ConditionalFormattingThreshold.RangeType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

FORMULAback to summary
public static final ConditionalFormattingThreshold.RangeType FORMULA

Formula result

idback to summary
public final int id

Numeric ID of the type

MAXback to summary
public static final ConditionalFormattingThreshold.RangeType MAX

The maximum value from the range

MINback to summary
public static final ConditionalFormattingThreshold.RangeType MIN

The minimum value from the range

nameback to summary
public final String name

Hides java.lang.Enum.name.

Name (system) of the type

NUMBERback to summary
public static final ConditionalFormattingThreshold.RangeType NUMBER

Number / Parameter

PERCENTback to summary
public static final ConditionalFormattingThreshold.RangeType PERCENT

Percent of the way from the mi to the max value in the range

PERCENTILEback to summary
public static final ConditionalFormattingThreshold.RangeType PERCENTILE

The minimum value of the cell that is in X percentile of the range

UNALLOCATEDback to summary
public static final ConditionalFormattingThreshold.RangeType UNALLOCATED

Constructor Detail

RangeTypeback to summary
private RangeType(int id, String name)

Method Detail

byIdback to summary
public static ConditionalFormattingThreshold.RangeType byId(int id)
byNameback to summary
public static ConditionalFormattingThreshold.RangeType byName(String name)
toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

valueOfback to summary
public static ConditionalFormattingThreshold.RangeType valueOf(String name)
valuesback to summary
public static ConditionalFormattingThreshold.RangeType[] values()