Class: Coopy::CombinedTable
- Inherits:
-
Object
- Object
- Coopy::CombinedTable
- Defined in:
- lib/lib/coopy/combined_table.rb
Instance Method Summary collapse
- #all ⇒ Object
- #clear ⇒ Object
- #clone ⇒ Object
- #create ⇒ Object
- #get_cell(x, y) ⇒ Object
- #get_cell_view ⇒ Object
- #get_data ⇒ Object
- #get_height ⇒ Object
- #get_meta ⇒ Object
- #get_table ⇒ Object
- #get_width ⇒ Object
- #height ⇒ Object
- #height=(__v) ⇒ Object
-
#initialize(t) ⇒ CombinedTable
constructor
A new instance of CombinedTable.
- #insert_or_delete_columns(fate, wfate) ⇒ Object
- #insert_or_delete_rows(fate, hfate) ⇒ Object
- #is_resizable ⇒ Object
- #resize(w, h) ⇒ Object
- #set_cell(x, y, c) ⇒ Object
- #to_s ⇒ Object
- #trim_blank ⇒ Object
- #width ⇒ Object
- #width=(__v) ⇒ Object
Constructor Details
#initialize(t) ⇒ CombinedTable
Returns a new instance of CombinedTable.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/lib/coopy/combined_table.rb', line 7 def initialize(t) @t = t @dx = 0 @dy = 0 @core = t @head = nil return if t.get_width < 1 || t.get_height < 1 v = t.get_cell_view return if v.to_s(t.get_cell(0,0)) != "@@" @dx = 1 @dy = 0 begin _g1 = 0 _g = t.get_height while(_g1 < _g) y = _g1 _g1+=1 txt = v.to_s(t.get_cell(0,y)) break if txt == nil || txt == "" || txt == "null" @dy+=1 end end @head = ::Coopy::CombinedTableHead.new(self,@dx,@dy) @body = ::Coopy::CombinedTableBody.new(self,@dx,@dy) @core = @body @meta = ::Coopy::SimpleMeta.new(@head) end |
Instance Method Details
#all ⇒ Object
47 48 49 |
# File 'lib/lib/coopy/combined_table.rb', line 47 def all @t end |
#clear ⇒ Object
92 93 94 |
# File 'lib/lib/coopy/combined_table.rb', line 92 def clear @core.clear end |
#clone ⇒ Object
112 113 114 |
# File 'lib/lib/coopy/combined_table.rb', line 112 def clone @core.clone end |
#create ⇒ Object
116 117 118 |
# File 'lib/lib/coopy/combined_table.rb', line 116 def create @t.create end |
#get_cell(x, y) ⇒ Object
68 69 70 |
# File 'lib/lib/coopy/combined_table.rb', line 68 def get_cell(x,y) @core.get_cell(x,y) end |
#get_cell_view ⇒ Object
80 81 82 |
# File 'lib/lib/coopy/combined_table.rb', line 80 def get_cell_view @t.get_cell_view end |
#get_data ⇒ Object
108 109 110 |
# File 'lib/lib/coopy/combined_table.rb', line 108 def get_data nil end |
#get_height ⇒ Object
64 65 66 |
# File 'lib/lib/coopy/combined_table.rb', line 64 def get_height @core.get_height end |
#get_meta ⇒ Object
120 121 122 |
# File 'lib/lib/coopy/combined_table.rb', line 120 def @meta end |
#get_table ⇒ Object
51 52 53 |
# File 'lib/lib/coopy/combined_table.rb', line 51 def get_table self end |
#get_width ⇒ Object
60 61 62 |
# File 'lib/lib/coopy/combined_table.rb', line 60 def get_width @core.get_width end |
#height ⇒ Object
55 |
# File 'lib/lib/coopy/combined_table.rb', line 55 def height() get_height end |
#height=(__v) ⇒ Object
56 |
# File 'lib/lib/coopy/combined_table.rb', line 56 def height=(__v) @height = __v end |
#insert_or_delete_columns(fate, wfate) ⇒ Object
100 101 102 |
# File 'lib/lib/coopy/combined_table.rb', line 100 def insert_or_delete_columns(fate,wfate) @core.insert_or_delete_columns(fate,wfate) end |
#insert_or_delete_rows(fate, hfate) ⇒ Object
96 97 98 |
# File 'lib/lib/coopy/combined_table.rb', line 96 def insert_or_delete_rows(fate,hfate) @core.insert_or_delete_rows(fate,hfate) end |
#is_resizable ⇒ Object
84 85 86 |
# File 'lib/lib/coopy/combined_table.rb', line 84 def is_resizable @core.is_resizable end |
#resize(w, h) ⇒ Object
88 89 90 |
# File 'lib/lib/coopy/combined_table.rb', line 88 def resize(w,h) @core.resize(h,w) end |
#set_cell(x, y, c) ⇒ Object
72 73 74 |
# File 'lib/lib/coopy/combined_table.rb', line 72 def set_cell(x,y,c) @core.set_cell(x,y,c) end |
#to_s ⇒ Object
76 77 78 |
# File 'lib/lib/coopy/combined_table.rb', line 76 def to_s ::Coopy::SimpleTable.table_to_string(self) end |
#trim_blank ⇒ Object
104 105 106 |
# File 'lib/lib/coopy/combined_table.rb', line 104 def trim_blank @core.trim_blank end |
#width ⇒ Object
57 |
# File 'lib/lib/coopy/combined_table.rb', line 57 def width() get_width end |
#width=(__v) ⇒ Object
58 |
# File 'lib/lib/coopy/combined_table.rb', line 58 def width=(__v) @width = __v end |