classdef TableGridDraw < GUIBase
    %TABLEGRIDDRAW Draw a TableGrid into a uipanel
    %   Draws a 2D Grid inside a uipanel (Yay!)
    
    properties
        my_table_grid = []
        controls = []
        
        gui_params = []
    end
    
    methods
        function object = TableGridDraw(my_table_grid, gui_params)
            if nargin == 1
                gui_params = GUIParameters();
            end
            
           object.my_table_grid = my_table_grid;
           object.gui_params = gui_params;
           
           my_table_grid.addlistener('StructureChanged', @(src, event)object.handle_table_change(src, event));
        end
        
        function handle_table_change(object, src, event)
            notify(object, 'BoundingBoxChanged');
            object.redraw();
        end
    end
    
end

