Revision 5130 org.gvsig.legend.urbanhorizontalsignage/trunk/org.gvsig.legend.urbanhorizontalsignage/org.gvsig.legend.urbanhorizontalsignage.swing/org.gvsig.legend.urbanhorizontalsignage.swing.impl/src/main/java/org/gvsig/legend/urbanhorizontalsignage/swing/impl/DefaultUrbanHorizontalSignageLegendEditor.java
DefaultUrbanHorizontalSignageLegendEditor.java | ||
---|---|---|
13 | 13 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
14 | 14 |
import org.gvsig.fmap.dal.swing.DataSwingManager; |
15 | 15 |
import org.gvsig.fmap.dal.swing.featuretype.AttributeDescriptorPickerController; |
16 |
import org.gvsig.fmap.geom.Geometry; |
|
17 |
import org.gvsig.fmap.geom.GeometryUtils; |
|
16 | 18 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
17 | 19 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
18 | 20 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
... | ... | |
95 | 97 |
this.translate(this.lblPaintHolesField); |
96 | 98 |
this.translate(this.lblHolesLengthField); |
97 | 99 |
this.translate(this.lblRoundVertexField); |
100 |
this.translate(this.lblGapWidth); |
|
98 | 101 |
} |
99 | 102 |
|
100 | 103 |
private void translate(AbstractButton component) { |
... | ... | |
205 | 208 |
|
206 | 209 |
@Override |
207 | 210 |
public boolean isSuitableFor(FLayer layer) { |
208 |
return true; |
|
211 |
if(layer instanceof FLyrVect){ |
|
212 |
try { |
|
213 |
int shapeType = ((FLyrVect)layer).getShapeType(); |
|
214 |
return (GeometryUtils.isSubtype(Geometry.TYPES.CURVE, shapeType) || |
|
215 |
GeometryUtils.isSubtype(Geometry.TYPES.MULTICURVE, shapeType)); |
|
216 |
} catch (Exception ex) { |
|
217 |
LOGGER.debug("Can't get shape type for layer "+layer.getName(), ex); |
|
218 |
return false; |
|
219 |
} |
|
220 |
} |
|
221 |
return false; |
|
209 | 222 |
} |
210 | 223 |
|
211 | 224 |
} |
Also available in: Unified diff