Class CFRule12Record

All Implemented Interfaces:
Cloneable, FutureRecord

public final class CFRule12Record extends CFRuleBase implements FutureRecord, Cloneable
Conditional Formatting v12 Rule Record (0x087A).

This is for newer-style Excel conditional formattings, from Excel 2007 onwards.

CFRuleRecord is used where the condition type is CFRuleBase.CONDITION_TYPE_CELL_VALUE_IS or CFRuleBase.CONDITION_TYPE_FORMULA, this is only used for the other types

  • Field Details

  • Constructor Details

  • Method Details

    • create

      public static CFRule12Record create(HSSFSheet sheet, String formulaText)
      Creates a new comparison operation rule
      Parameters:
      sheet - the sheet
      formulaText - the first formula text
      Returns:
      a new comparison operation rule
    • create

      public static CFRule12Record create(HSSFSheet sheet, byte comparisonOperation, String formulaText1, String formulaText2)
      Creates a new comparison operation rule
      Parameters:
      sheet - the sheet
      comparisonOperation - the comparison operation
      formulaText1 - the first formula text
      formulaText2 - the second formula text
      Returns:
      a new comparison operation rule
    • create

      public static CFRule12Record create(HSSFSheet sheet, byte comparisonOperation, String formulaText1, String formulaText2, String formulaTextScale)
      Creates a new comparison operation rule
      Parameters:
      sheet - the sheet
      comparisonOperation - the comparison operation
      formulaText1 - the first formula text
      formulaText2 - the second formula text
      formulaTextScale - the scale to apply for the comparison
      Returns:
      a new comparison operation rule
    • create

      public static CFRule12Record create(HSSFSheet sheet, ExtendedColor color)
      Creates a new Data Bar formatting
      Parameters:
      sheet - the sheet
      color - the data bar color
      Returns:
      a new Data Bar formatting
    • create

      public static CFRule12Record create(HSSFSheet sheet, IconMultiStateFormatting.IconSet iconSet)
      Creates a new Icon Set / Multi-State formatting
      Parameters:
      sheet - the sheet
      iconSet - the icon set
      Returns:
      a new Icon Set / Multi-State formatting
    • createColorScale

      public static CFRule12Record createColorScale(HSSFSheet sheet)
      Creates a new Color Scale / Color Gradient formatting
      Parameters:
      sheet - the sheet
      Returns:
      a new Color Scale / Color Gradient formatting
    • containsDataBarBlock

      public boolean containsDataBarBlock()
    • getDataBarFormatting

      public DataBarFormatting getDataBarFormatting()
    • createDataBarFormatting

      public DataBarFormatting createDataBarFormatting()
    • containsMultiStateBlock

      public boolean containsMultiStateBlock()
    • getMultiStateFormatting

      public IconMultiStateFormatting getMultiStateFormatting()
    • createMultiStateFormatting

      public IconMultiStateFormatting createMultiStateFormatting()
    • containsColorGradientBlock

      public boolean containsColorGradientBlock()
    • getColorGradientFormatting

      public ColorGradientFormatting getColorGradientFormatting()
    • createColorGradientFormatting

      public ColorGradientFormatting createColorGradientFormatting()
    • getParsedExpressionScale

      public Ptg[] getParsedExpressionScale()
      get the stack of the scale expression as a list
      Returns:
      list of tokens (casts stack to a list and returns it!) this method can return null is we are unable to create Ptgs from existing excel file callers should check for null!
    • setParsedExpressionScale

      public void setParsedExpressionScale(Ptg[] ptgs)
    • getPriority

      public int getPriority()
    • setPriority

      public void setPriority(int priority)
    • getSid

      public short getSid()
      Description copied from class: Record
      return the non static version of the id for this record.
      Specified by:
      getSid in class Record
      Returns:
      he id for this record
    • serialize

      public void serialize(LittleEndianOutput out)
      called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.
      Specified by:
      serialize in class StandardRecord
      Parameters:
      out - the stream to write to
    • getDataSize

      protected int getDataSize()
      Specified by:
      getDataSize in class StandardRecord
    • toString

      public String toString()
      Description copied from class: Record
      get a string representation of the record (for biffview/debugging)
      Overrides:
      toString in class Record
    • clone

      public CFRule12Record clone()
      Specified by:
      clone in class CFRuleBase
    • getFutureRecordType

      public short getFutureRecordType()
      Specified by:
      getFutureRecordType in interface FutureRecord
    • getFutureHeader

      public FtrHeader getFutureHeader()
      Specified by:
      getFutureHeader in interface FutureRecord
    • getAssociatedRange

      public CellRangeAddress getAssociatedRange()
      Specified by:
      getAssociatedRange in interface FutureRecord