for (RenderingIntent intent : intents) {
renderingIntent.addItem(intent);
}
int code = options.renderingIntent.getValue();
boolean bpc = options.blackPointCompensation.getValue();
RenderingIntent intent = convertIntToRenderingIntent(code, bpc);
renderingIntent.setSelectedItem(intent);
renderingIntent.addItemListener(
new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
WidePopupComboBox combo =
(WidePopupComboBox) e.getSource();
RenderingIntent intent =
(RenderingIntent) combo.getSelectedItem();
int code = convertRenderingIntentToInt(intent);
boolean bpc = convertRenderingIntentToBPC(intent);
options.renderingIntent.setValue(code);
options.blackPointCompensation.setValue(bpc);