Revision 9034 trunk/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/fmap/layers/FRasterLyrArcIMS.java
FRasterLyrArcIMS.java | ||
---|---|---|
29 | 29 |
import java.util.Map; |
30 | 30 |
import java.util.Vector; |
31 | 31 |
|
32 |
import javax.print.attribute.PrintRequestAttributeSet; |
|
33 |
import javax.swing.ImageIcon; |
|
34 |
|
|
32 | 35 |
import org.apache.log4j.Logger; |
33 | 36 |
import org.cresques.geo.ViewPortData; |
34 | 37 |
import org.cresques.io.GdalFile; |
... | ... | |
49 | 52 |
import org.gvsig.remoteClient.arcims.utils.ServiceInformationLayer; |
50 | 53 |
import org.gvsig.remoteClient.utils.Utilities; |
51 | 54 |
|
55 |
import com.iver.andami.PluginServices; |
|
52 | 56 |
import com.iver.cit.gvsig.fmap.DriverException; |
53 | 57 |
import com.iver.cit.gvsig.fmap.ViewPort; |
54 | 58 |
import com.iver.cit.gvsig.fmap.crs.CRSFactory; |
... | ... | |
485 | 489 |
* @throws DriverException |
486 | 490 |
*/ |
487 | 491 |
public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, |
488 |
double scale) throws DriverException { |
|
492 |
double scale, PrintRequestAttributeSet properties) throws DriverException {
|
|
489 | 493 |
|
490 | 494 |
draw(null, g, viewPort, cancel, scale); |
491 | 495 |
} |
... | ... | |
1105 | 1109 |
nameQueryChange = c; |
1106 | 1110 |
} |
1107 | 1111 |
|
1112 |
public ImageIcon getTocImageIcon() { |
|
1113 |
|
|
1114 |
ImageIcon resp = null; |
|
1115 |
try { |
|
1116 |
resp = createImageIcon("images/esrilogo.png"); |
|
1117 |
} catch (Exception ex) { |
|
1118 |
} |
|
1119 |
|
|
1120 |
if (resp == null) { |
|
1121 |
return super.getTocImageIcon(); |
|
1122 |
} else { |
|
1123 |
return resp; |
|
1124 |
} |
|
1125 |
} |
|
1126 |
|
|
1127 |
protected ImageIcon createImageIcon(String path) { |
|
1128 |
java.net.URL imgURL = createExtensionUrl(path); |
|
1129 |
if (imgURL != null) { |
|
1130 |
return new ImageIcon(imgURL); |
|
1131 |
} else { |
|
1132 |
logger.error("File not found: " + path); |
|
1133 |
return null; |
|
1134 |
} |
|
1135 |
} |
|
1108 | 1136 |
|
1137 |
protected java.net.URL createExtensionUrl(String path) { |
|
1138 |
return PluginServices.getPluginServices("es.prodevelop.cit.gvsig.arcims").getClassLoader().getResource(path); |
|
1139 |
// return getClass().getClassLoader().getResource(path); |
|
1140 |
} |
|
1141 |
|
|
1142 |
|
|
1143 |
|
|
1109 | 1144 |
} |
Also available in: Unified diff