Revision 41646 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/symbol/SmartTextSymbol.java

View differences:

SmartTextSymbol.java
11 11
import java.awt.font.GlyphVector;
12 12
import java.awt.font.LineMetrics;
13 13
import java.awt.geom.AffineTransform;
14
import org.apache.commons.lang3.StringUtils;
14 15

  
15 16
import org.gvsig.compat.print.PrintAttributes;
16 17
import org.gvsig.fmap.dal.feature.Feature;
......
33 34
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException;
34 35
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolPreferences;
35 36
import org.gvsig.labeling.placements.PointPlacementConstraints;
36
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.TextPath;
37 37
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol;
38 38
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text.ISimpleTextSymbol;
39 39
import org.gvsig.tools.ToolsLocator;
......
45 45
import org.slf4j.Logger;
46 46
import org.slf4j.LoggerFactory;
47 47

  
48
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.TextPath;
48 49

  
50
        
49 51
/**
50 52
 * Class used to create symbols composed using a text defined by
51 53
 * the user.This text can be edited (changing the color, the font of the characters, and
......
226 228
		if (!isShapeVisible()) return;
227 229

  
228 230
		setMargin(0);
231
                if ( StringUtils.isEmpty(text) ) {
232
                    return;
233
                }
229 234

  
230

  
231 235
		char[] text_chars = text.toCharArray();
232 236
		tp = new TextPath(g, geom, text_chars, getFont(),
233 237
				(float) characterSpacing, (float) characterWidth, kerning,

Also available in: Unified diff