Revision 43511
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/java/org/gvsig/fmap/mapcontext/layers/order/impl/RasterPolLinePointOrderManager.java | ||
---|---|---|
129 | 129 |
* |
130 | 130 |
*/ |
131 | 131 |
private int simplifyType(GeometryType gt) { |
132 |
if( gt.isTypeOf(TYPES.POINT) || gt.isTypeOf(TYPES.MULTIPOINT) ) { |
|
133 |
return TYPES.POINT; |
|
132 | 134 |
|
133 |
if (gt.getType() == TYPES.POINT || gt.getType() == TYPES.MULTIPOINT) { |
|
134 |
return TYPES.POINT; |
|
135 |
} else { |
|
136 |
if (gt.isTypeOf(TYPES.CURVE) || gt.getType() == TYPES.MULTICURVE) { |
|
137 |
return TYPES.CURVE; |
|
138 |
} else { |
|
139 |
if (gt.isTypeOf(TYPES.SURFACE) || gt.getType() == TYPES.MULTISURFACE) { |
|
140 |
return TYPES.SURFACE; |
|
141 |
} else { |
|
142 |
// default |
|
143 |
return TYPES.SURFACE; |
|
144 |
} |
|
145 |
} |
|
146 |
} |
|
135 |
} else if( gt.isTypeOf(TYPES.CURVE) || gt.isTypeOf(TYPES.MULTICURVE) ) { |
|
136 |
return TYPES.CURVE; |
|
137 |
|
|
138 |
} else if( gt.isTypeOf(TYPES.SURFACE) || gt.isTypeOf(TYPES.MULTISURFACE) ) { |
|
139 |
return TYPES.SURFACE; |
|
140 |
|
|
141 |
} |
|
142 |
return TYPES.SURFACE; |
|
147 | 143 |
} |
148 | 144 |
|
149 | 145 |
public void loadFromState(PersistentState state) throws PersistenceException { |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacement.java | ||
---|---|---|
72 | 72 |
(MultiShapePlacementConstraints) placementConstraints; |
73 | 73 |
|
74 | 74 |
GeometryType gt = geom.getGeometryType(); |
75 |
if (gt.getType() == TYPES.POINT || gt.getType() == TYPES.MULTIPOINT) { |
|
76 |
if (pointPlacement != null) { |
|
77 |
return pointPlacement.guess(lc, geom, pc.getPointConstraints(), cartographicSymbolSize, cancel,vp); |
|
78 |
} |
|
79 |
} else { |
|
80 |
if (gt.isTypeOf(TYPES.CURVE) || gt.getType() == TYPES.MULTICURVE) { |
|
81 |
if (linePlacement != null) { |
|
82 |
return linePlacement.guess(lc, geom, pc.getLineConstraints(), cartographicSymbolSize, cancel,vp); |
|
83 |
} |
|
84 |
} else { |
|
85 |
if (gt.isTypeOf(TYPES.SURFACE) || gt.getType() == TYPES.MULTISURFACE) { |
|
86 |
if (polygonPlacement != null) { |
|
87 |
return polygonPlacement.guess(lc, geom, pc.getPolygonConstraints(), cartographicSymbolSize, cancel,vp); |
|
88 |
} |
|
89 |
} |
|
90 |
} |
|
91 |
} |
|
92 |
return CannotPlaceLabel.NO_PLACES; |
|
75 |
if( gt.isTypeOf(TYPES.POINT) || gt.isTypeOf(TYPES.MULTIPOINT) ) { |
|
76 |
if( pointPlacement != null ) { |
|
77 |
return pointPlacement.guess(lc, geom, pc.getPointConstraints(), cartographicSymbolSize, cancel, vp); |
|
78 |
} |
|
79 |
} else if( gt.isTypeOf(TYPES.CURVE) || gt.isTypeOf(TYPES.MULTICURVE) ) { |
|
80 |
if( linePlacement != null ) { |
|
81 |
return linePlacement.guess(lc, geom, pc.getLineConstraints(), cartographicSymbolSize, cancel, vp); |
|
82 |
} |
|
83 |
|
|
84 |
} else if( gt.isTypeOf(TYPES.SURFACE) || gt.isTypeOf(TYPES.MULTISURFACE) ) { |
|
85 |
if( polygonPlacement != null ) { |
|
86 |
return polygonPlacement.guess(lc, geom, pc.getPolygonConstraints(), cartographicSymbolSize, cancel, vp); |
|
87 |
} |
|
88 |
|
|
89 |
} |
|
90 |
return CannotPlaceLabel.NO_PLACES; |
|
93 | 91 |
} |
94 | 92 |
|
95 | 93 |
@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/fill/impl/AbstractFillSymbol.java | ||
---|---|---|
24 | 24 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.impl; |
25 | 25 |
|
26 | 26 |
import java.awt.Color; |
27 |
import static javax.management.Query.gt; |
|
27 | 28 |
|
28 | 29 |
import org.gvsig.fmap.geom.Geometry; |
30 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
29 | 31 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
30 | 32 |
import org.gvsig.fmap.mapcontext.ViewPort; |
31 | 33 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
... | ... | |
77 | 79 |
outline.setColor(symbolPreferences.getDefaultSymbolColor()); |
78 | 80 |
} |
79 | 81 |
|
82 |
@Override |
|
80 | 83 |
public boolean isSuitableFor(Geometry geom) { |
81 |
switch(geom.getType()) { |
|
82 |
case Geometry.TYPES.SURFACE: |
|
83 |
case Geometry.TYPES.POLYGON: |
|
84 |
return true; |
|
85 |
} |
|
86 |
return false; |
|
84 |
GeometryType gt = geom.getGeometryType(); |
|
85 |
if( gt.isTypeOf(Geometry.TYPES.SURFACE) ) { |
|
86 |
return true; |
|
87 |
} |
|
88 |
return false; |
|
87 | 89 |
} |
88 | 90 |
|
91 |
@Override |
|
89 | 92 |
public int getOnePointRgb() { |
90 | 93 |
int rgb = 0; |
91 | 94 |
if (outline != null) { |
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/fill/impl/MultiLayerFillSymbol.java | ||
---|---|---|
33 | 33 |
import org.gvsig.compat.print.PrintAttributes; |
34 | 34 |
import org.gvsig.fmap.dal.feature.Feature; |
35 | 35 |
import org.gvsig.fmap.geom.Geometry; |
36 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
36 | 37 |
import org.gvsig.fmap.mapcontext.MapContext; |
37 | 38 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
38 | 39 |
import org.gvsig.fmap.mapcontext.ViewPort; |
... | ... | |
91 | 92 |
return null; |
92 | 93 |
} |
93 | 94 |
|
95 |
@Override |
|
94 | 96 |
public boolean isSuitableFor(Geometry geom) { |
95 |
switch(geom.getType()) { |
|
96 |
case Geometry.TYPES.SURFACE: |
|
97 |
case Geometry.TYPES.POLYGON: |
|
97 |
GeometryType gt = geom.getGeometryType(); |
|
98 |
if( gt.isTypeOf(Geometry.TYPES.SURFACE) ) { |
|
98 | 99 |
return true; |
99 | 100 |
} |
100 | 101 |
return false; |
101 | 102 |
} |
102 | 103 |
|
104 |
@Override |
|
103 | 105 |
public void setFillColor(Color color) { |
104 | 106 |
/* |
105 | 107 |
* Will apply the color to each layer |
Also available in: Unified diff