use of com.revolsys.swing.field.PercentSlider in project com.revolsys.open by revolsys.
the class GriddedElevationModelStylePanel method newField.
@Override
protected Field newField(final String fieldName, final Class<?> fieldClass, final Object value) {
if ("opacity".equals(fieldName)) {
final PercentSlider opacityField = new PercentSlider("opacity", (float) value);
Property.addListener(opacityField, this);
opacityField.setMaximumSize(new Dimension(100, 25));
return opacityField;
} else if ("gradient".equals(fieldName)) {
final ColorGradientField field = new ColorGradientField((ColorGradientGriddedElevationModelRasterizer) this.rasterizer);
Property.addListener(field, this);
return field;
} else {
return super.newField(fieldName, fieldClass, value);
}
}
Aggregations