Browse Source

Javadoc and comment updates for CFs

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690486 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_3_13_BETA1
Nick Burch 9 years ago
parent
commit
2b85de98fd

+ 2
- 0
src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java View File

expiry(wb.createSheet("Expiry")); expiry(wb.createSheet("Expiry"));
shadeAlt(wb.createSheet("Shade Alt")); shadeAlt(wb.createSheet("Shade Alt"));
shadeBands(wb.createSheet("Shade Bands")); shadeBands(wb.createSheet("Shade Bands"));
// TODO Add Icons, data bars etc, see bug #58130
// Write the output to a file // Write the output to a file
String file = "cf-poi.xls"; String file = "cf-poi.xls";

+ 5
- 4
src/java/org/apache/poi/hssf/record/CFRuleRecord.java View File

import org.apache.poi.util.LittleEndianOutput; import org.apache.poi.util.LittleEndianOutput;


/** /**
* Conditional Formatting Rule Record (0x01B1).<br/>
*
* @author Dmitriy Kumshayev
* Conditional Formatting Rule Record (0x01B1).
*
* <p>This is for the older-style Excel conditional formattings,
* new-style (Excel 2007+) also make use of {@link CF12RuleRecord}
* and {@link CFExRuleRecord} for their rules.
*/ */
public final class CFRuleRecord extends StandardRecord { public final class CFRuleRecord extends StandardRecord {

public static final short sid = 0x01B1; public static final short sid = 0x01B1;


public static final class ComparisonOperator { public static final class ComparisonOperator {

+ 4
- 8
src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java View File

* // Apply Conditional Formatting rule defined above to the regions * // Apply Conditional Formatting rule defined above to the regions
* sheet.addConditionalFormatting(regions, rule); * sheet.addConditionalFormatting(regions, rule);
* </PRE> * </PRE>
*
* @author Dmitriy Kumshayev
* @author Yegor Kozlov
*/ */
public interface ConditionalFormatting { public interface ConditionalFormatting {
/** /**
* Replaces an existing Conditional Formatting rule at position idx. * Replaces an existing Conditional Formatting rule at position idx.
* Excel allows to create up to 3 Conditional Formatting rules.
* Excel pre-2007 allows to create up to 3 Conditional Formatting rules,
* 2007 and later allow unlimited numbers.
* This method can be useful to modify existing Conditional Formatting rules. * This method can be useful to modify existing Conditional Formatting rules.
* *
* @param idx position of the rule. Should be between 0 and 2.
* @param idx position of the rule. Should be between 0 and 2 for Excel before 2007, otherwise 0+.
* @param cfRule - Conditional Formatting rule * @param cfRule - Conditional Formatting rule
*/ */
void setRule(int idx, ConditionalFormattingRule cfRule); void setRule(int idx, ConditionalFormattingRule cfRule);
/** /**
* Add a Conditional Formatting rule. * Add a Conditional Formatting rule.
* Excel allows to create up to 3 Conditional Formatting rules.
* Excel pre-2007 allows to create up to 3 Conditional Formatting rules.
* *
* @param cfRule - Conditional Formatting rule * @param cfRule - Conditional Formatting rule
*/ */
* @return number of Conditional Formatting rules. * @return number of Conditional Formatting rules.
*/ */
int getNumberOfRules(); int getNumberOfRules();
} }

+ 0
- 3
src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java View File

/** /**
* Represents a description of a conditional formatting rule * Represents a description of a conditional formatting rule
*
* @author Dmitriy Kumshayev
* @author Yegor Kozlov
*/ */
public interface ConditionalFormattingRule { public interface ConditionalFormattingRule {
/** /**

+ 1
- 4
src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java View File

/** /**
* The 'Conditional Formatting' facet of <tt>Sheet</tt> * The 'Conditional Formatting' facet of <tt>Sheet</tt>
* *
* @author Dmitriy Kumshayev
* @author Yegor Kozlov
* @since 3.8 * @since 3.8
*/ */
public interface SheetConditionalFormatting { public interface SheetConditionalFormatting {
/** /**
* Add a new Conditional Formatting to the sheet. * Add a new Conditional Formatting to the sheet.
* *
* Add a new Conditional Formatting set to the sheet. * Add a new Conditional Formatting set to the sheet.
* *
* @param regions - list of rectangular regions to apply conditional formatting rules * @param regions - list of rectangular regions to apply conditional formatting rules
* @param cfRules - set of up to three conditional formatting rules
* @param cfRules - set of up to conditional formatting rules (max 3 for Excel pre-2007)
* *
* @return index of the newly created Conditional Formatting object * @return index of the newly created Conditional Formatting object
*/ */

Loading…
Cancel
Save