You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by jm...@apache.org on 2016/08/01 04:21:15 UTC

svn commit: r1754700 - in /poi: site/src/documentation/content/xdocs/spreadsheet/ trunk/src/examples/src/org/apache/poi/ss/examples/ trunk/src/java/org/apache/poi/ss/util/ trunk/src/testcases/org/apache/poi/ss/util/

Author: jmarkmurphy
Date: Mon Aug  1 04:21:14 2016
New Revision: 1754700

URL: http://svn.apache.org/viewvc?rev=1754700&view=rev
Log:
revert changes made in r1754691

Removed:
    poi/trunk/src/examples/src/org/apache/poi/ss/examples/DrawingBorders.java
    poi/trunk/src/java/org/apache/poi/ss/util/BorderExtent.java
    poi/trunk/src/java/org/apache/poi/ss/util/CellStyleTemplate.java
    poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellStyleTemplate.java
Modified:
    poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
    poi/trunk/src/java/org/apache/poi/ss/util/CellAddress.java

Modified: poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
URL: http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml?rev=1754700&r1=1754699&r2=1754700&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml (original)
+++ poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml Mon Aug  1 04:21:14 2016
@@ -76,7 +76,6 @@
                     <li><link href="#Hiding">Hiding and Un-Hiding Rows</link></li>
                     <li><link href="#CellProperties">Setting Cell Properties</link></li>
                     <li><link href="#PivotTable">Create a Pivot Table</link></li>
-                    <li><link href="#DrawingBorders">Drawing Borders</link></li>
                     <li><link href="#RichText">Cells with multiple styles</link></li>
                 </ul>
             </section>
@@ -2229,64 +2228,6 @@ the data to populate another drop down l
   pivotTable.addReportFilter(3);
         </source>
       </section>
-  <anchor id="DrawingBorders"/>
-    <section>
-      <title>Drawing Borders</title>
-      <p>
-      In Excel, you can apply a set of borders on an entire workbook region at the press of a button. The PropertyTemplate
-      object simulates this with methods and constants defined to allow drawing top, bottom, left, right, horizontal,
-      vertical, inside, outside, or all borders around a range of cells. Additional methods allow for applying colors
-      to the borders. 
-      </p>
-      <p>
-      It works like this: you create a PropertyTemplate object which is a container for the borders you wish to apply to a
-      sheet. Then you add borders and colors to the PropertyTemplate, and finally apply it to whichever sheets you need
-      that set of borders on. You can create multiple PropertyTemplate objects and apply them to a single sheet, or you can 
-      apply the same PropertyTemplate object to multiple sheets. It is just like a preprinted form.
-      </p>
-      <source>
-  // draw borders (three 3x3 grids)
-  PropertyTemplate pt = new PropertyTemplate();
-  // #1) these borders will all be medium in default color
-  pt.drawBorders(new CellRangeAddress(1, 3, 1, 3),
-          CellStyle.BORDER_MEDIUM, PropertyTemplate.Extent.ALL);
-  // #2) these cells will have medium outside borders and thin inside borders
-  pt.drawBorders(new CellRangeAddress(5, 7, 1, 3),
-          CellStyle.BORDER_MEDIUM, PropertyTemplate.Extent.OUTSIDE);
-  pt.drawBorders(new CellRangeAddress(5, 7, 1, 3), CellStyle.BORDER_THIN,
-          PropertyTemplate.Extent.INSIDE);
-  // #3) these cells will all be medium weight with different colors for the
-  //     outside, inside horizontal, and inside vertical borders. The center
-  //     cell will have no borders.
-  pt.drawBorders(new CellRangeAddress(9, 11, 1, 3),
-          CellStyle.BORDER_MEDIUM, IndexedColors.RED.getIndex(),
-          PropertyTemplate.Extent.OUTSIDE);
-  pt.drawBorders(new CellRangeAddress(9, 11, 1, 3),
-          CellStyle.BORDER_MEDIUM, IndexedColors.BLUE.getIndex(),
-          PropertyTemplate.Extent.INSIDE_VERTICAL);
-  pt.drawBorders(new CellRangeAddress(9, 11, 1, 3),
-          CellStyle.BORDER_MEDIUM, IndexedColors.GREEN.getIndex(),
-          PropertyTemplate.Extent.INSIDE_HORIZONTAL);
-  pt.drawBorders(new CellRangeAddress(10, 10, 2, 2),
-          CellStyle.BORDER_NONE, 
-          PropertyTemplate.Extent.ALL);
-
-  // apply borders to sheet
-  Workbook wb = new XSSFWorkbook();
-  Sheet sh = wb.createSheet("Sheet1");
-  pt.applyBorders(sh);
-      </source>
-      <p>
-      NOTE: The last pt.drawBorders() call removes the borders from the range by using CellStyle.BORDER_NONE. Like
-      setCellStyleProperties, the applyBorders method merges the properties of a cell style, so existing borders
-      are changed only if they are replaced by something else, or removed only if they are replaced by 
-      CellStyle.BORDER_NONE. To remove a color from a border, use IndexedColor.AUTOMATIC.getIndex().
-      </p>
-      <p>Additionally, to remove a border or color from the PropertyTemplate object, use Extent.NONE.</p>
-      <p>
-      This does not work with diagonal borders yet.
-      </p>
-    </section>
       <anchor id="RichText"/>
       <section><title>Cells with multiple styles (Rich Text Strings)</title>
         <p>

Modified: poi/trunk/src/java/org/apache/poi/ss/util/CellAddress.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/CellAddress.java?rev=1754700&r1=1754699&r2=1754700&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/CellAddress.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/CellAddress.java Mon Aug  1 04:21:14 2016
@@ -97,15 +97,6 @@ public class CellAddress implements Comp
     }
     
     /**
-     * Create a new CellAddress object.
-     *
-     * @param address a cell address
-     */
-    public CellAddress(CellAddress address) {
-        this(address._row, address._col);
-    }    
-    
-    /**
      * Get the cell address row
      *
      * @return row



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