Revision 1503 org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app/org.gvsig.raster.wmts.app.wmtsclient/src/main/java/org/gvsig/raster/wmts/app/wmtsclient/gui/panel/layer/LayersSelectedPanel.java
LayersSelectedPanel.java | ||
---|---|---|
25 | 25 |
import java.awt.GridBagConstraints; |
26 | 26 |
import java.awt.GridBagLayout; |
27 | 27 |
|
28 |
import javax.swing.ImageIcon; |
|
28 | 29 |
import javax.swing.JButton; |
29 | 30 |
import javax.swing.JPanel; |
30 | 31 |
import javax.swing.JScrollPane; |
... | ... | |
45 | 46 |
private LayerList lstSelectedLayers = null; |
46 | 47 |
private JPanel jPanelControlLayers = null; |
47 | 48 |
private JScrollPane jScrollPanel = null; |
49 |
private String pathToImagesForTest = "/src/main/resources/images/"; |
|
48 | 50 |
|
49 | 51 |
public LayersSelectedPanel() { |
50 | 52 |
init(); |
... | ... | |
129 | 131 |
btnUp = new JButton(); |
130 | 132 |
btnUp.setPreferredSize(new Dimension(30, 30)); |
131 | 133 |
btnUp.setToolTipText(PluginServices.getText(this, "move_layer_up")); |
132 |
btnUp.setIcon(IconThemeHelper.getImageIcon("aplication-preferences-uparrow"));
|
|
134 |
btnUp.setIcon(loadIcon("aplication-preferences-uparrow"));
|
|
133 | 135 |
} |
134 | 136 |
return btnUp; |
135 | 137 |
} |
... | ... | |
143 | 145 |
btnDown = new JButton(); |
144 | 146 |
btnDown.setPreferredSize(new Dimension(30, 30)); |
145 | 147 |
btnDown.setToolTipText(PluginServices.getText(this, "move_layer_down")); |
146 |
btnDown.setIcon(IconThemeHelper.getImageIcon("aplication-preferences-downarrow"));
|
|
148 |
btnDown.setIcon(loadIcon("aplication-preferences-downarrow"));
|
|
147 | 149 |
} |
148 | 150 |
return btnDown; |
149 | 151 |
} |
152 |
|
|
153 |
private ImageIcon loadIcon(String iconName) { |
|
154 |
ImageIcon icon = null; |
|
155 |
try { |
|
156 |
icon = IconThemeHelper.getImageIcon(iconName); |
|
157 |
} catch(NullPointerException e) {} |
|
158 |
if(icon == null) |
|
159 |
icon = new ImageIcon(System.getProperty("user.dir") + pathToImagesForTest + iconName + ".png", ""); |
|
160 |
if(icon == null) |
|
161 |
icon = new ImageIcon(System.getProperty("user.dir") + pathToImagesForTest + iconName + ".gif", ""); |
|
162 |
return icon; |
|
163 |
} |
|
150 | 164 |
|
151 | 165 |
} |
Also available in: Unified diff