/** * Renders a title for a layer (to be put on top of the layer legend). * * @param legend FeatureType representing the layer * @param w width for the image (hint) * @param h height for the image (hint) * @param transparent (should the image be transparent) * @param request GetLegendGraphicRequest being built * @return image with the title */ private RenderedImage getLayerTitle( LegendRequest legend, int w, int h, boolean transparent, GetLegendGraphicRequest request) { String title = legend.getTitle(); final BufferedImage image = ImageUtils.createImage(w, h, (IndexColorModel) null, transparent); return LegendMerger.getRenderedLabel(image, title, request); }
/** * Renders a title for a layer (to be put on top of the layer legend). * * @param legend FeatureType representing the layer * @param w width for the image (hint) * @param h height for the image (hint) * @param transparent (should the image be transparent) * @param request GetLegendGraphicRequest being built * @return image with the title */ private RenderedImage getLayerTitle( LegendRequest legend, int w, int h, boolean transparent, GetLegendGraphicRequest request) { String title = legend.getTitle(); final BufferedImage image = ImageUtils.createImage(w, h, (IndexColorModel) null, transparent); return LegendMerger.getRenderedLabel(image, title, request); }
/** * Layer title. * * @param featureTypeName * @return Title of layer (if provided) * @deprecated Use getLegendRequest(name).getTitle(); */ public String getTitle(Name featureTypeName) { return getLegend(featureTypeName).getTitle(); }