encodingList.add(it.next());
}
ILabelProvider labelProvider = new EncodingLabelProvider();
ComboDescriptor encodingDescriptor = new ComboDescriptor(encodingList,
labelProvider);
comboDescriptors.put(PolicyModel.ENCODING, encodingDescriptor);
// rendering
List renderingList = new ArrayList(2);
renderingList.add(ImageRendering.COLOR);
renderingList.add(ImageRendering.GRAYSCALE);
ILabelProvider renderingLabelProvider = new LabelProvider() {
public String getText(Object o) {
String renderingType = "unknown";
if (o == ImageRendering.COLOR) {
renderingType = "color";
} else if (o == ImageRendering.GRAYSCALE) {
renderingType = "grayscale";
}
return EditorMessages.getString(
"ImageRendering." + renderingType + ".label");
}
};
ComboDescriptor renderingDescriptor = new ComboDescriptor(renderingList,
renderingLabelProvider);
comboDescriptors.put(PolicyModel.RENDERING, renderingDescriptor);
// conversionMode
List conversionmodeList = new ArrayList(2);
conversionmodeList.add(ImageConversionMode.ALWAYS_CONVERT);
conversionmodeList.add(ImageConversionMode.NEVER_CONVERT);
ILabelProvider conversionmodeLabelProvider = new LabelProvider() {
public String getText(Object o) {
String conversionModeType = "unknown";
if (o == ImageConversionMode.ALWAYS_CONVERT) {
conversionModeType = "always";
} else if (o == ImageConversionMode.NEVER_CONVERT) {
conversionModeType = "never";
}
return EditorMessages.getString(
"ImageConversionMode." + conversionModeType + ".label");
}
};
ComboDescriptor conversionModeDescriptor = new ComboDescriptor(
conversionmodeList, conversionmodeLabelProvider);
comboDescriptors.put(PolicyModel.CONVERSION_MODE,
conversionModeDescriptor);