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/13 22:12:51 UTC

svn commit: r1690809 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormatting.java

Author: nick
Date: Mon Jul 13 20:12:50 2015
New Revision: 1690809

URL: http://svn.apache.org/r1690809
Log:
Consistent whitespace/indents

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormatting.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormatting.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormatting.java?rev=1690809&r1=1690808&r2=1690809&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormatting.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormatting.java Mon Jul 13 20:12:50 2015
@@ -73,96 +73,88 @@ import org.apache.poi.ss.util.CellRangeA
  * sheet.addConditionalFormatting(regions, rule);
  * </PRE>
  */
-public final class HSSFConditionalFormatting  implements ConditionalFormatting
-{
-	private final HSSFWorkbook _workbook;
-	private final CFRecordsAggregate cfAggregate;
-
-	// TODO Should this be assigning unique IDs to the rules
-	//  as they get added to the file?
-	
+public final class HSSFConditionalFormatting  implements ConditionalFormatting {
+    private final HSSFWorkbook _workbook;
+    private final CFRecordsAggregate cfAggregate;
+
+    // TODO Should this be assigning unique IDs to the rules
+    //  as they get added to the file?
+
     // TODO Support types beyond CELL_VALUE_IS and FORMULA
 
-	HSSFConditionalFormatting(HSSFWorkbook workbook, CFRecordsAggregate cfAggregate)
-	{
-		if(workbook == null) {
-			throw new IllegalArgumentException("workbook must not be null");
-		}
-		if(cfAggregate == null) {
-			throw new IllegalArgumentException("cfAggregate must not be null");
-		}
-		_workbook = workbook;
-		this.cfAggregate = cfAggregate;
-	}
-	CFRecordsAggregate getCFRecordsAggregate() {
-		return cfAggregate;
-	}
-
-	/**
-	 * @deprecated (Aug-2008) use {@link HSSFConditionalFormatting#getFormattingRanges()}
-	 */
-	public org.apache.poi.ss.util.Region[] getFormattingRegions()
-	{
-		CellRangeAddress[] cellRanges = getFormattingRanges();
-		return org.apache.poi.ss.util.Region.convertCellRangesToRegions(cellRanges);
-	}
-	/**
-	 * @return array of <tt>CellRangeAddress</tt>s. never <code>null</code> 
-	 */
-	public CellRangeAddress[] getFormattingRanges() {
-		return cfAggregate.getHeader().getCellRanges();
-	}
-
-	/**
-	 * Replaces an existing Conditional Formatting rule at position idx. 
-	 * Excel allows to create up to 3 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 cfRule - Conditional Formatting rule
-	 */
-	public void setRule(int idx, HSSFConditionalFormattingRule cfRule)
-	{
-		cfAggregate.setRule(idx, cfRule.getCfRuleRecord());
-	}
+    HSSFConditionalFormatting(HSSFWorkbook workbook, CFRecordsAggregate cfAggregate) {
+        if(workbook == null) {
+            throw new IllegalArgumentException("workbook must not be null");
+        }
+        if(cfAggregate == null) {
+            throw new IllegalArgumentException("cfAggregate must not be null");
+        }
+        _workbook = workbook;
+        this.cfAggregate = cfAggregate;
+    }
+    CFRecordsAggregate getCFRecordsAggregate() {
+        return cfAggregate;
+    }
+
+    /**
+     * @deprecated (Aug-2008) use {@link HSSFConditionalFormatting#getFormattingRanges()}
+     */
+    public org.apache.poi.ss.util.Region[] getFormattingRegions() {
+        CellRangeAddress[] cellRanges = getFormattingRanges();
+        return org.apache.poi.ss.util.Region.convertCellRangesToRegions(cellRanges);
+    }
+    /**
+     * @return array of <tt>CellRangeAddress</tt>s. never <code>null</code> 
+     */
+    public CellRangeAddress[] getFormattingRanges() {
+        return cfAggregate.getHeader().getCellRanges();
+    }
+
+    /**
+     * Replaces an existing Conditional Formatting rule at position idx. 
+     * Excel allows to create up to 3 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 cfRule - Conditional Formatting rule
+     */
+    public void setRule(int idx, HSSFConditionalFormattingRule cfRule) {
+        cfAggregate.setRule(idx, cfRule.getCfRuleRecord());
+    }
 
     public void setRule(int idx, ConditionalFormattingRule cfRule){
         setRule(idx, (HSSFConditionalFormattingRule)cfRule);
     }
 
-	/**
-	 * add a Conditional Formatting rule. 
-	 * Excel allows to create up to 3 Conditional Formatting rules.
-	 * @param cfRule - Conditional Formatting rule
-	 */
-	public void addRule(HSSFConditionalFormattingRule cfRule)
-	{
-		cfAggregate.addRule(cfRule.getCfRuleRecord());
-	}
+    /**
+     * add a Conditional Formatting rule. 
+     * Excel allows to create up to 3 Conditional Formatting rules.
+     * @param cfRule - Conditional Formatting rule
+     */
+    public void addRule(HSSFConditionalFormattingRule cfRule) {
+        cfAggregate.addRule(cfRule.getCfRuleRecord());
+    }
 
     public void addRule(ConditionalFormattingRule cfRule){
         addRule((HSSFConditionalFormattingRule)cfRule);
     }
 
-	/**
-	 * @return the Conditional Formatting rule at position idx.
-	 */
-	public HSSFConditionalFormattingRule getRule(int idx)
-	{
-		CFRuleBase ruleRecord = cfAggregate.getRule(idx);
-		return new HSSFConditionalFormattingRule(_workbook, ruleRecord);
-	}
-
-	/**
-	 * @return number of Conditional Formatting rules.
-	 */
-	public int getNumberOfRules()
-	{
-		return cfAggregate.getNumberOfRules();
-	}
-
-	public String toString()
-	{
-		return cfAggregate.toString();
-	}
+    /**
+     * @return the Conditional Formatting rule at position idx.
+     */
+    public HSSFConditionalFormattingRule getRule(int idx) {
+        CFRuleBase ruleRecord = cfAggregate.getRule(idx);
+        return new HSSFConditionalFormattingRule(_workbook, ruleRecord);
+    }
+
+    /**
+     * @return number of Conditional Formatting rules.
+     */
+    public int getNumberOfRules() {
+        return cfAggregate.getNumberOfRules();
+    }
+
+    public String toString() {
+        return cfAggregate.toString();
+    }
 }



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