poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1818054 - /poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
Date Wed, 13 Dec 2017 18:46:16 GMT
Author: onealj
Date: Wed Dec 13 18:46:16 2017
New Revision: 1818054

URL: http://svn.apache.org/viewvc?rev=1818054&view=rev
Log:
bug 61898,59264: update Spreadsheet Quick Guide for BorderStyle enum
CellStyle.BORDER_* -> BorderStyle.*

Modified:
    poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml

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=1818054&r1=1818053&r2=1818054&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml (original)
+++ poi/site/src/documentation/content/xdocs/spreadsheet/quick-guide.xml Wed Dec 13 18:46:16
2017
@@ -311,13 +311,13 @@
 
     // Style the cell with borders all around.
     CellStyle style = wb.createCellStyle();
-    style.setBorderBottom(CellStyle.BORDER_THIN);
+    style.setBorderBottom(BorderStyle.THIN);
     style.setBottomBorderColor(IndexedColors.BLACK.getIndex());
-    style.setBorderLeft(CellStyle.BORDER_THIN);
+    style.setBorderLeft(BorderStyle.THIN);
     style.setLeftBorderColor(IndexedColors.GREEN.getIndex());
-    style.setBorderRight(CellStyle.BORDER_THIN);
+    style.setBorderRight(BorderStyle.THIN);
     style.setRightBorderColor(IndexedColors.BLUE.getIndex());
-    style.setBorderTop(CellStyle.BORDER_MEDIUM_DASHED);
+    style.setBorderTop(BorderStyle.MEDIUM_DASHED);
     style.setTopBorderColor(IndexedColors.BLACK.getIndex());
     cell.setCellStyle(style);
 
@@ -805,7 +805,7 @@ Examples:
     sheet1.addMergedRegion( region );
 
     // Set the border and border colors.
-    final short borderMediumDashed = CellStyle.BORDER_MEDIUM_DASHED;
+    final short borderMediumDashed = BorderStyle.MEDIUM_DASHED;
     RegionUtil.setBorderBottom( borderMediumDashed,
         region, sheet1, wb );
     RegionUtil.setBorderTop( borderMediumDashed,
@@ -2152,10 +2152,10 @@ the data to populate another drop down l
     fontFmt.setFontColorIndex(IndexedColors.DARK_RED.index);
     
     BorderFormatting bordFmt = rule1.createBorderFormatting();
-    bordFmt.setBorderBottom(BorderFormatting.BORDER_THIN);
-    bordFmt.setBorderTop(BorderFormatting.BORDER_THICK);
-    bordFmt.setBorderLeft(BorderFormatting.BORDER_DASHED);
-    bordFmt.setBorderRight(BorderFormatting.BORDER_DOTTED);
+    bordFmt.setBorderBottom(BorderStyle.THIN);
+    bordFmt.setBorderTop(BorderStyle.THICK);
+    bordFmt.setBorderLeft(BorderStyle.DASHED);
+    bordFmt.setBorderRight(BorderStyle.DOTTED);
 
     PatternFormatting patternFmt = rule1.createPatternFormatting();
     patternFmt.setFillBackgroundColor(IndexedColors.YELLOW.index);
@@ -2240,10 +2240,10 @@ the data to populate another drop down l
   Map<String, Object> properties = new HashMap<String, Object>();
 		  
   // border around a cell
-  properties.put(CellUtil.BORDER_TOP, CellStyle.BORDER_MEDIUM);
-  properties.put(CellUtil.BORDER_BOTTOM, CellStyle.BORDER_MEDIUM);
-  properties.put(CellUtil.BORDER_LEFT, CellStyle.BORDER_MEDIUM);
-  properties.put(CellUtil.BORDER_RIGHT, CellStyle.BORDER_MEDIUM);
+  properties.put(CellUtil.BORDER_TOP, BorderStyle.MEDIUM);
+  properties.put(CellUtil.BORDER_BOTTOM, BorderStyle.MEDIUM);
+  properties.put(CellUtil.BORDER_LEFT, BorderStyle.MEDIUM);
+  properties.put(CellUtil.BORDER_RIGHT, BorderStyle.MEDIUM);
   
   // Give it a color (RED)
   properties.put(CellUtil.TOP_BORDER_COLOR, IndexedColors.RED.getIndex());



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


Mime
View raw message