Saturday, May 28, 2016

Re: Dynamic CANVAS into dataGrid Cell?

Yes, I think I figured it out. 

TableCellBuilder tCell = tRow.startTD();
tCell.vAlign("top");
tCell.id("ce-" + photo.getKeyString());
tCell.endTD();
tCell = tRow.startTD();
tCell.attribute("valign", "top");
InputBuilder xBtn = tCell.startButtonInput();
xBtn.attribute("id", "pd-" + photo.getKeyString());
xBtn.value("X");
xBtn.end();
tCell.endTD();
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
Element tcEl = DOM.getElementById("ce-"+photo.getKeyString());
Drawer drawer = new Drawer(issueDataGrid);
drawer.doIt(photo, tcEl);
//Window.alert("image.url = " + image.getUrl());
}
});

That was in the TableBuilder then within the Drawer class (which is a wrapper for a Canvas)

divEl.appendChild(imageCanvas.getElement());

Thanks for looking at this.


On Saturday, May 28, 2016 at 1:23:13 PM UTC-4, Boris Brudnoy wrote:

Sounds like this is about creating a custom cell, not a cell table builder.


On Sat, May 28, 2016, 13:05 David Edelstein <dve...@gmail.com> wrote:
How can I get a dynamically created CANVAS object into a Cell of a DataGrid? The cell it needs to go into is created in a AbstractCellTableBuilder class. Similar to the GWT Showcase for custom datagrid. 

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
--
BORIS BRUDNOY
Web Application Developer, Java/GWT Enthusiast (LinkedIn)

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment