Java 用于';对象';标签
是否存在与“”标记同义的小部件,或者我可以仅使用带有对象的HTML标记: 我曾想过这一点,但它不是惯用语:Java 用于';对象';标签,java,gwt,gxt,Java,Gwt,Gxt,是否存在与“”标记同义的小部件,或者我可以仅使用带有对象的HTML标记: 我曾想过这一点,但它不是惯用语: import com.google.gwt.user.client.ui.HTML; final HTML h = new HTML("<object width='100%' height='100%' data='/media/invoice1.pdf'></object>"); container.setCenterWidget(h); &
import com.google.gwt.user.client.ui.HTML;
final HTML h = new HTML("<object width='100%' height='100%' data='/media/invoice1.pdf'></object>");
container.setCenterWidget(h);
<object width='100%' height='100%' data='/media/invoice1.pdf'></object>
import com.google.gwt.user.client.ui.HTML;
最终HTML h=新HTML(“”);
container.setCenterWidget(h);
使用gxt 3.0.1时,没有任何gwt小部件包装
object
标记,但是您有ObjectElement
,您可以使用它创建元素并将其附加到文档:
// Create an element and programatically set its attributes
ObjectElement o = Document.get().createObjectElement();
o.setWidth("100%");
o.setHeight("100%");
o.setData("/media/invoice1.pdf");
// Attach the element to the document
Document.get().getBody().appendChild(o);
// Optionally you could wrap your element into a widget.
Widget w = HTMLPanel.wrap(o);
没有任何gwt小部件包装
object
标记,但是您有ObjectElement
,您可以使用它创建元素并将其附加到文档:
// Create an element and programatically set its attributes
ObjectElement o = Document.get().createObjectElement();
o.setWidth("100%");
o.setHeight("100%");
o.setData("/media/invoice1.pdf");
// Attach the element to the document
Document.get().getBody().appendChild(o);
// Optionally you could wrap your element into a widget.
Widget w = HTMLPanel.wrap(o);