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

