Revision 45526

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/CharacterMarkerSymbol.java
818 818
		}
819 819
	}
820 820

  
821

  
822 821
	/**
823 822
	 * Class to be used for the methods that control the visual correction of a character.
824 823
	 * This visual correction has the responsibility of modify the dimensions of the
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.geometry/org.gvsig.expressionevaluator.geometry.lib/org.gvsig.expressionevaluator.geometry.lib.api/src/main/java/org/gvsig/expressionevaluator/GeometryExpressionEvaluatorLibrary.java
16 16
        require(ToolsLibrary.class);
17 17
        require(ProjectionLibrary.class);
18 18
        require(GeometryLibrary.class);
19
        require(ExpressionEvaluatorLibrary.class);
19 20
    }
20 21

  
21 22
    @Override
......
24 25

  
25 26
    @Override
26 27
    protected void doPostInitialize() throws LibraryException {
27
        DataTypesManager dataTypesManager = ToolsLocator.getDataTypesManager();
28
        dataTypesManager.addtype(DataTypes.EXPRESSION, "Expression", "Expression",
29
            Expression.class, null);
28
//        DataTypesManager dataTypesManager = ToolsLocator.getDataTypesManager();
29
//        dataTypesManager.addtype(DataTypes.EXPRESSION, "Expression", "Expression",
30
//            Expression.class, null);
30 31

  
31 32
    }
32 33
}
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/IPictureMarkerSymbol.java
23 23
 */
24 24
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker;
25 25

  
26
import java.awt.Color;
26 27
import java.io.IOException;
27 28
import java.net.URL;
29
import org.gvsig.fmap.dal.feature.Feature;
28 30

  
29
public interface IPictureMarkerSymbol extends IMarkerSymbol{
31
public interface IPictureMarkerSymbol extends IMarkerSymbol {
30 32

  
31
	/**
32
	 * Sets the file for the image to be used as a marker symbol
33
	 * 
34
	 * @param imageFile
35
	 *            , File
36
	 * @throws IOException
37
	 */
38
	public abstract void setImage(URL imageUrl) throws IOException;
33
    /**
34
     * Sets the file for the image to be used as a marker symbol
35
     *
36
     * @param imageFile , File
37
     * @throws IOException
38
     */
39
    public abstract void setImage(URL imageUrl) throws IOException;
39 40

  
40
	/**
41
	 * Sets the file for the image to be used as a marker symbol (when it is
42
	 * selected in the map)
43
	 * 
44
	 * @param imageFile
45
	 *            , File
46
	 * @throws IOException
47
	 */
48
	public abstract void setSelImage(URL imageFileUrl) throws IOException;
41
    /**
42
     * Sets the file for the image to be used as a marker symbol (when it is
43
     * selected in the map)
44
     *
45
     * @param imageFile , File
46
     * @throws IOException
47
     */
48
    public abstract void setSelImage(URL imageFileUrl) throws IOException;
49 49

  
50
	// public void print(Graphics2D g, AffineTransform at, FShape shape)
51
	// throws ReadDriverException {
52
	// // TODO Implement it
53
	// throw new Error("Not yet implemented!");
54
	//
55
	// }
56
	/**
57
	 * Returns the URL of the image that is used as a marker symbol
58
	 * @return imagePath,URL
59
	 */
60
	public abstract URL getSource();
50
    // public void print(Graphics2D g, AffineTransform at, FShape shape)
51
    // throws ReadDriverException {
52
    // // TODO Implement it
53
    // throw new Error("Not yet implemented!");
54
    //
55
    // }
56
    /**
57
     * Returns the URL of the image that is used as a marker symbol
58
     *
59
     * @return imagePath,URL
60
     */
61
    public abstract URL getSource();
61 62

  
62
	/**
63
	 * Returns the URL of the image that is used as a marker symbol (when it
64
	 is selected in the map)
65
	 * @return selimagePath,URL
66
	 */
67
	public abstract URL getSelectedSource();
63
    /**
64
     * Returns the URL of the image that is used as a marker symbol (when it is
65
     * selected in the map)
66
     *
67
     * @return selimagePath,URL
68
     */
69
    public abstract URL getSelectedSource();
68 70

  
69
}
71
    public String getOffsetXExpression();
72

  
73
    public void setOffsetXExpression(String offsetXExpression);
74

  
75
    public String getOffsetYExpression();
76

  
77
    public void setOffsetYExpression(String offsetYExpression);
78

  
79
    public String getRotationExpression();
80

  
81
    public void setRotationExpression(String rotationExpression);
82

  
83
    public Color getLineToOffsetColor();
84

  
85
    public Color getLineToOffsetColor(Feature f);
86

  
87
    public String getLineToOffsetColorExpression();
88

  
89
    public void setLineToOffsetColorExpression(String lineToOffsetColorExpression);
90

  
91
    public void setLineToOffsetColor(Color lineToOffsetColor);
92

  
93
    public boolean isDrawLineToOffset();
94

  
95
    public boolean isDrawLineToOffset(Feature f);
96

  
97
    public void setDrawLineToOffset(boolean drawLineToOffset);
98

  
99
}
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/IMarkerSymbol.java
25 25

  
26 26
import java.awt.Color;
27 27
import java.awt.geom.Point2D;
28

  
28
import org.gvsig.fmap.dal.feature.Feature;
29 29
import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport;
30 30
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
31 31
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask;
32 32

  
33 33
/**
34
 * Represents an ISymbol that draws a <b>marker symbol</b>.It has the different methods to obtain or
35
 * define the attributes of a marker such as rotation, offset, size, color and
36
 * IMask.
34
 * Represents an ISymbol that draws a <b>marker symbol</b>.It has the different
35
 * methods to obtain or define the attributes of a marker such as rotation,
36
 * offset, size, color and IMask.
37 37
 *
38
 * @author   jaume dominguez faus - jaume.dominguez@iver.es
38
 * @author jaume dominguez faus - jaume.dominguez@iver.es
39 39
 */
