You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2015/07/12 19:06:45 UTC

svn commit: r1690486 - in /poi/trunk/src: examples/src/org/apache/poi/ss/examples/ java/org/apache/poi/hssf/record/ java/org/apache/poi/ss/usermodel/

Author: nick
Date: Sun Jul 12 17:06:45 2015
New Revision: 1690486

URL: http://svn.apache.org/r1690486
Log:
Javadoc and comment updates for CFs

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

Modified: poi/trunk/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java?rev=1690486&r1=1690485&r2=1690486&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java Sun Jul 12 17:06:45 2015
@@ -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";

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/CFRuleRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/CFRuleRecord.java?rev=1690486&r1=1690485&r2=1690486&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/CFRuleRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/CFRuleRecord.java Sun Jul 12 17:06:45 2015
@@ -32,12 +32,13 @@ import org.apache.poi.util.BitFieldFacto
 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 {

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java?rev=1690486&r1=1690485&r2=1690486&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java Sun Jul 12 17:06:45 2015
@@ -72,9 +72,6 @@ import org.apache.poi.ss.util.CellRangeA
  * // Apply Conditional Formatting rule defined above to the regions
  * sheet.addConditionalFormatting(regions, rule);
  * </PRE>
- *
- * @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();
-
-
 }

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java?rev=1690486&r1=1690485&r2=1690486&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java Sun Jul 12 17:06:45 2015
@@ -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 {
     /**

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java?rev=1690486&r1=1690485&r2=1690486&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/SheetConditionalFormatting.java Sun Jul 12 17:06:45 2015
@@ -24,12 +24,9 @@ import org.apache.poi.ss.util.CellRangeA
 /**
  * The 'Conditional Formatting' facet of <tt>Sheet</tt>
  *
- * @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 SheetConditionalFormatt
      * 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
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org