Revision 39064
branches/v2_0_0_prep/libraries/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolSelectorListModel.java | ||
---|---|---|
122 | 122 |
|
123 | 123 |
import javax.swing.event.ListDataListener; |
124 | 124 |
|
125 |
import org.slf4j.Logger; |
|
126 |
import org.slf4j.LoggerFactory; |
|
127 |
|
|
125 | 128 |
import org.gvsig.andami.messages.NotificationManager; |
126 | 129 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
127 | 130 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
... | ... | |
140 | 143 |
*/ |
141 | 144 |
public class SymbolSelectorListModel implements ListModel { |
142 | 145 |
|
146 |
private static Logger logger = LoggerFactory.getLogger(SymbolSelectorListModel.class); |
|
143 | 147 |
private String fileExtension; |
144 | 148 |
protected FileFilter ffilter = new FileFilter() { |
145 | 149 |
public boolean accept(File pathname) { |
... | ... | |
220 | 224 |
ISymbol[] symbols = MapContextLocator.getSymbolManager() |
221 | 225 |
.loadSymbols(dir, ffilter); |
222 | 226 |
|
223 |
elements = symbols == null ? new Vector<ISymbol>(0) |
|
224 |
: new Vector<ISymbol>(symbols.length); |
|
227 |
if (symbols == null) { |
|
228 |
|
|
229 |
logger.info("Warning: Did not load any symbol from folder: " |
|
230 |
+ dir.getAbsolutePath()); |
|
231 |
elements = new Vector<ISymbol>(0); |
|
232 |
|
|
233 |
|
|
234 |
} else { |
|
235 |
elements = new Vector<ISymbol>(symbols.length); |
|
236 |
for (int i = 0; i < symbols.length; i++) { |
|
237 |
elements.add(symbols[i]); |
|
238 |
} |
|
239 |
} |
|
225 | 240 |
|
226 |
for (int i = 0; i < symbols.length; i++) { |
|
227 |
elements.add(symbols[i]); |
|
228 |
} |
|
229 | 241 |
} catch (SymbolException e) { |
230 | 242 |
NotificationManager.addWarning( |
231 | 243 |
"Error loading the symbols from the folder: " |
Also available in: Unified diff