40 40
public interface IMarkerSymbol extends ISymbol, CartographicSupport {
41 41

  
42
	public static final String SYMBOL_NAME = "marker";
42
    public static final String SYMBOL_NAME = "marker";
43 43

  
44
	public static final int CIRCLE_STYLE = 0;
45
	public static final int SQUARE_STYLE = 1;
46
	public static final int CROSS_STYLE = 2;
47
	public static final int DIAMOND_STYLE = 3;
48
	public static final int X_STYLE = 4;
49
	public static final int TRIANGLE_STYLE = 5;
50
	public static final int STAR_STYLE = 6;
51
	public static final int VERTICAL_LINE_STYLE = 7;
44
    public static final int CIRCLE_STYLE = 0;
45
    public static final int SQUARE_STYLE = 1;
46
    public static final int CROSS_STYLE = 2;
47
    public static final int DIAMOND_STYLE = 3;
48
    public static final int X_STYLE = 4;
49
    public static final int TRIANGLE_STYLE = 5;
50
    public static final int STAR_STYLE = 6;
51
    public static final int VERTICAL_LINE_STYLE = 7;
52 52

  
53
	/**
54
	 * Returns the rotation (in radians, counter-clockwise) of the marker symbol
55
	 * @return double (rotation)
56
	 */
57
	public abstract double getRotation();
58
	/**
59
	 * Sets the rotation of the marker symbol
60
	 * @param rotation
61
	 */
62
	public abstract void setRotation(double rotation);
63
	/**
64
	 * Gets the offset for a marker symbol
65
	 * @return Point2D
66
	 */
67
	public abstract Point2D getOffset();
68
	/**
69
	 * Establishes the offset currently set for the marker symbol.
70
	 * @param offset
71
	 */
72
	public abstract void setOffset(Point2D offset);
73
	/**
74
	 * Obtains the size of a marker symbol
75
	 *
76
	 */
77
	public abstract double getSize();
78
	/**
79
	 * Sets the size of marker symbol
80
	 * @param size
81
	 */
82
	public abstract void setSize(double size);
53
    /**
54
     * Returns the rotation (in radians, counter-clockwise) of the marker symbol
55
     *
56
     * @return double (rotation)
57
     */
58
    public abstract double getRotation();
83 59

  
84
	/**
85
	 * Returns the color of the marker symbol.
86
	 * @return Color
87
	 */
88
	public abstract Color getColor();
60
    /**
61
     * Sets the rotation of the marker symbol
62
     *
63
     * @param rotation
64
     */
65
    public abstract void setRotation(double rotation);
89 66

  
90
	/**
91
	 * Establishes a color for the marker symbol
92
	 * @param color
93
	 */
94
	public abstract void setColor(Color color);
67
    /**
68
     * Gets the offset for a marker symbol
69
     *
70
     * @return Point2D
71
     */
72
    public abstract Point2D getOffset();
95 73

  
96
	/**
97
	 * Defines the transparency of a line symbol.
98
	 *
99
	 * @param outlineAlpha
100
	 *            , the transparency
101
	 */
102
	void setAlpha(int alpha);
74
    /**
75
     * Establishes the offset currently set for the marker symbol.
76
     *
77
     * @param offset
78
     */
79
    public abstract void setOffset(Point2D offset);
103 80

  
104
	/**
105
	 *
106
	 * @return the mask of the symbol
107
	 */
108
	public abstract IMask getMask();
109
	/**
110
	 * Defines a mask for the symbol
111
	 * @param mask,IMask
112
	 */
113
	public abstract void setMask(IMask mask);
81
    /**
82
     * Obtains the size of a marker symbol
83
     *
84
     * @return 
85
     */
86
    public abstract double getSize();
114 87

  
115
}
88
    /**
89
     * Sets the size of marker symbol
90
     *
91
     * @param size
92
     */
93
    public abstract void setSize(double size);
94

  
95
    /**
96
     * Returns the color of the marker symbol.
97
     *
98
     * @return Color
99
     */
100
    public abstract Color getColor();
101

  
102
    /**
103
     * Establishes a color for the marker symbol
104
     *
105
     * @param color
106
     */
107
    public abstract void setColor(Color color);
108

  
109
    /**
110
     * Defines the transparency of a line symbol.
111
     *
112
     * @param outlineAlpha , the transparency
113
     */
114
    void setAlpha(int alpha);
115

  
116
    /**
117
     *
118
     * @return the mask of the symbol
119
     */
120
    public abstract IMask getMask();
121

  
122
    /**
123
     * Defines a mask for the symbol
124
     *
125
     * @param mask,IMask
126
     */
127
    public abstract void setMask(IMask mask);
