RasterImageLayerType extends ImageLayer.Type { @Override public PropertySet createLayerConfig(LayerContext ctx) { final PropertySet template = super.createLayerConfig(ctx); template.addProperty(Property.create(PROPERTY_NAME_RASTER, RasterDataNode.class)); template.getDescriptor(PROPERTY_NAME_RASTER).setItemAlias("raster"); template.getDescriptor(PROPERTY_NAME_RASTER).setNotNull(true); return template; }  @Override ImageLayer createLayer(LayerContext ctx, PropertySet configuration); @Override PropertySet createLayerConfig(LayerContext ctx); Layer createLayer(RasterDataNode raster, MultiLevelSource multiLevelSource); static final String PROPERTY_NAME_RASTER; }
@Test public void testDefaultConfiguration() { final LayerType layerType = getLayerType(); final PropertySet template = layerType.createLayerConfig(null); assertNotNull(template); ensurePropertyIsDeclaredButNotDefined(template, "raster", RasterDataNode.class); ensurePropertyIsDefined(template, "borderShown", Boolean.class); ensurePropertyIsDefined(template, "borderWidth", Double.class); ensurePropertyIsDefined(template, "borderColor", Color.class); }