Examples of DuplicatingStyleVisitor


Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

            oldStyle = (Style) styleBlackboard.get(SLDContent.ID);
            if (oldStyle == null) {
                oldStyle = Utilities.createDefaultPointStyle();
            }
           
            DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
            dsv.visit(oldStyle);
            style = (Style) dsv.getCopy();
           
            if (isPointStyle(style)) {
                propertiesEditor = new PointPropertiesEditor(layer);
                propertiesEditor.open(mainComposite, style);
                stackLayout.topControl = propertiesEditor.getControl();
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

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

        if (!isPointStyle(style)) {
            stackLayout.topControl = noFeatureLabel;
        } else {
            stackLayout.topControl = propertiesEditor.getControl();
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

            style = (Style) styleBlackboard.get(SLDContent.ID);
            if (style == null) {
                style = Utilities.createDefaultPolygonStyle();
            }
           
            DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
            dsv.visit(style);
            oldStyleCopy = (Style) dsv.getCopy();

            if (isPolygonStyle(style)) {
                propertiesEditor = new PolygonPropertiesEditor(layer);
                propertiesEditor.open(mainComposite, style);
                stackLayout.topControl = propertiesEditor.getControl();
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

        StyleBlackboard styleBlackboard = layer.getStyleBlackboard();
        style = (Style) styleBlackboard.get(SLDContent.ID);
        if (style == null) {
            style = Utilities.createDefaultPolygonStyle();
        }
        DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
        dsv.visit(style);
        oldStyleCopy = (Style) dsv.getCopy();

        if (!isPolygonStyle(style)) {
            stackLayout.topControl = noFeatureLabel;
        } else {
            stackLayout.topControl = propertiesEditor.getControl();
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

            oldStyle = (Style) styleBlackboard.get(SLDContent.ID);
            if (oldStyle == null) {
                oldStyle = Utilities.createDefaultLineStyle();
            }
           
            DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
            dsv.visit(oldStyle);
            style = (Style) dsv.getCopy();

            if (isLineStyle(style)) {
                linesEditor = new LinePropertiesEditor(layer);
                linesEditor.open(mainComposite, style);
                stackLayout.topControl = linesEditor.getControl();
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

        oldStyle = (Style) styleBlackboard.get(SLDContent.ID);
        if (oldStyle == null) {
            oldStyle = Utilities.createDefaultLineStyle();
        }
       
        DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
        dsv.visit(oldStyle);
        style = (Style) dsv.getCopy();

        if (!isLineStyle(style)) {
            stackLayout.topControl = noFeatureLabel;
        } else {
            if (linesEditor==null) {
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

     * @param width the image width.
     * @param height the image height.
     * @return the generated image.
     */
    public static BufferedImage pointRuleToImage( final Rule rule, int width, int height ) {
        DuplicatingStyleVisitor copyStyle = new DuplicatingStyleVisitor();
        rule.accept(copyStyle);
        Rule newRule = (Rule) copyStyle.getCopy();

        int pointSize = 0;
        Stroke stroke = null;
        Symbolizer[] symbolizers = newRule.getSymbolizers();
        if (symbolizers.length > 0) {
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

     * @param width the image width.
     * @param height the image height.
     * @return the generated image.
     */
    public static BufferedImage polygonRuleToImage( final Rule rule, int width, int height ) {
        DuplicatingStyleVisitor copyStyle = new DuplicatingStyleVisitor();
        rule.accept(copyStyle);
        Rule newRule = (Rule) copyStyle.getCopy();

        Stroke stroke = null;
        Symbolizer[] symbolizers = newRule.getSymbolizers();
        if (symbolizers.length > 0) {
            Symbolizer symbolizer = symbolizers[0];
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

     * @param width the image width.
     * @param height the image height.
     * @return the generated image.
     */
    public static BufferedImage lineRuleToImage( final Rule rule, int width, int height ) {
        DuplicatingStyleVisitor copyStyle = new DuplicatingStyleVisitor();
        rule.accept(copyStyle);
        Rule newRule = (Rule) copyStyle.getCopy();

        Stroke stroke = null;
        Symbolizer[] symbolizers = newRule.getSymbolizers();
        if (symbolizers.length > 0) {
            Symbolizer symbolizer = newRule.getSymbolizers()[0];
View Full Code Here

Examples of org.geotools.styling.visitor.DuplicatingStyleVisitor

            IProgressMonitor m ) throws IOException {
       
        if( resource.canResolve(Style.class)){
            Style style = resource.resolve( Style.class, null);
            if( style != null ){
                DuplicatingStyleVisitor v = new DuplicatingStyleVisitor();
                style.accept(v);
                return v.getCopy();
            }
        }
       
        if( resource.canResolve(FeatureSource.class) ){
            SimpleFeatureSource featureSource = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.