128

  
129

  
130

  
131
}
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/MultiShapeSymbol.java
28 28
import java.awt.Rectangle;
29 29
import java.awt.geom.AffineTransform;
30 30
import java.awt.geom.Point2D;
31

  
32
import org.slf4j.Logger;
33
import org.slf4j.LoggerFactory;
34

  
35 31
import org.gvsig.compat.print.PrintAttributes;
36 32
import org.gvsig.fmap.dal.feature.Feature;
37 33
import org.gvsig.fmap.geom.Geometry;
......
56 52
import org.gvsig.tools.persistence.exception.PersistenceException;
57 53
import org.gvsig.tools.task.Cancellable;
58 54
import org.gvsig.tools.util.Callable;
55
import org.slf4j.Logger;
56
import org.slf4j.LoggerFactory;
59 57

  
60 58
/**
61 59
 * MultiShapeSymbol class allows to create a composition of several symbols with
......
638 636
		state.set(FIELD_LINE, getLineSymbol());
639 637
	}
640 638

  
639
//    @Override
640
//    public String getOffsetXExpression() {
641
//        return marker.getOffsetXExpression();
642
//    }
643
//
644
//    @Override
645
//    public void setOffsetXExpression(String offsetXExpression) {
646
//        marker.setOffsetXExpression(offsetXExpression);
647
//    }
648
//
649
//    @Override
650
//    public String getOffsetYExpression() {
651
//        return marker.getOffsetYExpression();
652
//    }
653
//
654
//    @Override
655
//    public void setOffsetYExpression(String offsetYExpression) {
656
//        marker.setOffsetYExpression(offsetYExpression);
657
//    }
658
//
659
//    @Override
660
//    public String getRotationExpression() {
661
//        return marker.getRotationExpression();
662
//    }
663
//
664
//    @Override
665
//    public void setRotationExpression(String rotationExpression) {
666
//        marker.setRotationExpression(rotationExpression);
667
//    }
668
//
669
//    @Override
670
//    public Color getLineToOffsetColor() {
671
//        return marker.getLineToOffsetColor();
672
//    }
673
//
674
//    @Override
675
//    public Color getLineToOffsetColor(Feature f) {
676
//        return marker.getLineToOffsetColor(f);
677
//    }
678
//
679
//    @Override
680
//    public String getLineToOffsetColorExpression() {
681
//        return marker.getLineToOffsetColorExpression();
682
//    }
683
//
684
//    @Override
685
//    public void setLineToOffsetColorExpression(String lineToOffsetColorExpression) {
686
//        marker.setLineToOffsetColorExpression(lineToOffsetColorExpression);
687
//    }
688
//
689
//    @Override
690
//    public void setLineToOffsetColor(Color lineToOffsetColor) {
691
//        marker.setLineToOffsetColor(lineToOffsetColor);
692
//    }
693
//
694
//    @Override
695
//    public boolean isDrawLineToOffset() {
696
//        return marker.isDrawLineToOffset();
697
//    }
698
//
699
//    @Override
700
//    public boolean isDrawLineToOffset(Feature f) {
701
//        return marker.isDrawLineToOffset(f);
702
//    }
703
//
704
//    @Override
705
//    public void setDrawLineToOffset(boolean drawLineToOffset) {
706
//        marker.setDrawLineToOffset(drawLineToOffset);
707
//    }
708

  
641 709
	public static class RegisterPersistence implements Callable {
642 710

  
643 711
        @Override
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/impl/AbstractMarkerSymbol.java
30 30
import java.awt.geom.AffineTransform;
31 31
import java.awt.geom.Point2D;
32 32
import org.apache.commons.lang3.StringUtils;
33

  
34 33
import org.gvsig.compat.print.PrintAttributes;
35 34
import org.gvsig.expressionevaluator.ExpressionBuilder;
36 35
import org.gvsig.expressionevaluator.ExpressionUtils;
......
376 375
        setRotation(state.getDouble(FIELD_ROTATION));
377 376
        setSize(state.getDouble(FIELD_SIZE));
378 377

  
379
        setDrawLineToOffset(state.getBoolean(FIELD_DRAWLINETOOFFSET));
378
        setDrawLineToOffset(state.getBoolean(FIELD_DRAWLINETOOFFSET, false));
380 379
        setOffsetXExpression(state.getString(FIELD_OFFSETX_EXPRESSION));
381 380
        setOffsetYExpression(state.getString(FIELD_OFFSETY_EXPRESSION));
382 381
        setRotationExpression(state.getString(FIELD_ROTATION_EXPRESSION));
......
427 426
                definition.addDynFieldObject(FIELD_OFFSET).setMandatory(false).setClassOfValue(Point2D.class);
428 427

  
429 428
                // Rotation
430
                definition.addDynFieldDouble(FIELD_ROTATION).setMandatory(true);
429
                definition.addDynFieldDouble(FIELD_ROTATION).setMandatory(false);
431 430

  
432 431
                // Size
433 432
                definition.addDynFieldDouble(FIELD_SIZE).setMandatory(true);
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/marker/impl/PictureMarkerSymbol.java
32 32
import java.net.URL;
33 33

  
34 34
import org.gvsig.compat.print.PrintAttributes;
35
import org.gvsig.fmap.dal.exception.DataException;
35 36
import org.gvsig.fmap.dal.feature.Feature;
37
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
38
import org.gvsig.fmap.dal.feature.FeatureStore;
39
import org.gvsig.fmap.dal.feature.FeatureType;
36 40
import org.gvsig.fmap.geom.Geometry;
37 41
import org.gvsig.fmap.geom.primitive.Point;
38 42
import org.gvsig.fmap.mapcontext.MapContext;
......
183 187
            g.translate(-(x + xOffset), -(y + yOffset));
184 188
            
185 189
            if( isDrawLineToOffset() ) {
186
                g.setColor(Color.BLACK);
187
                g.drawLine((int)x, (int)y, (int)x + xOffset, (int)y + yOffset);
190
                g.setColor(this.getLineToOffsetColor());
191
                g.drawLine((int)p.getX(), (int)p.getY(), (int)p.getX() + xOffset, (int)p.getY() + yOffset);
188 192
            }
189 193
        }
190 194

  
......
321 325
        }
322 326

  
323 327
    }
328
 
329
    @Override
330
    public String[] getRequiredFeatureAttributeNames(FeatureStore featureStore) throws DataException {
331
        // By default only need the default Geometry
332
        FeatureType ftype = featureStore.getDefaultFeatureTypeQuietly();
333
        String[] res = new String[ftype.size()];
334
        int cont = 0;
335
        for (FeatureAttributeDescriptor attr : ftype) {
336
            res[cont++]=attr.getName();
337
        }
338
        return res;
339
    }
324 340

  
341

  
325 342
}
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/PictureLine.java
24 24
package org.gvsig.app.gui.styling;
25 25

  
26 26
import java.io.IOException;
27
import java.net.URL;
27 28

  
28 29
import org.gvsig.fmap.mapcontext.MapContextLocator;
29 30
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
......
59 60
    public void refreshControls(ISymbol layer) {
60 61
        try {
61 62
            if (layer == null) {
62
                setValues(1d, 0d, 0d, null, null);
63
                setValues(1d, 0d, 0d, null, null); //, sym.getOffsetXExpression(), sym.getOffsetYExpression(), sym.getLineToOffsetColor(), sym.getLineToOffsetColorExpression(), sym.getRotation(), sym.getRotationExpression());
63 64
            } else {
64 65
                IPictureLineSymbol sym = (IPictureLineSymbol) layer;
65
                setValues(
66
                        sym.getLineWidth(), 
66
                setValues(sym.getLineWidth(), 
67 67
                        sym.getXScale(), 
68 68
                        sym.getYScale(), 
69 69
                        sym.getSource(), 
70
                        sym.getSelectedSource()
70
                        sym.getSelectedSource() //, 
71
//                        sym.getOffsetXExpression(), 
72
//                        sym.getOffsetYExpression(), 
73
//                        sym.getLineToOffsetColor(), 
74
//                        sym.getLineToOffsetColorExpression(), 
75
//                        sym.getRotation(), 
76
//                        sym.getRotationExpression()
71 77
                );
72 78
            }
73 79
        } catch (Exception ex) {
......
75 81
        }
76 82
            
77 83
    }
84
    
85
        protected void setValues(
86
            double size, 
87
            double xOffset, 
88
            double yOffset, 
89
            URL picture, 
90
            URL selectedPicture) {
91
        
92
        setSize(size);
93
        setX(xOffset);
94
        setY(yOffset);
95
        
96
        setPicture(picture);
97
        setSelectedPicture(selectedPicture);
98
    }
78 99

  
100

  
79 101
    @Override
80 102
    public ISymbol getLayer() {
81 103
        try {
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/PictureMarkerView.xml
24 24
    </at>
25 25
    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
26 26
   </super>
27
   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/PictureMarkerView.xml</at>
27
   <at name="id">/home/fdiaz/projects/gvSIG/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/PictureMarkerView.xml</at>
28 28
   <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
29 29
   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
30 30
   <at name="components">
......
74 74
             </object>
75 75
            </at>
76 76
            <at name="name">lblLabelFileName</at>
77
            <at name="width">149</at>
77
            <at name="width">119</at>
78 78
            <at name="text">picture_file</at>
79 79
            <at name="fill">
80 80
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
81 81
              <at name="name">fill</at>
82 82
             </object>
83 83
            </at>
84
            <at name="height">15</at>
84
            <at name="height">14</at>
85 85
           </object>
86 86
          </at>
87 87
         </object>
......
134 134
             </object>
135 135
            </at>
136 136
            <at name="name">lblLabelSelFileName</at>
137
            <at name="width">149</at>
137
            <at name="width">119</at>
138 138
            <at name="text">selection_picture_file</at>
139 139
            <at name="fill">
140 140
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
141 141
              <at name="name">fill</at>
142 142
             </object>
143 143
            </at>
144
            <at name="height">15</at>
144
            <at name="height">14</at>
145 145
           </object>
146 146
          </at>
147 147
         </object>
......
194 194
             </object>
195 195
            </at>
196 196
            <at name="name">lblLabelSize</at>
197
            <at name="width">149</at>
197
            <at name="width">119</at>
198 198
            <at name="text">width</at>
199 199
            <at name="fill">
200 200
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
201 201
              <at name="name">fill</at>
202 202
             </object>
203 203
            </at>
204
            <at name="height">15</at>
204
            <at name="height">14</at>
205 205
           </object>
206 206
          </at>
207 207
         </object>
......
254 254
             </object>
255 255
            </at>
256 256
            <at name="name">lblLabelX</at>
257
            <at name="width">149</at>
257
            <at name="width">119</at>
258 258
            <at name="text">x_offset</at>
259 259
            <at name="fill">
260 260
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
261 261
              <at name="name">fill</at>
262 262
             </object>
263 263
            </at>
264
            <at name="height">15</at>
264
            <at name="height">14</at>
265 265
           </object>
266 266
          </at>
267 267
         </object>
......
314 314
             </object>
315 315
            </at>
316 316
            <at name="name">lblLabelY</at>
317
            <at name="width">149</at>
317
            <at name="width">119</at>
318 318
            <at name="text">y_offset</at>
319 319
            <at name="fill">
320 320
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
321 321
              <at name="name">fill</at>
322 322
             </object>
323 323
            </at>
324
            <at name="height">15</at>
324
            <at name="height">14</at>
325 325
           </object>
326 326
          </at>
327 327
         </object>
......
354 354
          <at name="properties">
355 355
           <object classname="com.jeta.forms.store.support.PropertyMap">
356 356
            <at name="name">txtSize</at>
357
            <at name="width">753</at>
357
            <at name="width">1153</at>
358 358
            <at name="height">20</at>
359 359
           </object>
360 360
          </at>
......
388 388
          <at name="properties">
389 389
           <object classname="com.jeta.forms.store.support.PropertyMap">
390 390
            <at name="name">txtX</at>
391
            <at name="width">753</at>
391
            <at name="width">1153</at>
392 392
            <at name="height">20</at>
393 393
           </object>
394 394
          </at>
......
422 422
          <at name="properties">
423 423
           <object classname="com.jeta.forms.store.support.PropertyMap">
424 424
            <at name="name">txtY</at>
425
            <at name="width">753</at>
425
            <at name="width">1153</at>
426 426
            <at name="height">20</at>
427 427
           </object>
428 428
          </at>
......
476 476
             </object>
477 477
            </at>
478 478
            <at name="name">lblLabelXExpression</at>
479
            <at name="width">149</at>
479
            <at name="width">119</at>
480 480
            <at name="text">x_offset_expression</at>
481 481
            <at name="fill">
482 482
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
483 483
              <at name="name">fill</at>
484 484
             </object>
485 485
            </at>
486
            <at name="height">15</at>
486
            <at name="height">14</at>
487 487
           </object>
488 488
          </at>
489 489
         </object>
......
536 536
             </object>
537 537
            </at>
538 538
            <at name="name">lblLabelYExpression</at>
539
            <at name="width">149</at>
540
            <at name="text">x_offset_expression</at>
539
            <at name="width">119</at>
540
            <at name="text">y_offset_expression</at>
541 541
            <at name="fill">
542 542
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
543 543
              <at name="name">fill</at>
544 544
             </object>
545 545
            </at>
546
            <at name="height">15</at>
546
            <at name="height">14</at>
547 547
           </object>
548 548
          </at>
549 549
         </object>
......
596 596
             </object>
597 597
            </at>
598 598
            <at name="name">lblLabelRotationExpression</at>
599
            <at name="width">149</at>
599
            <at name="width">119</at>
600 600
            <at name="text">rotation_expression</at>
601 601
            <at name="fill">
602 602
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
603 603
              <at name="name">fill</at>
604 604
             </object>
605 605
            </at>
606
            <at name="height">15</at>
606
            <at name="height">14</at>
607 607
           </object>
608 608
          </at>
609 609
         </object>
......
656 656
             </object>
657 657
            </at>
658 658
            <at name="name">lblColorLineExpression</at>
659
            <at name="width">149</at>
659
            <at name="width">119</at>
660 660
            <at name="text">color_line</at>
661 661
            <at name="fill">
662 662
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
663 663
              <at name="name">fill</at>
664 664
             </object>
665 665
            </at>
666
            <at name="height">15</at>
666
            <at name="height">14</at>
667 667
           </object>
668 668
          </at>
669 669
         </object>
......
722 722
            <at name="actionCommand">...</at>
723 723
            <at name="opaque">false</at>
724 724
            <at name="name">btnRotationExpression</at>
725
            <at name="width">19</at>
725
            <at name="width">16</at>
726 726
            <at name="text">...</at>
727
            <at name="height">19</at>
727
            <at name="height">18</at>
728 728
           </object>
729 729
          </at>
730 730
         </object>
......
777 777
             </object>
778 778
            </at>
779 779
            <at name="name">txtXOffset</at>
780
            <at name="width">657</at>
781
            <at name="height">19</at>
780
            <at name="width">1072</at>
781
            <at name="height">20</at>
782 782
           </object>
783 783
          </at>
784 784
         </object>
......
831 831
             </object>
832 832
            </at>
833 833
            <at name="name">txtYOffset</at>
834
            <at name="width">657</at>
835
            <at name="height">19</at>
834
            <at name="width">1072</at>
835
            <at name="height">20</at>
836 836
           </object>
837 837
          </at>
838 838
         </object>
......
885 885
             </object>
886 886
            </at>
887 887
            <at name="name">txtRotation</at>
888
            <at name="width">657</at>
889
            <at name="height">19</at>
888
            <at name="width">1072</at>
889
            <at name="height">20</at>
890 890
           </object>
891 891
          </at>
892 892
         </object>
......
945 945
            <at name="actionCommand">...</at>
946 946
            <at name="opaque">false</at>
947 947
            <at name="name">btnYOffsetExpression</at>
948
            <at name="width">19</at>
948
            <at name="width">16</at>
949 949
            <at name="text">...</at>
950
            <at name="height">19</at>
950
            <at name="height">18</at>
951 951
           </object>
952 952
          </at>
953 953
         </object>
......
1006 1006
            <at name="actionCommand">...</at>
1007 1007
            <at name="opaque">false</at>
1008 1008
            <at name="name">btnXOffsetExpression</at>
1009
            <at name="width">19</at>
1009
            <at name="width">16</at>
1010 1010
            <at name="text">...</at>
1011
            <at name="height">19</at>
1011
            <at name="height">18</at>
1012 1012
           </object>
1013 1013
          </at>
1014 1014
         </object>
......
1067 1067
            <at name="actionCommand">...</at>
1068 1068
            <at name="opaque">false</at>
1069 1069
            <at name="name">btnXOffsetExpressionHistory</at>
1070
            <at name="width">19</at>
1070
            <at name="width">16</at>
1071 1071
            <at name="text">...</at>
1072
            <at name="height">19</at>
1072
            <at name="height">18</at>
1073 1073
           </object>
1074 1074
          </at>
1075 1075
         </object>
......
1128 1128
            <at name="actionCommand">...</at>
1129 1129
            <at name="opaque">false</at>
1130 1130
            <at name="name">btnXOffsetExpressionBookmarks</at>
1131
            <at name="width">19</at>
1131
            <at name="width">16</at>
1132 1132
            <at name="text">...</at>
1133
            <at name="height">19</at>
1133
            <at name="height">18</at>
1134 1134
           </object>
1135 1135
          </at>
1136 1136
         </object>
......
1189 1189
            <at name="actionCommand">...</at>
1190 1190
            <at name="opaque">false</at>
1191 1191
            <at name="name">btnYOffsetExpressionHistory</at>
1192
            <at name="width">19</at>
1192
            <at name="width">16</at>
1193 1193
            <at name="text">...</at>
1194
            <at name="height">19</at>
1194
            <at name="height">18</at>
1195 1195
           </object>
1196 1196
          </at>
1197 1197
         </object>
......
1250 1250
            <at name="actionCommand">...</at>
1251 1251
            <at name="opaque">false</at>
1252 1252
            <at name="name">btnYOffsetExpressionBookmarks</at>
1253
            <at name="width">19</at>
1253
            <at name="width">16</at>
1254 1254
            <at name="text">...</at>
1255
            <at name="height">19</at>
1255
            <at name="height">18</at>
1256 1256
           </object>
1257 1257
          </at>
1258 1258
         </object>
......
1311 1311
            <at name="actionCommand">...</at>
1312 1312
            <at name="opaque">false</at>
1313 1313
            <at name="name">btnRotationExpressionHistory</at>
1314
            <at name="width">19</at>
1314
            <at name="width">16</at>
1315 1315
            <at name="text">...</at>
1316
            <at name="height">19</at>
1316
            <at name="height">18</at>
1317 1317
           </object>
1318 1318
          </at>
1319 1319
         </object>
......
1372 1372
            <at name="actionCommand">...</at>
1373 1373
            <at name="opaque">false</at>
1374 1374
            <at name="name">btnRotationExpressionBookmarks</at>
1375
            <at name="width">19</at>
1375
            <at name="width">16</at>
1376 1376
            <at name="text">...</at>
1377
            <at name="height">19</at>
1377
            <at name="height">18</at>
1378 1378
           </object>
1379 1379
          </at>
1380 1380
         </object>
......
1427 1427
             </object>
1428 1428
            </at>
1429 1429
            <at name="name">txtPictureFile</at>
1430
            <at name="width">721</at>
1431
            <at name="height">19</at>
1430
            <at name="width">1126</at>
1431
            <at name="height">20</at>
1432 1432
           </object>
1433 1433
          </at>
1434 1434
         </object>
......
1481 1481
             </object>
1482 1482
            </at>
1483 1483
            <at name="name">txtSelPictureFile</at>
1484
            <at name="width">721</at>
1485
            <at name="height">19</at>
1484
            <at name="width">1126</at>
1485
            <at name="height">20</at>
1486 1486
           </object>
1487 1487
          </at>
1488 1488
         </object>
......
1541 1541
            <at name="actionCommand">...</at>
1542 1542
            <at name="opaque">false</at>
1543 1543
            <at name="name">btnPictureFile</at>
1544
            <at name="width">19</at>
1544
            <at name="width">16</at>
1545 1545
            <at name="text">...</at>
1546
            <at name="height">19</at>
1546
            <at name="height">18</at>
1547 1547
           </object>
1548 1548
          </at>
1549 1549
         </object>
......
1602 1602
            <at name="actionCommand">...</at>
1603 1603
            <at name="opaque">false</at>
1604 1604
            <at name="name">btnSelPictureFile</at>
1605
            <at name="width">19</at>
1605
            <at name="width">16</at>
1606 1606
            <at name="text">...</at>
1607
            <at name="height">19</at>
1607
            <at name="height">18</at>
1608 1608
           </object>
1609 1609
          </at>
1610 1610
         </object>
......
1657 1657
             </object>
1658 1658
            </at>
1659 1659
            <at name="name">lblColorLine</at>
1660
            <at name="width">149</at>
1660
            <at name="width">119</at>
1661 1661
            <at name="text">color_line</at>
1662 1662
            <at name="fill">
1663 1663
             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
1664 1664
              <at name="name">fill</at>
1665 1665
             </object>
1666 1666
            </at>
1667
            <at name="height">15</at>
1667
            <at name="height">14</at>
1668 1668
           </object>
1669 1669
          </at>
1670 1670
         </object>
......
1717 1717
             </object>
1718 1718
            </at>
1719 1719
            <at name="name">txtColorLine</at>
1720
            <at name="width">721</at>
1721
            <at name="height">19</at>
1720
            <at name="width">1126</at>
1721
            <at name="height">20</at>
1722 1722
           </object>
1723 1723
          </at>
1724 1724
         </object>
......
1777 1777
            <at name="actionCommand">...</at>
1778 1778
            <at name="opaque">false</at>
1779 1779
            <at name="name">btnColorLine</at>
1780
            <at name="width">19</at>
1780
            <at name="width">16</at>
1781 1781
            <at name="text">...</at>
1782
            <at name="height">19</at>
1782
            <at name="height">18</at>
1783 1783
           </object>
1784 1784
          </at>
1785 1785
         </object>
......
1833 1833
            </at>
1834 1834
            <at name="actionCommand">Join_the_insertion_point_and_the_offset_with_a_line</at>
1835 1835
            <at name="name">chkDrawLineToOffset</at>
1836
            <at name="width">915</at>
1836
            <at name="width">1283</at>
1837 1837
            <at name="horizontalTextPosition">2</at>
1838 1838
            <at name="text">Join_the_insertion_point_and_the_offset_with_a_line</at>
1839
            <at name="height">17</at>
1839
            <at name="height">16</at>
1840 1840
           </object>
1841 1841
          </at>
1842 1842
         </object>
......
1889 1889
             </object>
1890 1890
            </at>
1891 1891
            <at name="name">lblDynamicValues</at>
1892
            <at name="width">915</at>
1892
            <at name="width">1283</at>
1893 1893
            <at name="text">Valores dinamicos</at>
1894 1894
            <at name="height">15</at>
1895 1895
           </object>
......
1944 1944
             </object>
1945 1945
            </at>
1946 1946
            <at name="name">txtColorLineExp</at>
1947
            <at name="width">657</at>
1948
            <at name="height">19</at>
1947
            <at name="width">1072</at>
1948
            <at name="height">20</at>
1949 1949
           </object>
1950 1950
          </at>
1951 1951
         </object>
......
2004 2004
            <at name="actionCommand">...</at>
2005 2005
            <at name="opaque">false</at>
2006 2006
            <at name="name">btnColorLineExpression</at>
2007
            <at name="width">19</at>
2007
            <at name="width">16</at>
2008 2008
            <at name="text">...</at>
2009
            <at name="height">19</at>
2009
            <at name="height">18</at>
2010 2010
           </object>
2011 2011
          </at>
2012 2012
         </object>
......
2065 2065
            <at name="actionCommand">...</at>
2066 2066
            <at name="opaque">false</at>
2067 2067
            <at name="name">btnColorLineExpressionHistory</at>
2068
            <at name="width">19</at>
2068
            <at name="width">16</at>
2069 2069
            <at name="text">...</at>
2070
            <at name="height">19</at>
2070
            <at name="height">18</at>
2071 2071
           </object>
2072 2072
          </at>
2073 2073
         </object>
......
2126 2126
            <at name="actionCommand">...</at>
2127 2127
            <at name="opaque">false</at>
2128 2128
            <at name="name">btnColorLineExpressionBookmarks</at>
2129
            <at name="width">19</at>
2129
            <at name="width">16</at>
2130 2130
            <at name="text">...</at>
2131
            <at name="height">19</at>
2131
            <at name="height">18</at>
2132 2132
           </object>
2133 2133
          </at>
2134 2134
         </object>
......
2153 2153
         </at>
2154 2154
        </object>
2155 2155
       </at>
2156
       <at name="name"></at>
2156
       <at name="name"/>
2157 2157
       <at name="fill">
2158 2158
        <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
2159 2159
         <at name="name">fill</at>
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolEditor.java
51 51
import org.gvsig.andami.ui.mdiManager.IWindow;
52 52
import org.gvsig.andami.ui.mdiManager.WindowInfo;
53 53
import org.gvsig.app.gui.JComboBoxUnits;
54
import org.gvsig.fmap.dal.feature.Feature;
54 55
import org.gvsig.fmap.dal.feature.FeatureStore;
55 56
import org.gvsig.fmap.geom.Geometry.SUBTYPES;
56 57
import org.gvsig.fmap.geom.GeometryLocator;
......
423 424
	 */
