Package org.locationtech.udig.project.internal

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


    private BoxPart owner;
    private StyleBlackboard original;

    public Command getCommand() {
        final StyleBlackboard originalStyleBlackboard = this.original;
        this.original = null;
       
        final Layer layer = getSelectedLayer();
        final StyleBlackboard newBlackboard = layer.getStyleBlackboard();
       
        return new Command(){
            @Override
            public String getLabel() {
                return "Change Style";
View Full Code Here


        parent.setLayout(gridLayout);

        if (editorSupported) {
            colorRulesEditor = new CoverageColorEditor(parent, SWT.NONE);

            StyleBlackboard styleBlackboard = layer.getStyleBlackboard();

            Style style = (Style) styleBlackboard.get(SLDContent.ID);
            if (style == null) {
                style = createDefaultStyle();

                // put style back on blackboard
                styleBlackboard.put(SLDContent.ID, style);
                styleBlackboard.setSelected(new String[]{SLDContent.ID});
            }
            style.setName(layer.getName());
            ArrayList<CoverageRule> listOfRules = new ArrayList<CoverageRule>();
            // Rule ruleToUpdate = SLDs.getRasterSymbolizerRule(style);
            RasterSymbolizer rasterSymbolizer = SLDs.rasterSymbolizer(style);
View Full Code Here

                Style newStyle = SLD.wrapSymbolizers(rasterSym);
                Layer selLayer = getSelectedLayer();
                newStyle.setName(selLayer.getName());

                StyleBlackboard styleBlackboard = layer.getStyleBlackboard();

                // put style back on blackboard
                styleBlackboard.put(SLDContent.ID, newStyle);
                styleBlackboard.setSelected(new String[]{SLDContent.ID});
            }
        } catch (Exception e) {
            e.printStackTrace();
            String message = Messages.CoverageStyleEditorPage_2;
            ExceptionDetailsDialog.openError(null, message, IStatus.ERROR, StylePlugin.PLUGIN_ID, e);
View Full Code Here

            }
          }
         
          if (fstyle != null) {
            fstyle.setName(type.getName().getLocalPart());
            StyleBlackboard styleBlackboard = (StyleBlackboard) layer.getStyleBlackboard();
                    styleBlackboard.put(SLDContent.ID, style);
              styleBlackboard.setSelected(new String[]{SLDContent.ID});

//            //force a rerender, TODO: blackboard events
//            layer.getMap().getRenderManager().refresh(
//              layer, resource.getInfo(m).getBounds() 
//            );
View Full Code Here

        noFeatureLabel.setText(Messages.SimplePointEditorPage_0);

        StyleLayer layer = getSelectedLayer();
        IGeoResource resource = layer.getGeoResource();
        if (resource.canResolve(FeatureSource.class)) {
            StyleBlackboard styleBlackboard = layer.getStyleBlackboard();
            oldStyle = (Style) styleBlackboard.get(SLDContent.ID);
            if (oldStyle == null) {
                oldStyle = Utilities.createDefaultPointStyle();
            }
           
            DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
View Full Code Here

       
        newStyle.setName(layer.getName());

        setStyle(newStyle);

        StyleBlackboard styleBlackboard = layer.getStyleBlackboard();
        styleBlackboard.put(SLDContent.ID, newStyle);
    }
View Full Code Here

        IGeoResource resource = layer.getGeoResource();
        if (!resource.canResolve(FeatureSource.class)) {
            return;
        }

        StyleBlackboard styleBlackboard = layer.getStyleBlackboard();
        oldStyle = (Style) styleBlackboard.get(SLDContent.ID);
        if (oldStyle == null) {
            oldStyle = Utilities.createDefaultPointStyle();
        }
        DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
        dsv.visit(oldStyle);
View Full Code Here

        return applyCurrentStyle();
    }

    private boolean applyCurrentStyle() {

        StyleBlackboard styleBlackboard = getSelectedLayer().getStyleBlackboard();

        if (colorMaskButton.getSelection()) {
            Color maskColor = maskColorEditor.getColor();
            String colorStr = maskColor.getRed() + ":" + maskColor.getGreen() + ":" + maskColor.getBlue(); //$NON-NLS-1$ //$NON-NLS-2$
            styleBlackboard.putString(COVERAGE_COLORMASK_ID, colorStr);
        } else {
            styleBlackboard.remove(COVERAGE_COLORMASK_ID);
        }
        return true;
    }
View Full Code Here

        noFeatureLabel.setText(Messages.SimplePolygonEditorPage_0);

        StyleLayer layer = getSelectedLayer();
        IGeoResource resource = layer.getGeoResource();
        if (resource.canResolve(FeatureSource.class)) {
            StyleBlackboard styleBlackboard = layer.getStyleBlackboard();
            style = (Style) styleBlackboard.get(SLDContent.ID);
            if (style == null) {
                style = Utilities.createDefaultPolygonStyle();
            }
           
            DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
View Full Code Here

       
        newStyle.setName(layer.getName());

        setStyle(newStyle);

        StyleBlackboard styleBlackboard = layer.getStyleBlackboard();
        styleBlackboard.put(SLDContent.ID, newStyle);
    }
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.