setLayout(new BorderLayout());
// Initialize all the image type filters:
for (ExportComboItem filter : filters) {
ImageExportOptions filterOptions = filter.getExportOptions();
ImageType filterType = filterOptions.getImageType();
if (defaultType.equals(filterType)) {
// For the default filter, use the default options:
filter = new ExportComboItem(options);
defaultItem = filter;
}
}
// Add the default filter first, so that other filters will inherit
// its settings according to ExportLogic.mergeExportOptions().
if (defaultItem != null) {
combo.addItem(defaultItem);
}
for (ExportComboItem filter : filters) {
ImageExportOptions filterOptions = filter.getExportOptions();
ImageType filterType = filterOptions.getImageType();
if (! defaultType.equals(filterType)) {
combo.addItem(filter);
}
}
if (defaultItem != null) {