LGTM except for resizing code below. If you don't want the resizing behavior after all, just expunge it.
On Mon, Oct 20, 2008 at 3:11 PM, Uwe Maurer <[EMAIL PROTECTED]> wrote: > Hi Eric, > > thanks for the review! The new patch is attached. > > On Mon, Oct 20, 2008 at 3:24 PM, Eric Ayers <[EMAIL PROTECTED]> wrote: > > General: > > > > I see this coming out a lot in the hosted mode shell window - do you > think > > it is from our visualization wrappers? > > > > [WARN] Malformed JSNI reference 'length'; expect subsequent failures > > java.lang.NoSuchFieldError: length > > ... > > at > > > com.google.gwt.visualization.client.Visualization$.draw$(Visualization.java) > > The problem was passing an int[] to a JSNI method. > I changed it to use JsArrayInteger. > > > HelloVisualization.html > > Regarding the margin around the label: > > While we are at it, do we want to add margin around the entire app? We > > can do this by putting the app inside a single div and styling that div > in > > the host page, or by putting the entire app inside a VerticalPanel and > > styling it like this: > > > > VerticalPanel vp = new VerticalPanel > > // I've used a 15 px margin in other gwt-google-api demos > > vp.getElement().getStyle().setPropertyPx("margin", 15); > > RootPanel.get().add(vp); > > I added this code. > > > > > If you really want to get fancy, there is a hack to hook into the window > > resize listener and set the size of the tab Panel dynamically based on > the > > size of the browser: > > > > > > > http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_UIVerticalFillApp > > > > I added this too :) It isn't working the way I expected. I expected the entire table border to resize: Window.addWindowResizeListener(new WindowResizeListener() { public void onWindowResized(int width, int height) { table.setWidth((width - margin * 2) + "px"); table.setHeight((height - (margin * 2 + roomForLabel))+ "px"); } > > > > > VisualizationDemo.java: > > 84: chart.draw(table, Table.DrawOptions.create()); > > If folks will be calling draw() regularly w/ setting any options, should > we > > add an overload: chart.draw(table) to AbstractVisualization? > > I think this is a good idea. I added it to AbstractVisualization. > > > I only see one table in the DataView tab (the new view). The labels seem > to > > imply that there should be two tables visible. The problem is that you > are > > overwriting flowPanel with a new instance before adding it. > > In this case, you might want to use a Grid or FlexTable to hold your 2 > > visualizations and labels side by side. > > > > The problem was the setColumn method with the int[] parameter. It > works fine now. > > Thanks, > Uwe > -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---