From: Nick Burch Date: Sun, 12 Jul 2015 17:06:45 +0000 (+0000) Subject: Javadoc and comment updates for CFs X-Git-Tag: REL_3_13_BETA1~56 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2b85de98fda8a484c0e02549db83ecf56d32ccef;p=poi.git Javadoc and comment updates for CFs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690486 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java b/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java index 940f5a3807..47f6f05a30 100644 --- a/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java +++ b/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java @@ -54,6 +54,8 @@ public class ConditionalFormats { expiry(wb.createSheet("Expiry")); shadeAlt(wb.createSheet("Shade Alt")); shadeBands(wb.createSheet("Shade Bands")); + + // TODO Add Icons, data bars etc, see bug #58130 // Write the output to a file String file = "cf-poi.xls"; diff --git a/src/java/org/apache/poi/hssf/record/CFRuleRecord.java b/src/java/org/apache/poi/hssf/record/CFRuleRecord.java index 4cf83efce0..d267368551 100644 --- a/src/java/org/apache/poi/hssf/record/CFRuleRecord.java +++ b/src/java/org/apache/poi/hssf/record/CFRuleRecord.java @@ -32,12 +32,13 @@ import org.apache.poi.util.BitFieldFactory; import org.apache.poi.util.LittleEndianOutput; /** - * Conditional Formatting Rule Record (0x01B1).
- * - * @author Dmitriy Kumshayev + * Conditional Formatting Rule Record (0x01B1). + * + *

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 static final short sid = 0x01B1; public static final class ComparisonOperator { diff --git a/src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java b/src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java index 3344963bb6..f6e8ff441f 100644 --- a/src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java +++ b/src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java @@ -72,9 +72,6 @@ import org.apache.poi.ss.util.CellRangeAddress; * // Apply Conditional Formatting rule defined above to the regions * sheet.addConditionalFormatting(regions, rule); * - * - * @author Dmitriy Kumshayev - * @author Yegor Kozlov */ public interface ConditionalFormatting { @@ -85,17 +82,18 @@ public interface ConditionalFormatting { /** * 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. * - * @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 */ void setRule(int idx, ConditionalFormattingRule cfRule); /** * 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 */ @@ -110,6 +108,4 @@ public interface ConditionalFormatting { * @return number of Conditional Formatting rules. */ int getNumberOfRules(); - - } diff --git a/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java b/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java index 1c63f19257..2e2e3d734c 100644 --- a/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java +++ b/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java @@ -21,9 +21,6 @@ package org.apache.poi.ss.usermodel; /** * Represents a description of a conditional formatting rule - * - * @author Dmitriy Kumshayev - * @author Yegor Kozlov */ public interface ConditionalFormattingRule { /** diff --git a/src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java b/src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java index e20a8f74b6..6d8c328c0c 100644 --- a/src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java +++ b/src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java @@ -24,12 +24,9 @@ import org.apache.poi.ss.util.CellRangeAddress; /** * The 'Conditional Formatting' facet of Sheet * - * @author Dmitriy Kumshayev - * @author Yegor Kozlov * @since 3.8 */ public interface SheetConditionalFormatting { - /** * Add a new Conditional Formatting to the sheet. * @@ -58,7 +55,7 @@ public interface SheetConditionalFormatting { * Add a new Conditional Formatting set to the sheet. * * @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 */