transparency.add(NumberValidator.range(0, 100));
form.add(transparency);
form.add(new DropDownChoice("watermark.position", Arrays.asList(Position.values()), new WatermarkPositionRenderer()));
// svg
PropertyModel metadataModel = new PropertyModel(info, "metadata");
form.add(new CheckBox("svg.antialias", new MapModel(metadataModel, "svgAntiAlias")));
form.add(new DropDownChoice("svg.producer", new MapModel(metadataModel, "svgRenderer"), SVG_RENDERERS, new SVGMethodRenderer()));
// png compression levels
MapModel pngCompression = defaultedModel(metadataModel, WMS.PNG_COMPRESSION, WMS.PNG_COMPRESSION_DEFAULT);
TextField pngCompressionField = new TextField("png.compression", pngCompression, Integer.class);
pngCompressionField.add(new NumberValidator.RangeValidator(0, 100));
form.add(pngCompressionField);
// jpeg compression levels
MapModel jpegCompression = defaultedModel(metadataModel, WMS.JPEG_COMPRESSION, WMS.JPEG_COMPRESSION_DEFAULT);
TextField jpegCompressionField = new TextField("jpeg.compression", jpegCompression, Integer.class);
form.add(jpegCompressionField);
// kml handling
MapModel kmlReflectorMode = defaultedModel(metadataModel, WMS.KML_REFLECTOR_MODE, WMS.KML_REFLECTOR_MODE_DEFAULT);
form.add(new DropDownChoice("kml.defaultReflectorMode", kmlReflectorMode, KML_REFLECTOR_MODES));
MapModel kmlSuperoverlayMode = defaultedModel(metadataModel, WMS.KML_SUPEROVERLAY_MODE, WMS.KML_SUPEROVERLAY_MODE_DEFAULT);
form.add(new DropDownChoice("kml.superoverlayMode", kmlSuperoverlayMode, KML_SUPEROVERLAY_MODES));
form.add(new CheckBox("kml.kmattr", defaultedModel(metadataModel, WMS.KML_KMLATTR, WMS.KML_KMLATTR_DEFAULT)));
form.add(new CheckBox("kml.kmlplacemark", defaultedModel(metadataModel, WMS.KML_KMLPLACEMARK, WMS.KML_KMLPLACEMARK_DEFAULT)));
MapModel kmScore = defaultedModel(metadataModel, WMS.KML_KMSCORE, WMS.KML_KMSCORE_DEFAULT);
TextField kmScoreField = new TextField("kml.kmscore", kmScore, Integer.class);
kmScoreField.add(new NumberValidator.RangeValidator(0, 100));
form.add(kmScoreField);
}