Revision 38564 branches/v2_0_0_prep/extensions/org.gvsig.hyperlink.app/org.gvsig.hyperlink.app.extension/src/main/java/org/gvsig/hyperlink/app/extension/actions/PdfHyperlinkPanel.java
PdfHyperlinkPanel.java | ||
---|---|---|
37 | 37 |
import java.beans.PropertyChangeEvent; |
38 | 38 |
import java.beans.PropertyChangeListener; |
39 | 39 |
import java.net.URI; |
40 |
import java.net.URL; |
|
41 | 40 |
|
42 | 41 |
import javax.print.attribute.HashPrintRequestAttributeSet; |
43 | 42 |
import javax.print.attribute.PrintRequestAttributeSet; |
44 | 43 |
import javax.print.attribute.SetOfIntegerSyntax; |
45 | 44 |
import javax.print.attribute.standard.PageRanges; |
46 |
import javax.swing.ImageIcon; |
|
47 | 45 |
import javax.swing.JButton; |
48 | 46 |
import javax.swing.JLabel; |
49 | 47 |
import javax.swing.JOptionPane; |
... | ... | |
51 | 49 |
import javax.swing.JScrollPane; |
52 | 50 |
import javax.swing.JTextField; |
53 | 51 |
|
52 |
import org.gvsig.andami.IconThemeHelper; |
|
54 | 53 |
import org.gvsig.andami.PluginServices; |
55 | 54 |
import org.gvsig.andami.messages.NotificationManager; |
56 | 55 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
... | ... | |
75 | 74 |
private JLabel pageCounter3 = |
76 | 75 |
new JLabel(PluginServices.getText(this, "de")); |
77 | 76 |
|
77 |
public static void initializeIcons() { |
|
78 |
IconThemeHelper.registerIcon("toolbar-go", "go-next", PdfHyperlinkPanel.class); |
|
79 |
IconThemeHelper.registerIcon("toolbar-go", "go-previous", PdfHyperlinkPanel.class); |
|
80 |
IconThemeHelper.registerIcon("toolbar-go", "go-next-fast", PdfHyperlinkPanel.class); |
|
81 |
IconThemeHelper.registerIcon("toolbar-go", "go-previous-fast", PdfHyperlinkPanel.class); |
|
82 |
IconThemeHelper.registerIcon("toolbar-go", "go-first", PdfHyperlinkPanel.class); |
|
83 |
IconThemeHelper.registerIcon("toolbar-go", "go-last", PdfHyperlinkPanel.class); |
|
84 |
IconThemeHelper.registerIcon("action", "document-print", PdfHyperlinkPanel.class); |
|
85 |
} |
|
86 |
|
|
78 | 87 |
public PdfHyperlinkPanel(URI doc) { |
79 | 88 |
super(doc); |
80 | 89 |
initialize(); |
... | ... | |
176 | 185 |
/** back to page 1 */ |
177 | 186 |
JButton start = new JButton(); |
178 | 187 |
start.setBorderPainted(false); |
179 |
URL startImage = PluginServices.getPluginServices(this).getClassLoader().getResource("images/start.gif"); |
|
180 |
start.setIcon(new ImageIcon(startImage)); |
|
188 |
start.setIcon( IconThemeHelper.getImageIcon("go-first")); |
|
181 | 189 |
start.setToolTipText(PluginServices.getText(this, "primera_pagina")); |
182 | 190 |
// currentBar1.add(start); |
183 | 191 |
list[0] = start; |
... | ... | |
204 | 212 |
/** back 10 icon */ |
205 | 213 |
JButton fback = new JButton(); |
206 | 214 |
fback.setBorderPainted(false); |
207 |
URL fbackImage = PluginServices.getPluginServices(this).getClassLoader().getResource("images/fback.gif"); |
|
208 |
fback.setIcon(new ImageIcon(fbackImage)); |
|
215 |
fback.setIcon( IconThemeHelper.getImageIcon("go-previous-fast")); |
|
209 | 216 |
fback.setToolTipText(PluginServices.getText(this, "diez_paginas_atras")); |
210 | 217 |
// currentBar1.add(fback); |
211 | 218 |
list[1] = fback; |
... | ... | |
232 | 239 |
/** back icon */ |
233 | 240 |
JButton back = new JButton(); |
234 | 241 |
back.setBorderPainted(false); |
235 |
URL backImage = PluginServices.getPluginServices(this).getClassLoader().getResource("images/back.gif");
|
|
236 |
back.setIcon(new ImageIcon(backImage)); |
|
242 |
back.setIcon( IconThemeHelper.getImageIcon("go-previous"));
|
|
243 |
|
|
237 | 244 |
back.setToolTipText(PluginServices.getText(this, "pagina_atras")); |
238 | 245 |
// currentBar1.add(back); |
239 | 246 |
list[2] = back; |
... | ... | |
309 | 316 |
/** forward icon */ |
310 | 317 |
JButton forward = new JButton(); |
311 | 318 |
forward.setBorderPainted(false); |
312 |
URL fowardImage = PluginServices.getPluginServices(this).getClassLoader().getResource("images/forward.gif"); |
|
313 |
forward.setIcon(new ImageIcon(fowardImage)); |
|
319 |
forward.setIcon( IconThemeHelper.getImageIcon("go-next")); |
|
314 | 320 |
forward.setToolTipText(PluginServices.getText(this, "pagina_delante")); |
315 | 321 |
// currentBar1.add(forward); |
316 | 322 |
list[8] = forward; |
... | ... | |
337 | 343 |
/** fast forward icon */ |
338 | 344 |
JButton fforward = new JButton(); |
339 | 345 |
fforward.setBorderPainted(false); |
340 |
URL ffowardImage = PluginServices.getPluginServices(this).getClassLoader().getResource("images/fforward.gif"); |
|
341 |
fforward.setIcon(new ImageIcon(ffowardImage)); |
|
346 |
fforward.setIcon( IconThemeHelper.getImageIcon("go-next-fast")); |
|
342 | 347 |
fforward.setToolTipText(PluginServices.getText(this, |
343 | 348 |
"10_paginas_delante")); |
344 | 349 |
// currentBar1.add(fforward); |
... | ... | |
366 | 371 |
/** goto last page */ |
367 | 372 |
JButton end = new JButton(); |
368 | 373 |
end.setBorderPainted(false); |
369 |
URL endImage = PluginServices.getPluginServices(this).getClassLoader().getResource("images/end.gif"); |
|
370 |
end.setIcon(new ImageIcon(endImage)); |
|
374 |
end.setIcon( IconThemeHelper.getImageIcon("go-last")); |
|
371 | 375 |
end.setToolTipText(PluginServices.getText(this, "ultima_pagina")); |
372 | 376 |
// currentBar1.add(end); |
373 | 377 |
list[10] = end; |
... | ... | |
394 | 398 |
/** Print */ |
395 | 399 |
JButton print = new JButton(); |
396 | 400 |
print.setBorderPainted(false); |
397 |
URL printImage = PluginServices.getPluginServices(this).getClassLoader().getResource("images/print.gif"); |
|
398 |
print.setIcon(new ImageIcon(printImage)); |
|
401 |
print.setIcon( IconThemeHelper.getImageIcon("document-print")); |
|
399 | 402 |
print.setToolTipText(PluginServices.getText(this, "imprimir")); |
400 | 403 |
// currentBar1.add(end); |
401 | 404 |
list[11] = print; |
Also available in: Unified diff