Class: Layout::TableColumn

Inherits:
Object
  • Object
show all

Overview

A TableColumn is a single column from a table.

Examples:

bounds = Geom::Bounds2d.new(1, 1, 4, 4)
rows = 4
columns = 4
table = Layout::Table.new(bounds, rows, columns)
columns.times { |index|
  column = table.column(index)
}

Version:

  • LayOut 2018

Instance Method Summary # collapse

Instance Method Details

#left_edge_styleLayout::Style

The #left_edge_style method returns the Style of a Layout::TableColumn's left edge. If this is the first column of the table, this method will return the style of the table border.

Examples:

bounds = Geom::Bounds2d.new(1, 1, 4, 4)
rows = 4
columns = 4
table = Layout::Table.new(bounds, rows, columns)
style = table.get_column(1).edge_style

Returns:

Version:

  • LayOut 2018

#left_edge_style=(style) ⇒ Object

The #left_edge_style= method sets the Style of a Layout::TableColumn's left edge. If this is the first column of the table, this method will set the style for the table border.

Examples:

bounds = Geom::Bounds2d.new(1, 1, 4, 4)
rows = 4
columns = 4
table = Layout::Table.new(bounds, rows, columns)
style = Layout::Style.new
style.stroke_width = 2.0
table.get_column(1).edge_style = style

Parameters:

Raises:

Version:

  • LayOut 2018

#right_edge_styleLayout::Style

The #right_edge_style method returns the Style of a Layout::TableColumn's right edge. If this is the last column of the table, this method will return the style of the table border.

Examples:

bounds = Geom::Bounds2d.new(1, 1, 4, 4)
rows = 4
columns = 4
table = Layout::Table.new(bounds, rows, columns)
style = table.get_column(1).edge_style

Returns:

Version:

  • LayOut 2018

#right_edge_style=(style) ⇒ Object

The #right_edge_style= method sets the Style of a Layout::TableColumn's right edge. If this is the last column of the table, this method will set the style for the table border.

Examples:

bounds = Geom::Bounds2d.new(1, 1, 4, 4)
rows = 4
columns = 4
table = Layout::Table.new(bounds, rows, columns)
style = Layout::Style.new
style.stroke_width = 2.0
table.get_column(1).edge_style = style

Parameters:

Raises:

Version:

  • LayOut 2018

#widthFloat

The #width method returns the width of the Layout::TableColumn.

Examples:

bounds = Geom::Bounds2d.new(1, 1, 4, 4)
rows = 4
columns = 4
table = Layout::Table.new(bounds, rows, columns)
width = table.get_column(1).width

Returns:

  • (Float)

Version:

  • LayOut 2018

#width=(width) ⇒ Object

The #width= method sets the width of the Layout::TableColumn.

Examples:

bounds = Geom::Bounds2d.new(1, 1, 4, 4)
rows = 4
columns = 4
table = Layout::Table.new(bounds, rows, columns)
table.get_column(1).width = 6.0

Parameters:

  • width (Float)

Raises:

Version:

  • LayOut 2018