super("Flex Table", "Table");
}
@Override
protected void onFirstShowPage() {
final PPusher pusher = PPusher.initialize();
super.onFirstShowPage();
final PFlexTable table = new PFlexTable();
table.setCellPadding(0);
table.setCellSpacing(0);
table.setSizeFull();
labels = new PLabel[100][10];
for (int r = 0; r < 100; r++) {
for (int c = 0; c < 10; c++) {
final PLabel pLabel = new PLabel(r + "_" + c);
labels[r][c] = pLabel;
pLabel.setWidth("40px");
table.setWidget(r, c, pLabel);
}
}
pusher.addConnectionListener(new ConnectionListener() {
final Timer timer = new Timer();
@Override
public void onOpen() {
timer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
pusher.execute(new Runnable() {
@Override
public void run() {
for (int r = 0; r < 100; r++) {
for (int c = 0; c < 10; c++) {