Revision 34499
trunk/extensions/extHyperlink/config/text_en.properties | ||
---|---|---|
1 |
#Translations for language [en] |
|
2 |
#Mon Sep 21 10:02:06 CEST 2009 |
|
3 |
10_paginas_delante= |
|
4 |
Aceptar=Accept |
|
5 |
Action=Action |
|
6 |
Actions=Actions |
|
7 |
Add_action=Add action |
|
8 |
Advanced_Hyperlink=Advanced Hyperlink |
|
9 |
Campo=Field |
|
10 |
Cancel=Cancel |
|
11 |
Capa=Layer |
|
12 |
de=of |
|
13 |
diez_paginas_atras= |
|
14 |
Enable_hyperlink=Enable hyperlink |
|
15 |
Error\ reading\ layer\ fields= |
|
16 |
Extension=Extension |
|
17 |
HTML_and_text_formats=Link to text and HTML files |
|
18 |
Hyperlink=Hyperlink |
|
19 |
Hyperlink__field_value_is_not_valid_file= |
|
20 |
Hyperlink_linked_field_doesnot_exist= |
|
21 |
Hyperlink_settings=Hyperlink settings |
|
22 |
Hyperlink_Settings=Hyperlink Settings |
|
23 |
Image_format=Link to image files |
|
24 |
imprimir= |
|
25 |
Load_Raster_Layer=Load raster layer |
|
26 |
Load_Vector_Layer=Load Vector Layer |
|
27 |
Loads_raster_layers_in_gvSIG=Loads raster layers in active view |
|
28 |
Loads_vector_layers_in_gvSIG=Loads vector layers in active view |
|
29 |
Pagina= |
|
30 |
pagina_atras= |
|
31 |
pagina_delante= |
|
32 |
PDF_format=Link to PDF files |
|
33 |
pdf_viewer= |
|
34 |
primera_pagina= |
|
35 |
Remove_action=Remove action |
|
36 |
Shows_HTML_or_text_files_in_gvSIG=Use internal viewer for HTML and text files |
|
37 |
Shows_HTML_or_text_files_inside_gvSIG=Shows HTML or text files in gvSIG |
|
38 |
Shows_image_files_in_gvSIG=Shows image files in gvSIG |
|
39 |
Shows_PDF_files_in_gvSIG=Shows PDF files in gvSIG |
|
40 |
Shows_SVG_files_in_gvSIG=Shows SVG files in gvSIG |
|
41 |
SVG_format=Link to SVG files |
|
42 |
ultima_pagina= |
|
43 |
valor_incorrecto= |
|
44 |
View_Tools_Query= |
|
1 |
#Translations for language [en] |
|
2 |
#Mon Sep 21 10:02:06 CEST 2009 |
|
3 |
10_paginas_delante= |
|
4 |
Aceptar=Accept |
|
5 |
Action=Action |
|
6 |
Actions=Actions |
|
7 |
Add_action=Add action |
|
8 |
Advanced_Hyperlink=Advanced Hyperlink |
|
9 |
Campo=Field |
|
10 |
Cancel=Cancel |
|
11 |
Cant_open_folder=Can't open folder |
|
12 |
Capa=Layer |
|
13 |
de=of |
|
14 |
diez_paginas_atras= |
|
15 |
Enable_hyperlink=Enable hyperlink |
|
16 |
Error\ reading\ layer\ fields= |
|
17 |
Extension=Extension |
|
18 |
HTML_and_text_formats=Link to text and HTML files |
|
19 |
Hyperlink=Hyperlink |
|
20 |
Hyperlink__field_value_is_not_valid_file= |
|
21 |
Hyperlink_linked_field_doesnot_exist= |
|
22 |
Hyperlink_settings=Hyperlink settings |
|
23 |
Hyperlink_Settings=Hyperlink Settings |
|
24 |
Image_format=Link to image files |
|
25 |
imprimir= |
|
26 |
Load_Raster_Layer=Load raster layer |
|
27 |
Load_Vector_Layer=Load Vector Layer |
|
28 |
Loads_raster_layers_in_gvSIG=Loads raster layers in active view |
|
29 |
Loads_vector_layers_in_gvSIG=Loads vector layers in active view |
|
30 |
Pagina= |
|
31 |
pagina_atras= |
|
32 |
pagina_delante= |
|
33 |
PDF_format=Link to PDF files |
|
34 |
pdf_viewer= |
|
35 |
primera_pagina= |
|
36 |
Remove_action=Remove action |
|
37 |
Shows_HTML_or_text_files_in_gvSIG=Use internal viewer for HTML and text files |
|
38 |
Shows_HTML_or_text_files_inside_gvSIG=Shows HTML or text files in gvSIG |
|
39 |
Shows_image_files_in_gvSIG=Shows image files in gvSIG |
|
40 |
Shows_PDF_files_in_gvSIG=Shows PDF files in gvSIG |
|
41 |
Shows_SVG_files_in_gvSIG=Shows SVG files in gvSIG |
|
42 |
Shows_Folders_in_gvSIG=Shows linked Folders |
|
43 |
Folder_formats=Link to Folders |
|
44 |
Bad_path=The path does not exist |
|
45 |
SVG_format=Link to SVG files |
|
46 |
ultima_pagina= |
|
47 |
valor_incorrecto= |
|
48 |
View_Tools_Query= |
trunk/extensions/extHyperlink/config/text.properties | ||
---|---|---|
1 |
#Translations for language [es] |
|
2 |
#Mon Sep 21 10:02:06 CEST 2009 |
|
3 |
10_paginas_delante= |
|
4 |
Aceptar=Aceptar |
|
5 |
Action=Acci\u00f3n |
|
6 |
Actions=Acciones |
|
7 |
Add_action=A\u00f1adir acci\u00f3n |
|
8 |
Advanced_Hyperlink=Hiperenlace avanzado |
|
9 |
Campo=Campo |
|
10 |
Cancel=Cancelar |
|
11 |
Capa=Capa |
|
12 |
de=de |
|
13 |
diez_paginas_atras= |
|
14 |
Enable_hyperlink=Activar hiperenlace |
|
15 |
Error\ reading\ layer\ fields= |
|
16 |
Extension=Extensi\u00f3n |
|
17 |
HTML_and_text_formats=Enlazar con ficheros de texto y HTML |
|
18 |
Hyperlink=Hiperenlace |
|
19 |
Hyperlink__field_value_is_not_valid_file= |
|
20 |
Hyperlink_linked_field_doesnot_exist= |
|
21 |
Hyperlink_settings=Configurar hiperenlace |
|
22 |
Hyperlink_Settings=Configurar Hiperenlace |
|
23 |
Image_format=Enlazar con ficheros de imagen |
|
24 |
imprimir= |
|
25 |
Load_Raster_Layer=Cargar capa r\u00e1ster |
|
26 |
Load_Vector_Layer=Cargar capa vectorial |
|
27 |
Loads_raster_layers_in_gvSIG=Carga capas r\u00e1ster en la vista activa |
|
28 |
Loads_vector_layers_in_gvSIG=Carga capas vectoriales en la vista activa |
|
29 |
Pagina= |
|
30 |
pagina_atras= |
|
31 |
pagina_delante= |
|
32 |
PDF_format=Enlazar con ficheros PDF |
|
33 |
pdf_viewer= |
|
34 |
primera_pagina= |
|
35 |
Remove_action=Eliminar acci\u00f3n |
|
36 |
Shows_HTML_or_text_files_in_gvSIG=Muestra ficheros HTML o de texto en gvSIG |
|
37 |
Shows_image_files_in_gvSIG=Muestra im\u00e1genes en gvSIG |
|
38 |
Shows_PDF_files_in_gvSIG=Muestra ficheros PDF en gvSIG |
|
39 |
Shows_SVG_files_in_gvSIG=Muestra ficheros SVG en gvSIG |
|
40 |
SVG_format=Enlazar con ficheros SVG |
|
41 |
ultima_pagina= |
|
42 |
valor_incorrecto= |
|
43 |
View_Tools_Query= |
|
1 |
#Translations for language [es] |
|
2 |
#Mon Sep 21 10:02:06 CEST 2009 |
|
3 |
10_paginas_delante= |
|
4 |
Aceptar=Aceptar |
|
5 |
Action=Acci\u00f3n |
|
6 |
Actions=Acciones |
|
7 |
Add_action=A\u00f1adir acci\u00f3n |
|
8 |
Advanced_Hyperlink=Hiperenlace avanzado |
|
9 |
Campo=Campo |
|
10 |
Cancel=Cancelar |
|
11 |
Cant_open_folder=No se ha podido abrir la carpeta |
|
12 |
Capa=Capa |
|
13 |
de=de |
|
14 |
diez_paginas_atras= |
|
15 |
Enable_hyperlink=Activar hiperenlace |
|
16 |
Error\ reading\ layer\ fields= |
|
17 |
Extension=Extensi\u00f3n |
|
18 |
HTML_and_text_formats=Enlazar con ficheros de texto y HTML |
|
19 |
Hyperlink=Hiperenlace |
|
20 |
Hyperlink__field_value_is_not_valid_file= |
|
21 |
Hyperlink_linked_field_doesnot_exist= |
|
22 |
Hyperlink_settings=Configurar hiperenlace |
|
23 |
Hyperlink_Settings=Configurar Hiperenlace |
|
24 |
Image_format=Enlazar con ficheros de imagen |
|
25 |
imprimir= |
|
26 |
Load_Raster_Layer=Cargar capa r\u00e1ster |
|
27 |
Load_Vector_Layer=Cargar capa vectorial |
|
28 |
Loads_raster_layers_in_gvSIG=Carga capas r\u00e1ster en la vista activa |
|
29 |
Loads_vector_layers_in_gvSIG=Carga capas vectoriales en la vista activa |
|
30 |
Pagina= |
|
31 |
pagina_atras= |
|
32 |
pagina_delante= |
|
33 |
PDF_format=Enlazar con ficheros PDF |
|
34 |
pdf_viewer= |
|
35 |
primera_pagina= |
|
36 |
Remove_action=Eliminar acci\u00f3n |
|
37 |
Shows_HTML_or_text_files_in_gvSIG=Muestra ficheros HTML o de texto en gvSIG |
|
38 |
Shows_image_files_in_gvSIG=Muestra im\u00e1genes en gvSIG |
|
39 |
Shows_PDF_files_in_gvSIG=Muestra ficheros PDF en gvSIG |
|
40 |
Shows_SVG_files_in_gvSIG=Muestra ficheros SVG en gvSIG |
|
41 |
Shows_Folders_in_gvSIG=Muestra directorios enlazados |
|
42 |
Folder_formats=Enlazar con directorios |
|
43 |
Bad_path=La ruta no existe |
|
44 |
SVG_format=Enlazar con ficheros SVG |
|
45 |
ultima_pagina= |
|
46 |
valor_incorrecto= |
|
47 |
View_Tools_Query= |
trunk/extensions/extHyperlink/src/org/gvsig/hyperlink/actions/FolderFormat.java | ||
---|---|---|
1 |
package org.gvsig.hyperlink.actions; |
|
2 |
|
|
3 |
import java.awt.Desktop; |
|
4 |
import java.io.File; |
|
5 |
import java.io.IOException; |
|
6 |
import java.io.Serializable; |
|
7 |
import java.net.URI; |
|
8 |
|
|
9 |
import javax.swing.JOptionPane; |
|
10 |
|
|
11 |
import org.apache.log4j.Logger; |
|
12 |
import org.gvsig.hyperlink.AbstractActionManager; |
|
13 |
import org.gvsig.hyperlink.AbstractHyperLinkPanel; |
|
14 |
import org.gvsig.hyperlink.LinkControls; |
|
15 |
|
|
16 |
import com.iver.andami.PluginServices; |
|
17 |
|
|
18 |
/** |
|
19 |
* This class manages the opening of the system file explorer pointing to the path |
|
20 |
* in the hyperlink field. |
|
21 |
* |
|
22 |
* @author Pablo Sanxiao <psanxiao@icarto.es> |
|
23 |
*/ |
|
24 |
|
|
25 |
public class FolderFormat extends AbstractActionManager implements Serializable{ |
|
26 |
/** |
|
27 |
* |
|
28 |
*/ |
|
29 |
private static final long serialVersionUID = 1L; |
|
30 |
public static final String actionCode = "Folder_format"; |
|
31 |
private static Logger logger = Logger.getLogger(FolderFormat.class.getName()); |
|
32 |
|
|
33 |
|
|
34 |
public String getActionCode() { |
|
35 |
return actionCode; |
|
36 |
} |
|
37 |
|
|
38 |
public boolean hasPanel() { |
|
39 |
return false; |
|
40 |
} |
|
41 |
|
|
42 |
public void showDocument(URI doc) { |
|
43 |
File folder = new File(doc.getPath()); |
|
44 |
if (folder.exists()) { |
|
45 |
Desktop desktop = Desktop.getDesktop(); |
|
46 |
try { |
|
47 |
desktop.open(folder); |
|
48 |
} catch (IOException e1) { |
|
49 |
logger.error(PluginServices.getText(this, "Cant_open_folder"), e1); |
|
50 |
JOptionPane.showMessageDialog(null, PluginServices.getText(this, "Cant_open_folder") + " : " + folder.getAbsolutePath()); |
|
51 |
} |
|
52 |
|
|
53 |
}else { |
|
54 |
JOptionPane.showMessageDialog(null, PluginServices.getText(this, "Bad_path") + " : " + folder.getAbsolutePath()); |
|
55 |
} |
|
56 |
} |
|
57 |
|
|
58 |
public String getDescription() { |
|
59 |
return PluginServices.getText(this, "Shows_Folders_in_gvSIG"); |
|
60 |
} |
|
61 |
|
|
62 |
public String getName() { |
|
63 |
return PluginServices.getText(this, "Folder_formats"); |
|
64 |
} |
|
65 |
|
|
66 |
public AbstractHyperLinkPanel createPanel(URI doc) |
|
67 |
throws UnsupportedOperationException { |
|
68 |
return null; |
|
69 |
} |
|
70 |
|
|
71 |
} |
|
72 |
|
|
0 | 73 |
trunk/extensions/extHyperlink/src/org/gvsig/hyperlink/LinkControls.java | ||
---|---|---|
49 | 49 |
import java.util.Map; |
50 | 50 |
|
51 | 51 |
import org.apache.log4j.Logger; |
52 |
import org.gvsig.hyperlink.actions.FolderFormat; |
|
52 | 53 |
import org.gvsig.hyperlink.actions.ImgFormat; |
53 | 54 |
import org.gvsig.hyperlink.actions.LoadRasterLayer; |
54 | 55 |
import org.gvsig.hyperlink.actions.LoadVectorLayer; |
... | ... | |
93 | 94 |
private static final int LEGACY_HTML_TYPE = 1; |
94 | 95 |
private static final int LEGACY_PDF_TYPE = 2; |
95 | 96 |
private static final int LEGACY_SVG_TYPE = 3; |
97 |
private static final int LEGACY_FOLDER_TYPE = 4; |
|
96 | 98 |
|
97 | 99 |
/* |
98 | 100 |
* @see com.iver.andami.plugins.IExtension#execute(java.lang.String) |
... | ... | |
172 | 174 |
return PdfFormat.actionCode; |
173 | 175 |
case LEGACY_SVG_TYPE: |
174 | 176 |
return SvgFormat.actionCode; |
177 |
case LEGACY_FOLDER_TYPE: |
|
178 |
return FolderFormat.actionCode; |
|
175 | 179 |
case LEGACY_HTML_TYPE: |
176 | 180 |
default: |
177 | 181 |
return TxtFormat.actionCode; |
... | ... | |
256 | 260 |
extensionPoints.add(ACTIONSEXTENSIONPOINT, tmpAction.getActionCode(), tmpAction); |
257 | 261 |
tmpAction = new SvgFormat(); |
258 | 262 |
extensionPoints.add(ACTIONSEXTENSIONPOINT, tmpAction.getActionCode(), tmpAction); |
263 |
tmpAction = new FolderFormat(); |
|
264 |
extensionPoints.add(ACTIONSEXTENSIONPOINT, tmpAction.getActionCode(), tmpAction); |
|
259 | 265 |
} |
260 | 266 |
|
261 | 267 |
private void registerConfigPanel() { |
Also available in: Unified diff