class Coopy::CombinedTableBody
Attributes
all[RW]
dx[RW]
dy[RW]
meta[RW]
parent[RW]
Public Class Methods
new(parent,dx,dy)
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 7 def initialize(parent,dx,dy) @parent = parent @dx = dx @dy = dy @all = parent.all end
Public Instance Methods
clear()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 73 def clear @all.clear @dx = 0 @dy = 0 end
clone()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 136 def clone ::Coopy::CombinedTable.new(@all.clone) end
create()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 140 def create ::Coopy::CombinedTable.new(@all.create) end
get_cell(x,y)
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 41 def get_cell(x,y) if y == 0 @meta = @parent.get_meta.as_table if @meta == nil return @meta.get_cell(x + @dx,0) end @all.get_cell(x + @dx,y + @dy - 1) end
get_cell_view()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 61 def get_cell_view @all.get_cell_view end
get_data()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 132 def get_data nil end
get_height()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 37 def get_height @all.get_height - @dy + 1 end
get_meta()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 144 def get_meta @parent.get_meta end
get_table()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 24 def get_table self end
get_width()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 33 def get_width @all.get_width - 1 end
height()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 28 def height() get_height end
height=(__v)
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 29 def height=(__v) @height = __v end
insert_or_delete_columns(fate,wfate)
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 106 def insert_or_delete_columns(fate,wfate) fate2 = Array.new begin _g1 = 0 _g = @dx + 1 while(_g1 < _g) x = _g1 _g1+=1 fate2.push(x) end end begin _g2 = 0 while(_g2 < fate.length) f = fate[_g2] _g2+=1 fate2.push(((f >= 0) ? f + @dx + 1 : f)) end end @all.insert_or_delete_columns(fate2,wfate + @dx) end
insert_or_delete_rows(fate,hfate)
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 79 def insert_or_delete_rows(fate,hfate) fate2 = Array.new begin _g1 = 0 _g = @dy while(_g1 < _g) y = _g1 _g1+=1 fate2.push(y) end end hdr = true begin _g2 = 0 while(_g2 < fate.length) f = fate[_g2] _g2+=1 if hdr hdr = false next end fate2.push(((f >= 0) ? f + @dy - 1 : f)) end end @all.insert_or_delete_rows(fate2,hfate + @dy - 1) end
is_resizable()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 65 def is_resizable @all.is_resizable end
resize(w,h)
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 69 def resize(w,h) @all.resize(w + 1,h + @dy) end
set_cell(x,y,c)
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 49 def set_cell(x,y,c) if y == 0 @all.set_cell(x + @dx,0,c) return end @all.set_cell(x + @dx,y + @dy - 1,c) end
to_s()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 57 def to_s ::Coopy::SimpleTable.table_to_string(self) end
trim_blank()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 128 def trim_blank @all.trim_blank end
width()
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 30 def width() get_width end
width=(__v)
click to toggle source
# File lib/lib/coopy/combined_table_body.rb, line 31 def width=(__v) @width = __v end