I'm trying to do a few probably unrecommended things with tile grid.
First I'm creating custom tiles with getTile(), and that works ok, but if I try to reorder these custom titles, I get a type error is null on the movement (unnamed(isc_TileLayout_showDragLineForRecor) @ admit/sc/modules/ISC_Grids.js). Also when it's time to rewrite the tiles, the resultset hasn't changed order.
Here is the code for that:
A second crazier thing that I haven't gotten much into is different size tiles(setLayoutPolicy(TileLayoutPolicy.FLOW) might do it), with a snap to grid. Essentially you have an ordered list of tiles that you can resize and it will snap to the grid while moving the other tiles around. I think the layout policy flow will help me on that. If you have any recommendations on this second bit, I'd be very grateful.
First I'm creating custom tiles with getTile(), and that works ok, but if I try to reorder these custom titles, I get a type error is null on the movement (unnamed(isc_TileLayout_showDragLineForRecor) @ admit/sc/modules/ISC_Grids.js). Also when it's time to rewrite the tiles, the resultset hasn't changed order.
Here is the code for that:
Code:
new TileGrid(){{ setCanReorderTiles(true); setShowAllRecords(true); setDataSource(new DataSource(...)); setAutoFetchData(true); setTileWidth(100); setTileHeight(100); } @Override public Canvas getTile(int index){ final Record record = getResultSet().get(index); return new Canvas(){{ addChild(new Label("pardon " + record.getAttributeAsInt("id"))); }}; }
Comment