numColorsField = new TextField(Integer.toString(numColors), 6);
numColorsField.addKeyListener(this);
panel.add(numColorsField);
panel.add(new Label(strings.get(Strings.OUTPUT_COLOR_TYPE)));
outputColorType = new Choice();
outputColorType.add(strings.get(Strings.OUTPUT_COLOR_TYPE_PALETTED));
outputColorType.add(strings.get(Strings.OUTPUT_COLOR_TYPE_RGB));
outputColorType.select(paletted ? 0 : 1);
panel.add(outputColorType);
panel.add(new Label(strings.get(Strings.METHOD_REPR_COLOR)));
reprColorMethod = new Choice();
for (int i = 0; i < METHODS[0].length; i++)
{
reprColorMethod.add(strings.get(METHODS[1][i]));
if (representativeColorMethod == METHODS[0][i])
{
reprColorMethod.select(i);
}
}
panel.add(reprColorMethod);
panel.add(new Label(strings.get(Strings.OUTPUT_QUALITY_IMPROVEMENT_ALGORITHM)));
algorithms = new Choice();
algorithms.add(strings.get(Strings.ALGORITHMS_NONE));
algorithms.add(strings.get(Strings.ERROR_DIFFUSION));
algorithms.add(strings.get(Strings.CONTOUR_REMOVAL));
algorithms.select(1);
algorithms.addItemListener(this);
panel.add(algorithms);
panel.add(new Label(strings.get(Strings.ERROR_DIFFUSION)));
errorDiffusion = new Choice();
for (int i = 0; i < ERROR_DIFFUSION_STRINGS.length; i++)
{
errorDiffusion.add(strings.get(ERROR_DIFFUSION_STRINGS[i]));
}
errorDiffusion.select(0);