From 058faf2581970fa18c314ad07f5658adeca32c69 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 22:08:55 +0900 Subject: update to README --- doc/Axlsx/Border.html | 201 ++++++++++++++++++++++---------------------------- 1 file changed, 87 insertions(+), 114 deletions(-) (limited to 'doc/Axlsx/Border.html') diff --git a/doc/Axlsx/Border.html b/doc/Axlsx/Border.html index b1becd25..da23f5f5 100644 --- a/doc/Axlsx/Border.html +++ b/doc/Axlsx/Border.html @@ -94,9 +94,8 @@

Overview

-

-This class details a border used in Office Open XML spreadsheet styles. -

+ +

This class details a border used in Office Open XML spreadsheet styles.

@@ -128,11 +127,10 @@ This class details a border used in Office Open XML spreadsheet styles. -

-The diagonal down property for the border that indicates if the border +

+

The diagonal down property for the border that indicates if the border should include a diagonal line from the top left to the top right of the -cell. -

+cell.

@@ -157,10 +155,9 @@ cell. -

-The diagonal up property for the border that indicates if the border should -include a diagonal line from the bottom left to the top right of the cell. -

+
+

The diagonal up property for the border that indicates if the border should +include a diagonal line from the bottom left to the top right of the cell.

@@ -185,11 +182,10 @@ include a diagonal line from the bottom left to the top right of the cell. -

-The outline property for the border indicating that top, left, right and +

+

The outline property for the border indicating that top, left, right and bottom borders should only be applied to the outside border of a range of -cells. -

+cells.

@@ -214,9 +210,8 @@ cells. -

-A list of BorderPr objects for this border. -

+
+

A list of BorderPr objects for this border.

@@ -253,9 +248,8 @@ A list of BorderPr objects for this border. -

-Creates a new Border object. -

+
+

Creates a new Border object.

@@ -277,9 +271,8 @@ Creates a new Border object. -

-Serializes the border element. -

+
+

Serializes the border element.

@@ -300,9 +293,8 @@ Serializes the border element.

-

-Creates a new Border object -

+ +

Creates a new Border object

@@ -312,20 +304,18 @@ Creates a new Border object

Examples:

-

-Making a border -

+

+

Making a border

-
p = Package.new
-red_border = Border.new
-[:left, :right, :top, :bottom].each do |item| 
-  red_border.prs << BorderPr.new(:name=>item, :style=>:thin, :color=>Color.new(:rgb=>"FFFF0000"))     #   
-end
-# this sets red_border to be the index for the created border.
-red_border = p.workbook.styles.@borders << red_border
-#used in row creation as follows. This will add a red border to each of the cells in the row.
-p.workbook.add_worksheet.rows << :values=>[1,2,3] :style=>red_border
-
+
p = Package.new
+red_border = Border.new
+[:left, :right, :top, :bottom].each do |item| 
+  red_border.prs << BorderPr.new(:name=>item, :style=>:thin, :color=>Color.new(:rgb=>"FFFF0000"))     #   
+end
+# this sets red_border to be the index for the created border.
+red_border = p.workbook.styles.@borders << red_border
+#used in row creation as follows. This will add a red border to each of the cells in the row.
+p.workbook.add_worksheet.rows << :values=>[1,2,3] :style=>red_border

Parameters:

@@ -343,9 +333,8 @@ Making a border — -

-a customizable set of options -

+
+

a customizable set of options

@@ -405,13 +394,12 @@ a customizable set of options
# File 'lib/axlsx/stylesheet/border.rb', line 31
 
-def initialize(options={})
-  @prs = SimpleTypedList.new BorderPr
-  options.each do |o|
-    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
-  end
-end
-
+def initialize(options={}) + @prs = SimpleTypedList.new BorderPr + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -434,11 +422,10 @@ a customizable set of options

-

-The diagonal down property for the border that indicates if the border + +

The diagonal down property for the border that indicates if the border should include a diagonal line from the top left to the top right of the -cell. -

+cell.

@@ -456,11 +443,10 @@ cell. — -

-The diagonal down property for the border that indicates if the border +

+

The diagonal down property for the border that indicates if the border should include a diagonal line from the top left to the top right of the -cell. -

+cell.

@@ -480,10 +466,9 @@ cell.
# File 'lib/axlsx/stylesheet/border.rb', line 9
 
-def diagonalDown
-  @diagonalDown
-end
-
+def diagonalDown + @diagonalDown +end @@ -501,10 +486,9 @@ cell.

-

-The diagonal up property for the border that indicates if the border should -include a diagonal line from the bottom left to the top right of the cell. -

+ +

The diagonal up property for the border that indicates if the border should +include a diagonal line from the bottom left to the top right of the cell.

@@ -522,10 +506,9 @@ include a diagonal line from the bottom left to the top right of the cell. — -

-The diagonal up property for the border that indicates if the border should -include a diagonal line from the bottom left to the top right of the cell. -

+
+

The diagonal up property for the border that indicates if the border should +include a diagonal line from the bottom left to the top right of the cell.

@@ -545,10 +528,9 @@ include a diagonal line from the bottom left to the top right of the cell.
# File 'lib/axlsx/stylesheet/border.rb', line 6
 
-def diagonalUp
-  @diagonalUp
-end
-
+def diagonalUp + @diagonalUp +end @@ -566,11 +548,10 @@ include a diagonal line from the bottom left to the top right of the cell.

-

-The outline property for the border indicating that top, left, right and + +

The outline property for the border indicating that top, left, right and bottom borders should only be applied to the outside border of a range of -cells. -

+cells.

@@ -588,11 +569,10 @@ cells. — -

-The outline property for the border indicating that top, left, right and +

+

The outline property for the border indicating that top, left, right and bottom borders should only be applied to the outside border of a range of -cells. -

+cells.

@@ -612,10 +592,9 @@ cells.
# File 'lib/axlsx/stylesheet/border.rb', line 12
 
-def outline
-  @outline
-end
-
+def outline + @outline +end @@ -633,9 +612,8 @@ cells.

-

-A list of BorderPr objects for this border. -

+ +

A list of BorderPr objects for this border.

@@ -653,9 +631,8 @@ A list of BorderPr objects for this border. — -

-A list of BorderPr objects for this border. -

+
+

A list of BorderPr objects for this border.

@@ -675,10 +652,9 @@ A list of BorderPr objects for this border.
# File 'lib/axlsx/stylesheet/border.rb', line 15
 
-def prs
-  @prs
-end
-
+def prs + @prs +end @@ -700,9 +676,8 @@ A list of BorderPr objects for this border.

-

-Serializes the border element -

+ +

Serializes the border element

@@ -721,9 +696,8 @@ Serializes the border element — -

-The document builder instance this objects xml will be added to. -

+
+

The document builder instance this objects xml will be added to.

@@ -750,16 +724,15 @@ The document builder instance this objects xml will be added to.
# File 'lib/axlsx/stylesheet/border.rb', line 47
 
-def to_xml(xml)
-  xml.border(self.instance_values.select{ |k,v| [:diagonalUp, :diagonalDown, :outline].include? k }) {
-    [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal].each do |k|
-      @prs.select { |pr| pr.name == k }.each do |part| 
-        part.to_xml(xml) 
-      end
-    end
-  }
-end
-
+def to_xml(xml) + xml.border(self.instance_values.select{ |k,v| [:diagonalUp, :diagonalDown, :outline].include? k }) { + [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal].each do |k| + @prs.select { |pr| pr.name == k }.each do |part| + part.to_xml(xml) + end + end + } +end @@ -770,9 +743,9 @@ The document builder instance this objects xml will be added to.
-- cgit v1.2.3