tbl.setWidget(1, 0, btnCopy);
tbl.setWidget(1, 1, btnGit);
}
});
final XPopup popup = new XPopup();
XDragScrollView view = new XDragScrollView();
view.addStyleName("codeDemo");
tbl.setWidget(0, 0, new XSpinner());
tbl.setCellSpacing(10);
FlexCellFormatter fcf = tbl.getFlexCellFormatter();
fcf.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
fcf.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
fcf.setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_TOP);
fcf.setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
fcf.setVerticalAlignment(1, 1, HasVerticalAlignment.ALIGN_TOP);
fcf.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_LEFT);
fcf.setColSpan(0, 0, 2);
fcf.setWidth(1, 0, "50%");
fcf.setWidth(1, 1, "50%");
view.add(tbl);
int h = Window.getClientHeight();
int w = Window.getClientWidth();
popup.setWidget(view);
// mobile phone
if (h + w < 1000) {
popup.setTop("35px");
popup.setRight("5%");
popup.setLeft("5%");
popup.setBottom("40px");
} else {
popup.setTop("35px");
popup.setRight("5%");
popup.setLeft("10%");
popup.setBottom("30%");
}
popup.show();
}