class Axlsx::CellAlignment
CellAlignment
stores information about the cell alignment of a style Xf
Object. @note Using Styles#add_style
is the recommended way to manage cell alignment. @see Styles#add_style
Attributes
The horizontal alignment of the cell. @note
The horizontal cell alignement style must be one of :general :left :center :right :fill :justify :centerContinuous :distributed
@return [Symbol]
The amount of indent @return [Integer]
Indicate if the last line should be justified. @return [Boolean]
Indicate if the last line should be justified. @return [Boolean]
The reading order of the text 0 Context Dependent 1 Left-to-Right 2 Right-to-Left @return [Integer]
The reading order of the text 0 Context Dependent 1 Left-to-Right 2 Right-to-Left @return [Integer]
The amount of relativeIndent @return [Integer]
The amount of relativeIndent @return [Integer]
Indicate if the text should be shrunk to the fit in the cell. @return [Boolean]
Indicate if the text should be shrunk to the fit in the cell. @return [Boolean]
The textRotation of the cell. @return [Integer]
The textRotation of the cell. @return [Integer]
The vertical alignment of the cell. @note
The vertical cell allingment style must be one of the following: :top :center :bottom :justify :distributed
@return [Symbol]
Indicate if the text of the cell should wrap @return [Boolean]
Indicate if the text of the cell should wrap @return [Boolean]
Public Class Methods
Create a new cell_alignment object @option options [Symbol] horizontal @option options [Symbol] vertical @option options [Integer] text_rotation
@option options [Boolean] wrap_text
@option options [Integer] indent @option options [Integer] relative_indent
@option options [Boolean] justify_last_line
@option options [Boolean] shrink_to_fit
@option options [Integer] reading_order
# File lib/axlsx/stylesheet/cell_alignment.rb, line 25 def initialize(options={}) parse_options options end
Public Instance Methods
@see horizontal
# File lib/axlsx/stylesheet/cell_alignment.rb, line 94 def horizontal=(v) Axlsx::validate_horizontal_alignment v; @horizontal = v end
@see indent
# File lib/axlsx/stylesheet/cell_alignment.rb, line 106 def indent=(v) Axlsx::validate_unsigned_int v; @indent = v end
@see justifyLastLine
# File lib/axlsx/stylesheet/cell_alignment.rb, line 113 def justify_last_line=(v) Axlsx::validate_boolean v; @justify_last_line = v end
@see readingOrder
# File lib/axlsx/stylesheet/cell_alignment.rb, line 121 def reading_order=(v) Axlsx::validate_unsigned_int v; @reading_order = v end
@see relativeIndent
# File lib/axlsx/stylesheet/cell_alignment.rb, line 109 def relative_indent=(v) Axlsx::validate_int v; @relative_indent = v end
@see shrinkToFit
# File lib/axlsx/stylesheet/cell_alignment.rb, line 117 def shrink_to_fit=(v) Axlsx::validate_boolean v; @shrink_to_fit = v end
@see textRotation
# File lib/axlsx/stylesheet/cell_alignment.rb, line 98 def text_rotation=(v) Axlsx::validate_unsigned_int v; @text_rotation = v end
Serializes the object @param [String] str @return [String]
# File lib/axlsx/stylesheet/cell_alignment.rb, line 127 def to_xml_string(str = '') serialized_tag('alignment', str) end
@see vertical
# File lib/axlsx/stylesheet/cell_alignment.rb, line 96 def vertical=(v) Axlsx::validate_vertical_alignment v; @vertical = v end
@see wrapText
# File lib/axlsx/stylesheet/cell_alignment.rb, line 102 def wrap_text=(v) Axlsx::validate_boolean v; @wrap_text = v end