Revision 38989 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/view/toc/TocItemBranch.java
TocItemBranch.java | ||
---|---|---|
59 | 59 |
import javax.swing.Icon; |
60 | 60 |
import javax.swing.ImageIcon; |
61 | 61 |
|
62 |
import org.gvsig.andami.IconThemeHelper; |
|
62 | 63 |
import org.gvsig.andami.PluginServices; |
63 | 64 |
import org.gvsig.app.project.documents.view.IContextMenuAction; |
64 | 65 |
import org.gvsig.app.project.documents.view.toc.actions.FLyrVectEditPropertiesTocMenuEntry; |
65 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
66 | 66 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
67 | 67 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
68 | 68 |
|
... | ... | |
83 | 83 |
|
84 | 84 |
private final String defaultIcon = "images/icolayer.PNG"; |
85 | 85 |
|
86 |
private final String unavailableImgPath = "images/unavailable.png"; |
|
87 |
|
|
88 | 86 |
private boolean isAvailable = true; |
89 | 87 |
|
90 | 88 |
private FLayer lyr; |
... | ... | |
234 | 232 |
|
235 | 233 |
private BufferedImage getUnavailableImage() { |
236 | 234 |
if (this.unavailableImg == null) { |
237 |
URL url =PluginServices.getPluginServices("org.gvsig.app").getClassLoader().getResource(this.unavailableImgPath); |
|
238 |
if (url!=null) { |
|
239 |
ImageIcon uIcon = new ImageIcon(url); |
|
240 |
this.unavailableImg = new BufferedImage(uIcon.getIconWidth(),uIcon.getIconHeight(),BufferedImage.TYPE_INT_RGB); |
|
241 |
this.unavailableImg.getGraphics().drawImage(uIcon.getImage(),0,0,null); |
|
235 |
ImageIcon uIcon = IconThemeHelper.getImageIcon("layer-icon-unavailable"); |
|
236 |
if (uIcon != null) { |
|
237 |
this.unavailableImg = new BufferedImage(uIcon.getIconWidth(), uIcon.getIconHeight(), BufferedImage.TYPE_INT_RGB); |
|
238 |
this.unavailableImg.getGraphics().drawImage(uIcon.getImage(), 0, 0, null); |
|
242 | 239 |
} |
243 |
|
|
244 | 240 |
} |
245 | 241 |
return this.unavailableImg; |
246 | 242 |
} |
Also available in: Unified diff