Package org.locationtech.udig.project.internal

Examples of org.locationtech.udig.project.internal.StyleBlackboard


    /**
     * Extract symbolizer parameters from the style blackboard
     */
    public static GridCoverageRenderState getRenderState( IRenderContext context ) {
        StyleBlackboard styleBlackboard = (StyleBlackboard) context.getLayer().getStyleBlackboard();
        Style style = (Style) styleBlackboard.lookup(Style.class);
        double minScale = Double.MIN_VALUE;
        double maxScale = Double.MAX_VALUE;
        float opacity = 1.0f;
        if (style != null) {
            try {
View Full Code Here


                Layer layer;
                double minScale = 0;
                double maxScale = Double.MAX_VALUE;
                layer = ilayer.getResource(org.geotools.data.ows.Layer.class, null);
                // check if there are min/max scale rules
                StyleBlackboard sb = (StyleBlackboard) ilayer.getStyleBlackboard();
                Style style = (Style) sb.lookup(Style.class);
                if (style != null) {
                    Rule rule = style.getFeatureTypeStyles()[0].getRules()[0];
                    minScale = rule.getMinScaleDenominator();
                    maxScale = rule.getMaxScaleDenominator();
                }
View Full Code Here

    /**
     *  grab the style from the blackboard, otherwise return null
     */
    private Style grabStyle() {
        // check for style information on the blackboard
        StyleBlackboard styleBlackboard = (StyleBlackboard) getContext()
                .getLayer().getStyleBlackboard();
       
        Style style = (Style) styleBlackboard.lookup(Style.class);
       
        return style;
    }
View Full Code Here

    /**
     * Extract symbolizer parameters from the style blackboard
     */
    public static GridCoverageRenderState getRenderState( IRenderContext context ) {
        StyleBlackboard styleBlackboard = (StyleBlackboard) context.getLayer().getStyleBlackboard();
        Style style = (Style) styleBlackboard.lookup(Style.class);
        double minScale = Double.MIN_VALUE;
        double maxScale = Double.MAX_VALUE;
        float opacity = 1.0f;
        if (style != null) {
            try {
View Full Code Here

        ColorMap colorMap = getCurrentSelection().getColorMap();
        rasterSym.setColorMap(colorMap);

        Style newStyle = SLD.wrapSymbolizers(rasterSym);
        newStyle.setName(((Layer)getSelectedLayer()).getName() );
        StyleBlackboard styleBlackboard = getSelectedLayer().getStyleBlackboard();

        // put style back on blackboard
        styleBlackboard.put(SLDContent.ID, newStyle);
        styleBlackboard.setSelected(new String[]{SLDContent.ID});
       
        Object x = ((IStructuredSelection)cmbPalette.getSelection()).getFirstElement();
        if (x instanceof BrewerPalette){
          BrewerPalette palette = (BrewerPalette) x;
          if (palette != null){
            styleBlackboard.put("org.locationtech.udig.style.raster.palette", palette.getName()); //$NON-NLS-1$
          }
        }else if (x instanceof PredefinedColorRule){
          styleBlackboard.put("org.locationtech.udig.style.raster.palette", ((PredefinedColorRule) x).getName()); //$NON-NLS-1$
        }
 
  }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.internal.StyleBlackboard

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.