// Set video ID option
final TextBox videoIDBox = new TextBox();
videoIDBox.setText("iuywmPePYKQ");
grid.setHTML(0, 0, "<B>Video ID:</B>");
grid.setWidget(0, 1, videoIDBox);
grid.setWidget(0, 2, new Button("Set", new ClickListener() {
public void onClick(Widget sender) {
mainViewer.setMovieID(videoIDBox.getText());
}
}));
// Set player width
final TextBox widthBox = new TextBox();
widthBox.setText("443px");
grid.setHTML(1, 0, "<B>Width:</B>");
grid.setWidget(1, 1, widthBox);
grid.setWidget(1, 2, new Button("Set", new ClickListener() {
public void onClick(Widget sender) {
mainViewer.setWidth(widthBox.getText());
}
}));
// Set player height
final TextBox heightBox = new TextBox();
heightBox.setText("369px");
grid.setHTML(2, 0, "<B>Height:</B>");
grid.setWidget(2, 1, heightBox);
grid.setWidget(2, 2, new Button("Set", new ClickListener() {
public void onClick(Widget sender) {
mainViewer.setHeight(heightBox.getText());
}
}));
// Plugins page
final TextBox pluginsBox = new TextBox();
pluginsBox.setText("http://www.google.com");
grid.setHTML(3, 0, "<B>Plugins Page:</B>");
grid.setWidget(3, 1, pluginsBox);
grid.setWidget(3, 2, new Button("Set", new ClickListener() {
public void onClick(Widget sender) {
EmbeddedObjectInfo info = mainViewer.getInfo();
info.setPluginsPage(pluginsBox.getText());
mainViewer.setInfo(info);
}
}));
// Enabled/disable autoplay
grid.setWidget(4, 0, new Button("Enable AutoPlay", new ClickListener() {
public void onClick(Widget sender) {
if (mainViewer.isAutoPlayEnabled()) {
mainViewer.setAutoPlayEnabled(false);
((Button) sender).setText("Enable AutoPlay");
} else {
mainViewer.setAutoPlayEnabled(true);
((Button) sender).setText("Disable AutoPlay");
}
}
}));
// Enabled/disable related videos
grid.setWidget(4, 1, new Button("Enable Related", new ClickListener() {
public void onClick(Widget sender) {
if (mainViewer.isRelatedVideosEnabled()) {
mainViewer.setRelatedVideosEnabled(false);
((Button) sender).setText("Enable Related");
} else {