class Coopy::JsonTable

Attributes

columns[RW]
data[RW]
h[RW]
idx2col[RW]
name[RW]
rows[RW]
w[RW]

Public Class Methods

new(data,name) click to toggle source
# File lib/lib/coopy/json_table.rb, line 7
def initialize(data,name)
  @data = data
  @columns = Reflect.field(data,"columns")
  @rows = Reflect.field(data,"rows")
  @w = @columns.length
  @h = @rows.length
  @idx2col = {}
  begin
    _g1 = 0
    _g = @columns.length
    while(_g1 < _g) 
      idx = _g1
      _g1+=1
      begin
        v = @columns[idx]
        @idx2col[idx] = v
        v
      end
    end
  end
  @name = name
end

Public Instance Methods

alter_columns(columns) click to toggle source
# File lib/lib/coopy/json_table.rb, line 118
def alter_columns(columns)
  false
end
apply_flags(flags) click to toggle source
# File lib/lib/coopy/json_table.rb, line 126
def apply_flags(flags)
  false
end
as_table() click to toggle source
# File lib/lib/coopy/json_table.rb, line 130
def as_table 
  nil
end
change_row(rc) click to toggle source
# File lib/lib/coopy/json_table.rb, line 122
def change_row(rc)
  false
end
clear() click to toggle source
# File lib/lib/coopy/json_table.rb, line 84
def clear 
end
clone() click to toggle source
# File lib/lib/coopy/json_table.rb, line 103
def clone 
  nil
end
clone_meta(table = nil) click to toggle source
# File lib/lib/coopy/json_table.rb, line 134
def clone_meta(table = nil)
  nil
end
create() click to toggle source
# File lib/lib/coopy/json_table.rb, line 114
def create 
  nil
end
get_cell(x,y) click to toggle source
# File lib/lib/coopy/json_table.rb, line 59
def get_cell(x,y)
  return @idx2col[x] if y == 0
  Reflect.field(@rows[y - 1],@idx2col[x])
end
get_cell_view() click to toggle source
# File lib/lib/coopy/json_table.rb, line 72
def get_cell_view 
  ::Coopy::SimpleView.new
end
get_data() click to toggle source
# File lib/lib/coopy/json_table.rb, line 99
def get_data 
  nil
end
get_height() click to toggle source
# File lib/lib/coopy/json_table.rb, line 55
def get_height 
  @h + 1
end
get_meta() click to toggle source
# File lib/lib/coopy/json_table.rb, line 110
def get_meta 
  self
end
get_name() click to toggle source
# File lib/lib/coopy/json_table.rb, line 158
def get_name 
  @name
end
get_row_stream() click to toggle source
# File lib/lib/coopy/json_table.rb, line 146
def get_row_stream 
  nil
end
get_table() click to toggle source
# File lib/lib/coopy/json_table.rb, line 42
def get_table 
  self
end
get_width() click to toggle source
# File lib/lib/coopy/json_table.rb, line 51
def get_width 
  @w
end
height() click to toggle source
# File lib/lib/coopy/json_table.rb, line 46
def height() get_height end
height=(__v) click to toggle source
# File lib/lib/coopy/json_table.rb, line 47
def height=(__v) @height = __v end
insert_or_delete_columns(fate,wfate) click to toggle source
# File lib/lib/coopy/json_table.rb, line 91
def insert_or_delete_columns(fate,wfate)
  false
end
insert_or_delete_rows(fate,hfate) click to toggle source
# File lib/lib/coopy/json_table.rb, line 87
def insert_or_delete_rows(fate,hfate)
  false
end
is_nested() click to toggle source
# File lib/lib/coopy/json_table.rb, line 150
def is_nested 
  false
end
is_resizable() click to toggle source
# File lib/lib/coopy/json_table.rb, line 76
def is_resizable 
  false
end
is_sql() click to toggle source
# File lib/lib/coopy/json_table.rb, line 154
def is_sql 
  false
end
resize(w,h) click to toggle source
# File lib/lib/coopy/json_table.rb, line 80
def resize(w,h)
  false
end
set_cell(x,y,c) click to toggle source
# File lib/lib/coopy/json_table.rb, line 64
def set_cell(x,y,c)
  puts "JsonTable is read-only"
end
set_meta(meta) click to toggle source
# File lib/lib/coopy/json_table.rb, line 107
def set_meta(meta)
end
to_s() click to toggle source
# File lib/lib/coopy/json_table.rb, line 68
def to_s 
  ""
end
trim_blank() click to toggle source
# File lib/lib/coopy/json_table.rb, line 95
def trim_blank 
  false
end
use_for_column_changes() click to toggle source
# File lib/lib/coopy/json_table.rb, line 138
def use_for_column_changes 
  false
end
use_for_row_changes() click to toggle source
# File lib/lib/coopy/json_table.rb, line 142
def use_for_row_changes 
  false
end
width() click to toggle source
# File lib/lib/coopy/json_table.rb, line 48
def width() get_width end
width=(__v) click to toggle source
# File lib/lib/coopy/json_table.rb, line 49
def width=(__v) @width = __v end