Revision 40867 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/swing/dynobject/impl/DefaultLayersDynObjectSetComponent.java
DefaultLayersDynObjectSetComponent.java | ||
---|---|---|
42 | 42 |
import javax.swing.tree.TreePath; |
43 | 43 |
import javax.swing.tree.TreeSelectionModel; |
44 | 44 |
|
45 |
import org.gvsig.fmap.dal.feature.impl.featureset.DynObjectFeatureFacade; |
|
45 | 46 |
import org.gvsig.fmap.mapcontrol.swing.dynobject.LayersDynObjectSetComponent; |
46 | 47 |
import org.gvsig.tools.dynform.AbortActionException; |
47 | 48 |
import org.gvsig.tools.dynform.DynFormLocator; |
48 | 49 |
import org.gvsig.tools.dynform.JDynFormSet; |
49 | 50 |
import org.gvsig.tools.dynform.JDynFormSet.JDynFormSetListener; |
50 |
import org.gvsig.tools.dynobject.DynObject; |
|
51 | 51 |
import org.gvsig.tools.dynobject.DynObjectSet; |
52 | 52 |
import org.gvsig.tools.exception.BaseException; |
53 | 53 |
import org.slf4j.Logger; |
... | ... | |
150 | 150 |
it = dynObjects.iterator(); |
151 | 151 |
int j=0; |
152 | 152 |
while(it.hasNext()){ |
153 |
DynObject dynObject = (DynObject) it.next();
|
|
153 |
DynObjectFeatureFacade dynObject = (DynObjectFeatureFacade) it.next();
|
|
154 | 154 |
MutableTreeNode newDynObject = new DefaultMutableTreeNode( |
155 |
dynObject.toString(),
|
|
155 |
concatString(dynObject.toString(),20),
|
|
156 | 156 |
false); |
157 | 157 |
newLayer.insert(newDynObject, j); |
158 | 158 |
j++; |
... | ... | |
165 | 165 |
|
166 | 166 |
} |
167 | 167 |
} |
168 |
|
|
169 |
private String concatString(String cadena, int i) { |
|
170 |
if(cadena.length()>i && i>3){ |
|
171 |
String newCadena = cadena.substring(0, i-3); |
|
172 |
cadena = newCadena+"..."; |
|
173 |
} |
|
174 |
return cadena; |
|
175 |
} |
|
168 | 176 |
|
169 | 177 |
private void setCurrentLayerInfoByPoint(String layerName) { |
170 | 178 |
JDynFormSet newComponent = null; |
Also available in: Unified diff