424 425
	private SymbolPreviewer getSymbolPreviewer() {
425 426
		if (symbolPreview == null) {
427
                    if(this.featureStore!= null) {
428
			symbolPreview = new SymbolPreviewer(this.featureStore.getSampleFeature());
429
                    } else {
426 430
			symbolPreview = new SymbolPreviewer();
427
			symbolPreview.setPreferredSize(new Dimension(150, 100));
428

  
431
                    }
432
                    symbolPreview.setPreferredSize(new Dimension(150, 100));
429 433
		}
430 434
		return symbolPreview;
431 435
	}
436
        
432 437
	/**
433 438
	 * Initializes the type and units panel where two Jcomboboxes will be placed
434 439
	 * in order to change the type and the units used in the map.
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/PictureMarker.java
35 35
import javax.swing.JPanel;
36 36
import javax.swing.SpinnerNumberModel;
37 37
import javax.swing.event.ChangeEvent;
38
import javax.swing.event.ChangeListener;
39
import org.gvsig.expressionevaluator.Expression;
38 40
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator;
39 41
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
40 42
import org.gvsig.expressionevaluator.swing.ExpressionPickerController;
......
140 142
        view.txtX.setModel(new SpinnerNumberModel(0, Integer.MIN_VALUE, Integer.MAX_VALUE, 1));
141 143
        view.txtY.setModel(new SpinnerNumberModel(0, Integer.MIN_VALUE, Integer.MAX_VALUE, 1));
142 144

  
143
//        view.txtSize.addActionListener(() -> {fireSymbolChangedEvent();});
144
//        view.txtX.addActionListener(() -> {fireSymbolChangedEvent();});
145
//        view.txtY.addActionListener(() -> {fireSymbolChangedEvent();});
146 145

  
147 146
        this.colorLinePicker = toolsSwingManager.createColorPickerController(view.txtColorLine, view.btnColorLine);
148 147

  
148
        
149 149
        this.xoffsetExpPicker = expressionSwingManager.createExpressionPickerController(
150 150
                view.txtXOffset, 
151 151
                view.btnXOffsetExpression, 
......
170 170
                view.btnColorLineExpressionBookmarks, 
171 171
                view.btnColorLineExpressionHistory
172 172
        );
173
        
174
        view.txtSize.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
175
        view.txtX.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
176
        view.txtY.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
177
        this.colorLinePicker.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
178
        this.xoffsetExpPicker.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
179
        this.yoffsetExpPicker.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
180
        this.rotationExpPicker.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
181
        this.colorExpPicker.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
182
        view.chkDrawLineToOffset.addChangeListener((ChangeEvent e) -> {fireSymbolChangedEvent();});
183
        
173 184
        tabs.add(view);
174 185
    }
175 186

  
......
186 197
                );
187 198
                layer.setSize(getSize());
188 199
                layer.setOffset(new Point2D.Double(getX(),getY()));
200
                layer.setLineToOffsetColor(this.colorLinePicker.get());
201
                if(this.colorExpPicker.get() != null){
202
                    layer.setLineToOffsetColorExpression(getPhrase(this.colorExpPicker.get()));
203
                }
204
                layer.setOffsetXExpression(getPhrase(this.xoffsetExpPicker.get()));
205
                layer.setOffsetYExpression(getPhrase(this.yoffsetExpPicker.get()));
206
                layer.setRotationExpression(getPhrase(this.rotationExpPicker.get()));
207
                layer.setDrawLineToOffset(view.chkDrawLineToOffset.isSelected());
208
                
209
                
189 210
            }
190 211

  
191 212
            return layer;
......
201 222
        }
202 223

  
203 224
    }
225
    
226
    private String getPhrase(Expression expression){
227
        if(expression == null){
228
            return null;
229
        }
230
        return expression.getPhrase();
231
    }
204 232

  
205 233
    @Override
206 234
    public String getName() {
......
216 244
    public void refreshControls(ISymbol layer) {
217 245
        try {
218 246
            if (layer == null) {
219
                setValues(1d, 0d, 0d, null, null);
247
                setValues(1d, 0d, 0d, null, null, "", "", null, "", "", false);
220 248
            } else {
221 249
                IPictureMarkerSymbol sym = (IPictureMarkerSymbol) layer;
222 250
                setValues(
......
224 252
                        sym.getOffset().getX(), 
225 253
                        sym.getOffset().getY(), 
226 254
                        sym.getSource(), 
227
                        sym.getSelectedSource()
255
                        sym.getSelectedSource(),
256
                        sym.getOffsetXExpression(),
257
                        sym.getOffsetYExpression(),
258
                        sym.getLineToOffsetColor(),
259
                        sym.getLineToOffsetColorExpression(),
260
                        sym.getRotationExpression(),
261
                        sym.isDrawLineToOffset()
228 262
                );
229 263
            }
230 264
        } catch (Exception ex) {
......
232 266
        }
233 267
    }
234 268

  
235
    protected void setValues(double size, double xOffset, double yOffset, URL picture, URL selectedPicture) {
269
    protected void setValues(
270
            double size, 
271
            double xOffset, 
272
            double yOffset, 
273
            URL picture, 
274
            URL selectedPicture, 
275
            String offsetXExpression, 
276
            String offsetYExpression, 
277
            Color lineToOffsetColor, 
278
            String lineToOffsetColorExpression, 
279
            String rotationExpression,
280
            boolean isDrawLineToOffset) {
281
        
236 282
        setSize(size);
237 283
        setX(xOffset);
238 284
        setY(yOffset);
239 285
        
240 286
        setPicture(picture);
241 287
        setSelectedPicture(selectedPicture);
288
        
289
        xoffsetExpPicker.coerceAndSet(offsetXExpression);
290
        yoffsetExpPicker.coerceAndSet(offsetYExpression);
291
        rotationExpPicker.coerceAndSet(rotationExpression);
292
        colorLinePicker.coerceAndSet(lineToOffsetColor);
293
        colorExpPicker.coerceAndSet(lineToOffsetColorExpression);
294
        view.chkDrawLineToOffset.setSelected(isDrawLineToOffset);
295
        
242 296
    }
243 297

  
244 298
    @Override
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolPreviewer.java
98 98
import java.awt.geom.AffineTransform;
99 99

  
100 100
import javax.swing.JPanel;
101
import org.gvsig.fmap.dal.feature.Feature;
101 102

  
102 103
import org.gvsig.fmap.mapcontext.MapContextLocator;
103 104
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
104 105
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException;
105 106
import org.gvsig.i18n.Messages;
106 107
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol;
108
import org.slf4j.Logger;
109
import org.slf4j.LoggerFactory;
107 110

  
108 111

  
109 112
/**
......
114 117
 *
115 118
 */
