]> source.dussan.org Git - poi.git/commitdiff
Javadoc and comment updates for CFs
authorNick Burch <nick@apache.org>
Sun, 12 Jul 2015 17:06:45 +0000 (17:06 +0000)
committerNick Burch <nick@apache.org>
Sun, 12 Jul 2015 17:06:45 +0000 (17:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690486 13f79535-47bb-0310-9956-ffa450edef68

src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java
src/java/org/apache/poi/hssf/record/CFRuleRecord.java
src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java
src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java
src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java

index 940f5a3807cc7f07a04e70dddfc8619d47150d89..47f6f05a30ff8c2fb8b31b755a6187052c669522 100644 (file)
@@ -54,6 +54,8 @@ public class ConditionalFormats {
         expiry(wb.createSheet("Expiry"));\r
         shadeAlt(wb.createSheet("Shade Alt"));\r
         shadeBands(wb.createSheet("Shade Bands"));\r
+        \r
+        // TODO Add Icons, data bars etc, see bug #58130\r
 \r
         // Write the output to a file\r
         String file = "cf-poi.xls";\r
index 4cf83efce0e9f749c78214b8d5e3228577f1fd17..d2673685518bf659dd9af8ba0e42cc3fc23b4350 100644 (file)
@@ -32,12 +32,13 @@ import org.apache.poi.util.BitFieldFactory;
 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 static final short sid = 0x01B1;
 
        public static final class ComparisonOperator {
index 3344963bb6bce46065064ee51a959e59d408bf7e..f6e8ff441f2b53a8eb3574650a45df0fa73ab62c 100644 (file)
@@ -72,9 +72,6 @@ import org.apache.poi.ss.util.CellRangeAddress;
  * // Apply Conditional Formatting rule defined above to the regions\r
  * sheet.addConditionalFormatting(regions, rule);\r
  * </PRE>\r
- *\r
- * @author Dmitriy Kumshayev\r
- * @author Yegor Kozlov\r
  */\r
 public interface ConditionalFormatting {\r
 \r
@@ -85,17 +82,18 @@ public interface ConditionalFormatting {
 \r
     /**\r
      * Replaces an existing Conditional Formatting rule at position idx.\r
-     * Excel allows to create up to 3 Conditional Formatting rules.\r
+     * Excel pre-2007 allows to create up to 3 Conditional Formatting rules,\r
+     *  2007 and later allow unlimited numbers.\r
      * This method can be useful to modify existing  Conditional Formatting rules.\r
      *\r
-     * @param idx position of the rule. Should be between 0 and 2.\r
+     * @param idx position of the rule. Should be between 0 and 2 for Excel before 2007, otherwise 0+.\r
      * @param cfRule - Conditional Formatting rule\r
      */\r
     void setRule(int idx, ConditionalFormattingRule cfRule);\r
 \r
     /**\r
      * Add a Conditional Formatting rule.\r
-     * Excel allows to create up to 3 Conditional Formatting rules.\r
+     * Excel pre-2007 allows to create up to 3 Conditional Formatting rules.\r
      *\r
      * @param cfRule - Conditional Formatting rule\r
      */\r
@@ -110,6 +108,4 @@ public interface ConditionalFormatting {
      * @return number of Conditional Formatting rules.\r
      */\r
     int getNumberOfRules();\r
-\r
-\r
 }\r
index 1c63f1925759386ffa1b14dada33fb5a10e0f0e5..2e2e3d734c75e3f22c16e743104e3cb3b3f201b1 100644 (file)
@@ -21,9 +21,6 @@ package org.apache.poi.ss.usermodel;
 \r
 /**\r
  * Represents a description of a conditional formatting rule\r
- *\r
- * @author Dmitriy Kumshayev\r
- * @author Yegor Kozlov\r
  */\r
 public interface ConditionalFormattingRule {\r
     /**\r
index e20a8f74b6c8554185804aaf6da08c390d422235..6d8c328c0c17c87a6f86936f1465cf9e7964685e 100644 (file)
@@ -24,12 +24,9 @@ import org.apache.poi.ss.util.CellRangeAddress;
 /**\r
  * The 'Conditional Formatting' facet of <tt>Sheet</tt>\r
  *\r
- * @author Dmitriy Kumshayev\r
- * @author Yegor Kozlov\r
  * @since 3.8\r
  */\r
 public interface SheetConditionalFormatting {\r
-\r
     /**\r
      * Add a new Conditional Formatting to the sheet.\r
      *\r
@@ -58,7 +55,7 @@ public interface SheetConditionalFormatting {
      * Add a new Conditional Formatting set to the sheet.\r
      *\r
      * @param regions - list of rectangular regions to apply conditional formatting rules\r
-     * @param cfRules - set of up to three conditional formatting rules\r
+     * @param cfRules - set of up to conditional formatting rules (max 3 for Excel pre-2007)\r
      *\r
      * @return index of the newly created Conditional Formatting object\r
      */\r