imageFormatListBox_ = new ListBox();
JsArray<SavePlotAsImageFormat> formats = context.getFormats();
int selectedIndex = 0;
for (int i=0; i<formats.length(); i++)
{
SavePlotAsImageFormat format = formats.get(i);
if (format.getExtension().equals(defaultFormat))
selectedIndex = i;
imageFormatListBox_.addItem(format.getName(), format.getExtension());
}
imageFormatListBox_.setSelectedIndex(selectedIndex);
imageFormatListBox_.setStylePrimaryName(styles.imageFormatListBox());
grid.setWidget(0, 1, imageFormatListBox_);