116 119
public class SymbolPreviewer extends JPanel {
120
    private static final Logger LOGGER = LoggerFactory.getLogger(SymbolPreviewer.class);
117 121
	/**
118 122
	 * 
119 123
	 */
......
122 126
	private ISymbol symbol;
123 127
	private EditorTool prevTool;
124 128
	private boolean useAllRoom = false; 
129
    private Feature sampleFeature;
125 130
	/**
126 131
	 * constructor method
127 132
	 *
......
130 135
		super(true);
131 136
		setBackground(Color.WHITE);
132 137
	}
133
	
138

  
139
     	public SymbolPreviewer(Feature sampleFeature) {
140
		this();
141
                this.sampleFeature = sampleFeature;
142
                
143
	}
144

  
134 145
    public SymbolPreviewer(boolean all_room) {
135 146
        super(true);
136 147
        setBackground(Color.WHITE);
......
157 168
	 * of the final one.
158 169
	 */
159 170
	public void paint(Graphics g) {
171
            try {
160 172
		super.paint(g);
161 173
		Graphics2D g2 = (Graphics2D) g;
162 174
		RenderingHints old = g2.getRenderingHints();
......
211 223
			g2.drawString(noneSelected,	 (r.x*scale) - (hGap/2), r.height/2+vGap*scale);
212 224
		}
213 225
		g2.setRenderingHints(old);
226
            } catch (Throwable t) {
227
                LOGGER.warn("Can't preview symbol", t);
228
            }
214 229
	}
215 230

  
216 231
	/**
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/PictureMarkerView.java
188 188
      jpanel1.add(lblLabelXExpression,cc.xy(2,18));
189 189

  
190 190
      lblLabelYExpression.setName("lblLabelYExpression");
191
      lblLabelYExpression.setText("x_offset_expression");
191
      lblLabelYExpression.setText("y_offset_expression");
192 192
      jpanel1.add(lblLabelYExpression,cc.xy(2,20));
193 193

  
194 194
      lblLabelRotationExpression.setName("lblLabelRotationExpression");

Also available in: Unified diff