I've tried to get a Window layout to draw and automatically size a Cube Grid, with no success for days. Yes I have read a lot of documentation, but fail to see where the problem lies. While this is not a simple standalone code sample, I'm confident you will be able to diagnose my fault.
The result of this is a popup window of small size, with the Cube Grid shrunk to having vertical and horizontal scroll bars, and not fitting in the dvdWin Layout. What I want is a popup Window that fits the entire Cube Grid within it. Automatically sized.
I'm basing this on the simple https://smartclient.com/smartgwtee/showcase/#cube_basic example
What am I doing wrong?
Code:
final CubeGrid dvdCube = new CubeGrid(); com.smartgwt.client.widgets.Window dvdWin = new com.smartgwt.client.widgets.Window(); dvdCube.setHideEmptyFacetValues(true); dvdCube.setColumnFacets("Mode", "Category", "Corner"); dvdCube.setRowFacets("Status","VBin"); dvdCube.setValueProperty("_value"); List<ListGridRecord> dvdD = new ArrayList<ListGridRecord>(); // this is a simple static convenience method for loading example data. It works fine. dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ff069125", "0.00::0.01", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ff069125", "0.01::0.02", "Completed", 7)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ff069125", "0.02::0.03", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ff069125", "0.03::0.04", "Completed", 30)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ff069125", "0.05::0.06", "Completed", 800)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ff069125", "0.06::0.07", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ff069125", "0.00::0.01", "Completed", 4)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ff069125", "0.01::0.02", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ff069125", "0.02::0.03", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ff069125", "0.03::0.04", "Completed", 30)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ff069125", "0.05::0.06", "Completed", 1000)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ff069125", "0.06::0.07", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ss077125", "0.00::0.01", "Completed", 8)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ss077125", "0.01::0.02", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ss077125", "0.02::0.03", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ss077125", "0.03::0.04", "Completed", 20)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ss077125", "0.05::0.06", "Completed", 900)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Standard", "ss077125", "0.06::0.07", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ss077125", "0.00::0.01", "Completed", 9)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ss077125", "0.01::0.02", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ss077125", "0.02::0.03", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ss077125", "0.03::0.04", "Completed", 30)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ss077125", "0.05::0.06", "Completed", 1220)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Max", "Special", "ss077125", "0.06::0.07", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ff069125", "0.00::0.01", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ff069125", "0.01::0.02", "Completed", 4)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ff069125", "0.02::0.03", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ff069125", "0.03::0.04", "Completed", 330)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ff069125", "0.05::0.06", "Completed", 900)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ff069125", "0.06::0.07", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ff069125", "0.00::0.01", "Completed", 3)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ff069125", "0.01::0.02", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ff069125", "0.02::0.03", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ff069125", "0.03::0.04", "Completed", 30)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ff069125", "0.05::0.06", "Completed", 1230)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ff069125", "0.06::0.07", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ss077125", "0.00::0.01", "Completed", 40)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ss077125", "0.01::0.02", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ss077125", "0.02::0.03", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ss077125", "0.03::0.04", "Completed", 30)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ss077125", "0.05::0.06", "Completed", 700)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Standard", "ss077125", "0.06::0.07", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ss077125", "0.00::0.01", "Completed", 20)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ss077125", "0.01::0.02", "Completed", 0)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ss077125", "0.02::0.03", "Completed", 10)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ss077125", "0.03::0.04", "Completed", 30)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ss077125", "0.05::0.06", "Completed", 1000)); dvdD.add(CubeGridConfig.setCubeGridDVDData("Pwr_Opt", "Special", "ss077125", "0.06::0.07", "Completed", 0)); dvdCube.setData(dvdD.toArray( new ListGridRecord[ dvdD.size() ] )); dvdCube.setWidth100(); dvdCube.setHeight100(); dvdCube.setOverflow(Overflow.VISIBLE); dvdWin.setAutoWidth(); dvdWin.setAutoHeight(); dvdWin.setOverflow(Overflow.VISIBLE); dvdWin.setMargin(20); dvdWin.setAutoCenter(true); dvdWin.addMember(dvdCube); dvdWin.draw();
I'm basing this on the simple https://smartclient.com/smartgwtee/showcase/#cube_basic example
What am I doing wrong?
Comment