Revision 1990
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Wed May 22 21:04:44 CEST 2024 |
|
2 |
buildNumber=320 |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/gvsigsh | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
|
|
3 |
#set -x |
|
4 |
|
|
5 |
cd $(dirname $0) |
|
6 |
|
|
7 |
if [ -f lib/org.gvsig.andami-2* ] ; then |
|
8 |
GVSIG_INSTALL_FOLDER=`dirname "$0"` |
|
9 |
else |
|
10 |
if [ -f lib/org.gvsig.scripting.app.mainplugin-* ] ; then |
|
11 |
GVSIG_INSTALL_FOLDER=`dirname "$0"`/../../.. |
|
12 |
else |
|
13 |
echo "Can't locate gvSIG installation folder" |
|
14 |
exit 1 |
|
15 |
fi |
|
16 |
fi |
|
17 |
|
|
18 |
cd "${GVSIG_INSTALL_FOLDER}" |
|
19 |
|
|
20 |
GVSIG_INSTALL_FOLDER="$PWD" |
|
21 |
|
|
22 |
. ./gvSIG.sh --lib $@ |
|
23 |
|
|
24 |
for pluginName in \ |
|
25 |
org.gvsig.app.document.table.app.mainplugin \ |
|
26 |
org.gvsig.app.mainplugin \ |
|
27 |
org.gvsig.csv.app.mainplugin \ |
|
28 |
org.gvsig.geodb.app.mainplugin \ |
|
29 |
org.gvsig.geometry.app.jts \ |
|
30 |
org.gvsig.h2spatial.app.mainplugin \ |
|
31 |
org.gvsig.installer.app.mainplugin \ |
|
32 |
org.gvsig.labeling.app.mainplugin \ |
|
33 |
org.gvsig.projection.app.proj4j \ |
|
34 |
org.gvsig.scripting.app.mainplugin \ |
|
35 |
org.gvsig.shp.app.mainplugin \ |
|
36 |
org.gvsig.snapping.app.mainplugin \ |
|
37 |
; |
|
38 |
do |
|
39 |
for i in "$GVSIG_INSTALL_FOLDER/gvSIG/extensiones/$pluginName/lib/"*.jar ; do |
|
40 |
if [ "$i" != "$GVSIG_INSTALL_FOLDER/gvSIG/extensiones/$pluginName/lib/*.jar" -a "$i" != "" ]; then |
|
41 |
add_classpath "$i" |
|
42 |
fi |
|
43 |
done |
|
44 |
for i in "$GVSIG_INSTALL_FOLDER/gvSIG/extensiones/$pluginName/lib/"*.zip ; do |
|
45 |
if [ "$i" != "$GVSIG_INSTALL_FOLDER/gvSIG/extensiones/$pluginName/lib/*.zip" -a "$i" != "" ]; then |
|
46 |
add_classpath "$i" |
|
47 |
fi |
|
48 |
done |
|
49 |
done |
|
50 |
|
|
51 |
GVSIG_LAUNCHER=org.gvsig.scripting.app.extension.ScriptingMain |
|
52 |
GVSIG_PARAMS="$@" |
|
53 |
|
|
54 |
launch_gvSIG |
|
55 |
|
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/plugin-persistence.def | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of plugin persistence org.gvsig.scripting.app.mainplugin. |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
<class name="org.gvsig.scripting.app.mainplugin"> |
|
9 |
<description>Persistence of scripting plugin</description> |
|
10 |
<fields> |
|
11 |
<field name="ComposerUseHisWindowManager" type="boolean" mandatory="true" defaultValue="true"> |
|
12 |
<description>When true the composer use his window manager instead of the gvSIG Window manager.</description> |
|
13 |
</field> |
|
14 |
</fields> |
|
15 |
</class> |
|
16 |
</classes> |
|
17 |
</definitions> |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1 |
_Scripting=Scripting |
|
2 |
_Show_scripting_launcher=Abrir lanzador de scripts |
|
3 |
_Show_scripting_composer=Abrir editor de scripts |
|
4 |
_Show_scripting_jython_console=Abrir consola Jython |
|
5 |
|
|
6 |
User=Usuario |
|
7 |
System=Sistema |
|
8 |
|
|
9 |
Accept=Aceptar |
|
10 |
Cancel=Cancelar |
|
11 |
Apply=Aplicar |
|
12 |
|
|
13 |
Retrieving_data=Recibiendo datos... |
|
14 |
|
|
15 |
File=Fichero |
|
16 |
New=Nuevo |
|
17 |
Close_document=Cerrar documento |
|
18 |
Close_all_documents=Cerrar todos los documentos |
|
19 |
Run=Ejecutar |
|
20 |
Save=Guardar |
|
21 |
Close=Cerrar |
|
22 |
Close_current_tab=Cerrar pesta\u00f1a actual |
|
23 |
Open_edition_mode=Abrir modo edici\u00f3n |
|
24 |
Run_selected_script=Ejecutar script seleccionado |
|
25 |
Delete_selected_script=Borrar script seleccionado |
|
26 |
Refresh_directories=Actualizar carpetas |
|
27 |
Move_files=Mover ficheros |
|
28 |
Set_file_preferences=Editar preferencias de fichero |
|
29 |
|
|
30 |
|
|
31 |
Edit=Editar |
|
32 |
Cut=Cortar |
|
33 |
Copy=Copiar |
|
34 |
Paste=Pegar |
|
35 |
Select_all=Seleccionar todo |
|
36 |
|
|
37 |
Tools=Herramientas |
|
38 |
Launcher=Lanzador de scripts |
|
39 |
Scripting_Launcher=Lanzador de scripts |
|
40 |
Scripting_Composer=Editor de scripts |
|
41 |
Jython_Console=Consola Jython |
|
42 |
Import_JavaDoc=Importar JavaDoc |
|
43 |
JavaDoc=Ayuda de Java (JavaDoc) |
|
44 |
Remove_JavaDoc=Eliminar JavaDoc |
|
45 |
Help_contents=Contenido de la ayuda |
|
46 |
About_scripts_editor=Acerca del editor de scripts |
|
47 |
Get_help=Ayuda |
|
48 |
Help=Ayuda |
|
49 |
_Package_script=Empaquetar script... |
|
50 |
_Package_help=Empaquetar ayuda... |
|
51 |
|
|
52 |
Problems=Errores |
|
53 |
Console=Consola |
|
54 |
|
|
55 |
Description=Descripci\u00f3n |
|
56 |
Resource=Recurso |
|
57 |
Location=Ubicaci\u00f3n |
|
58 |
|
|
59 |
no_line=sin l\u00ednea |
|
60 |
Line=L\u00ednea |
|
61 |
|
|
62 |
Welcome_message=Bienvenido al entorno de scripting |
|
63 |
|
|
64 |
Error_opening_in_edition_mode_title=Error al abrir fichero |
|
65 |
Error_opening_in_edition_mode=No se pudo abrir el fichero en modo edici\u00f3n |
|
66 |
|
|
67 |
New_Script=Nuevo elemento |
|
68 |
New_Script_Description=Crea un nuevo script, di\u00e1logo, proyecto, directorio |
|
69 |
|
|
70 |
Deleting_JavaDocs_successfully_title=Operaci\u00f3n realizada con \u00e9xito |
|
71 |
Deleting_JavaDocs_successfully=Eliminaci\u00f3n de los JavaDocs exitosa |
|
72 |
|
|
73 |
Import_JavaDoc_title=Importar JavaDocs desde los directorios de sistema al ScriptingFramework JavaDoc |
|
74 |
Remove_JavaDoc_title=Eliminar JavaDocs del ScriptingFramework JavaDoc |
|
75 |
|
|
76 |
projects_modified_title=Proyectos sin guardar |
|
77 |
projects_modified=Algunos proyectos han sido modificados.\u00bfSalvar cambios? |
|
78 |
project_modified=ha sido modificado.\u00bfSalvar cambios? |
|
79 |
|
|
80 |
Delete_all_title=Borrar el documento |
|
81 |
Delete_all_message=Esta acci\u00f3n elimina el documento o el directorio con todo su contenido. \u00bf Desea continuar ? |
|
82 |
|
|
83 |
About_us_title=Informaci\u00f3n de todos los contribuidores al proyecto gvSIG |
|
84 |
|
|
85 |
Success=Operaci\u00f3n realizada con \u00e9xito |
|
86 |
Error=Error |
|
87 |
Error_renaming=Inesperado error renombrando el fichero |
|
88 |
Error_moving=Inesperado error moviendo el fichero |
|
89 |
Error_help=Selecciona una ayuda |
|
90 |
Rename_succesfully=Renombrado del fichero realizado con \u00e9xito |
|
91 |
Select_first=Debe seleccionar un fichero primero |
|
92 |
help_key=No hay ayuda para el texto |
|
93 |
|
|
94 |
|
|
95 |
script_filesystem=script en el \u00e1rbol de directorio |
|
96 |
Move=Mover |
|
97 |
move_desc=Cambia la ubicaci\u00f3n del fichero seleccionado |
|
98 |
Rename=Renombrar |
|
99 |
rename_desc=Cambia el nombre y otras propiedades del fichero seleccionado |
|
100 |
Moving_succesfully=Reubicaci\u00f3n del fichero realizado con \u00e9xito |
|
101 |
|
|
102 |
Dialog=Di\u00e1logo |
|
103 |
Code=C\u00f3digo |
|
104 |
Properties=Propiedades |
|
105 |
|
|
106 |
current_name=Nombre actual |
|
107 |
new_name=Nuevo name |
|
108 |
rename_name_title=Cambiar el nombre del fichero |
|
109 |
more_properties=M\u00e1s propiedades |
|
110 |
|
|
111 |
Javadoc_remove=Selecciona el JavaDoc a eliminar |
|
112 |
no_Javadoc_remove=No hay JavaDoc para eliminar |
|
113 |
|
|
114 |
Name=Nombre |
|
115 |
Version=Versi\u00f3n |
|
116 |
Created_by=Creado por |
|
117 |
Description=Descripci\u00f3n |
|
118 |
Type=Tipo |
|
119 |
Language=Lenguaje |
|
120 |
Author=Autor |
|
121 |
Move_from=Mover desde |
|
122 |
Move_to=Destino |
|
123 |
Browse=Abrir |
|
124 |
Import_from=Importar desde |
|
125 |
|
|
126 |
Name_blank=El nombre no puede estar en blanco |
|
127 |
Name_exists=Este nombre ya existe. Debe elegir otro |
|
128 |
Import_success=Los JavaDocs se han importado satisfactoriamente |
|
129 |
JavaDoc_Error=Selecciona JavaDoc a importar |
|
130 |
|
|
131 |
go_to_line_Xhorizontal_ellipsisX=Ir a la l\u00ednea\u2026 |
|
132 |
find_Xhorizontal_ellipsisX=Buscar\u2026 |
|
133 |
replace_Xhorizontal_ellipsisX=Reemplazar\u2026 |
|
134 |
_Searching_autorun_scripts_Xhorizontal_ellipsisX=Buscando scripts de autoarranque... |
|
135 |
_Starting_XnameX=Iniciando {0}... |
|
136 |
_The_script_XscriptnameX_is_modified=El script "{0}" ha sido modificado. |
|
137 |
_Save_changes_XquestionX=\u00bfGuardar cambios? |
|
138 |
_Do_you_want_to_save_changes_XquestionX=\u00bfDesea guardar los cambios? |
|
139 |
|
|
140 |
_notice=Aviso |
|
141 |
_Initializing_the_scripting_plugin_Xhorizontal_ellipsisX=Inicializando el plugin de scripting... |
|
142 |
_Waiting_to_terminate=Esperando que termine. |
|
143 |
|
|
144 |
_Run_main_script=Ejecutar script principal |
|
145 |
_Select_main_script=Seleccionar script principal |
|
146 |
_Main_script_is_not_selected=No hay seleccionado un script como principal. |
|
147 |
_The_selected_script_is_invalid=El script seleccionado no es valido. |
|
148 |
_Do_you_want_to_select_one_and_execute_it=\u00bfDesea seleccionar uno y ejecutarlo? |
|
149 |
|
|
150 |
_The_changes_in_current_file_are_not_saved=Los cambios en el fichero corriente no han sido guardados. |
|
151 |
_Do_you_want_to_continue_and_discard_the_changes=\u00bfQuiere continuar y descartar los cambios? |
|
152 |
|
|
153 |
_There_was_a_problem_starting_the_application_It_is_convenient_that_you_close_it_and_start_it_again=Ha habido un problema durante el inicio de la aplicaci\u00f3n.\nEs conveniente que la cierre y vuelva a iniciarla. |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1 |
_Scripting=Scripting |
|
2 |
_Show_scripting_launcher=Show scripting launcher |
|
3 |
_Show_scripting_composer=Show scripting composer |
|
4 |
_Show_scripting_jython_console=Show Jython console |
|
5 |
|
|
6 |
User=User |
|
7 |
System=System |
|
8 |
|
|
9 |
Accept=Accept |
|
10 |
Cancel=Cancel |
|
11 |
Apply=Apply |
|
12 |
|
|
13 |
Retrieving_data=Retrieving data... |
|
14 |
|
|
15 |
File=File |
|
16 |
New=New |
|
17 |
Close_document=Close document |
|
18 |
Close_all_documents=Cloase all documents |
|
19 |
Run=Run |
|
20 |
Save=Save |
|
21 |
Close=Close |
|
22 |
Close_current_tab=Close current tab |
|
23 |
Open_edition_mode=Open edition mode |
|
24 |
Run_selected_script=Run selected script |
|
25 |
Delete_selected_script=Delete selected script |
|
26 |
Refresh_directories=Refresh directories |
|
27 |
Move_files=Move files |
|
28 |
Set_file_preferences=Set file preferences |
|
29 |
_Running_autorun_script_from_XnameX=Running autorun script from {0} |
|
30 |
|
|
31 |
Edit=Edit |
|
32 |
Cut=Cut |
|
33 |
Copy=Copy |
|
34 |
Paste=Paste |
|
35 |
Select_all=Select all |
|
36 |
|
|
37 |
Tools=Tools |
|
38 |
Launcher=Scripting Launcher |
|
39 |
Scripting_Launcher=Scripting Launcher |
|
40 |
Scripting_Composer=Scripting Composer |
|
41 |
Jython_Console=Jython console |
|
42 |
Import_JavaDoc=Import JavaDoc |
|
43 |
JavaDoc=Java Help (JavaDoc) |
|
44 |
Remove_JavaDoc=Remove JavaDoc |
|
45 |
Help_contents=Help contents |
|
46 |
About_scripts_editor=About scripts editor |
|
47 |
Get_help=Help |
|
48 |
Help=Help |
|
49 |
_Package_script=Package script... |
|
50 |
_Package_help=Package help... |
|
51 |
|
|
52 |
Problems=Errors |
|
53 |
Console=Console |
|
54 |
|
|
55 |
Description=Description |
|
56 |
Resource=Resource |
|
57 |
Location=Location |
|
58 |
|
|
59 |
no_line=no line |
|
60 |
Line=Line |
|
61 |
|
|
62 |
Welcome_message=Welcome to the scripting framework |
|
63 |
|
|
64 |
Error_opening_in_edition_mode_title=Error opening file in edition mode |
|
65 |
Error_opening_in_edition_mode=The file can't be opened in edition mode |
|
66 |
|
|
67 |
New_Script=New element |
|
68 |
New_Script_Description=Create a new script, dialog, project, directory |
|
69 |
|
|
70 |
Deleting_JavaDocs_successfully_title=Operation successful |
|
71 |
Deleting_JavaDocs_successfully=Deleting JavaDocs successfully |
|
72 |
|
|
73 |
Import_JavaDoc_title=Import JavaDocs from filesystem to ScriptingFramework JavaDoc |
|
74 |
Remove_JavaDoc_title=Remove JavaDocs from ScriptingFramework JavaDoc |
|
75 |
|
|
76 |
projects_modified_title=Projects without saving |
|
77 |
projects_modified=Some projects have been modified. Save changes? |
|
78 |
project_modified=has been modified. Save changes? |
|
79 |
|
|
80 |
Delete_all_title=Delete document |
|
81 |
Delete_all_message=This action removes the document or directory with all its content. Do you wish to continue ? |
|
82 |
|
|
83 |
About_us_title=Information about all the gvSIG's contributors |
|
84 |
|
|
85 |
Success=Operation done successfully |
|
86 |
Error=Error |
|
87 |
Error_renaming=Unexpected error renaming the file |
|
88 |
Error_moving=Unexpected error moving the file |
|
89 |
Error_help=Select help |
|
90 |
Rename_succesfully=Renaming successfully |
|
91 |
Select_first=Select a file first |
|
92 |
help_key=There isn't any help to this text |
|
93 |
|
|
94 |
|
|
95 |
script_filesystem=script filesystem |
|
96 |
Move=Move |
|
97 |
move_desc=Change location of selected file |
|
98 |
Rename=Rename |
|
99 |
rename_desc=Change the name and more properties of the selected file |
|
100 |
Moving_succesfully=File moved succesfully |
|
101 |
|
|
102 |
Dialog=Dialog |
|
103 |
Code=Code |
|
104 |
Properties=Properties |
|
105 |
|
|
106 |
current_name=Current name |
|
107 |
new_name=New name |
|
108 |
rename_name_title=Change filename |
|
109 |
more_properties=more properties |
|
110 |
|
|
111 |
Javadoc_remove=Choose JavaDoc to delete |
|
112 |
no_Javadoc_remove=There's no JavaDoc to delete |
|
113 |
|
|
114 |
Name=Name |
|
115 |
Version=Version |
|
116 |
Created_by=Create by |
|
117 |
Description=Description |
|
118 |
Type=Type |
|
119 |
Language=Language |
|
120 |
Author=Author |
|
121 |
Move_from=Move from |
|
122 |
Move_to=Move to |
|
123 |
Browse=Browse |
|
124 |
Import_from=Import from |
|
125 |
|
|
126 |
Name_blank=Name can't be blank |
|
127 |
Name_exists=This name already exists. Choose another one |
|
128 |
Import_success=JavaDocs imported successfully |
|
129 |
JavaDoc_Error=Select JavaDoc to import |
|
130 |
|
|
131 |
|
|
132 |
go_to_line_Xhorizontal_ellipsisX=Go To Line\u2026 |
|
133 |
find_Xhorizontal_ellipsisX=Find\u2026 |
|
134 |
replace_Xhorizontal_ellipsisX=Replace\u2026 |
|
135 |
|
|
136 |
_Searching_autorun_scripts_Xhorizontal_ellipsisX=Searching autorun scripts... |
|
137 |
_Starting_XnameX=Starting {0}... |
|
138 |
_The_script_XscriptnameX_is_modified=The script "{0}" has been modified. |
|
139 |
_Save_changes_XquestionX=Save changes ? |
|
140 |
_Do_you_want_to_save_changes_XquestionX=Do you want to save changes ? |
|
141 |
|
|
142 |
_notice=Notice |
|
143 |
_Initializing_the_scripting_plugin_Xhorizontal_ellipsisX=Initializing the scripting plugin... |
|
144 |
_Waiting_to_terminate=Waiting to terminate. |
|
145 |
|
|
146 |
_Run_main_script=Run main script |
|
147 |
_Select_main_script=Select main script |
|
148 |
_Main_script_is_not_selected=Main script is not selected. |
|
149 |
_The_selected_script_is_invalid=The selected script is not valid. |
|
150 |
_Do_you_want_to_select_one_and_execute_it=Do you want to select one and execute it? |
|
151 |
|
|
152 |
|
|
153 |
_The_changes_in_current_file_are_not_saved=The changes in the current file are not saved. |
|
154 |
_Do_you_want_to_continue_and_discard_the_changes=Do you want to continue and discard the changes? |
|
155 |
|
|
156 |
_There_was_a_problem_starting_the_application_It_is_convenient_that_you_close_it_and_start_it_again=There was a problem starting the application.\nIt is convenient that you close it and start it again. |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/License_Chalkwork_icons.txt | ||
---|---|---|
1 |
---------------------------------------------- |
|
2 |
CHALKWORK BASIC |
|
3 |
by Dave Shea |
|
4 |
mezzoblue.com/icons/chalkwork/basic |
|
5 |
---------------------------------------------- |
|
6 |
CHALKWORK COMMERCE |
|
7 |
by Dave Shea |
|
8 |
mezzoblue.com/icons/chalkwork/commerce |
|
9 |
---------------------------------------------- |
|
10 |
CHALKWORK EDITING CONTROLS |
|
11 |
by Dave Shea |
|
12 |
mezzoblue.com/icons/chalkwork/editing-controls |
|
13 |
---------------------------------------------- |
|
14 |
CHALKWORK INFORMATION MANAGEMENT |
|
15 |
by Dave Shea |
|
16 |
mezzoblue.com/icons/chalkwork/information-management |
|
17 |
---------------------------------------------- |
|
18 |
CHALKWORK HTML (Free Version) |
|
19 |
by Dave Shea |
|
20 |
mezzoblue.com/icons/chalkwork/html |
|
21 |
---------------------------------------------- |
|
22 |
|
|
23 |
Thanks for your interest in the Chalkwork Family. Please consider subscribing to the Chalkwork news feed, which will announce new releases in the family as well as inform existing users of updates if any occur. |
|
24 |
|
|
25 |
http://mezzoblue.com/icons/chalkwork/news.xml |
|
26 |
|
|
27 |
- Dave Shea |
|
28 |
mezzoblue.com |
|
29 |
@mezzoblue on Twitter |
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
LICENSE AGREEMENT |
|
35 |
---------------------------------------------- |
|
36 |
By downloading this icon set, you agree to abide by the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License under which these icons are being made available for non-commercial use. |
|
37 |
|
|
38 |
Applicable Creative Commons License: http://creativecommons.org/licenses/by-nc-sa/3.0/ |
|
39 |
Attribution and additional license information: http://www.mezzoblue.com/icons/license/#license-cc |
|
40 |
|
|
41 |
By purchasing a Chalkwork Commercial License, you agree to abide by the Chalkwork Royalty-Free Stock Icon License Agreement under which these icons are being made available for commercial use. |
|
42 |
|
|
43 |
Chalkwork Commercial License: http://www.mezzoblue.com/icons/license/#license-cc |
|
44 |
|
|
45 |
This notice must be included any time these icons are redistributed. |
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
---------------------------------------------- |
|
51 |
ICON FOLDER INDEX |
|
52 |
---------------------------------------------- |
|
53 |
The icon files are broken down by file format. Due to some formats resulting in higher quality results, those are considered the preferred files and are located in the folder titled 'High Quality'. This package should contain the following folders in this hierarchy: |
|
54 |
|
|
55 |
High Quality |
|
56 |
ICNS (Mac) |
|
57 |
ICO (Windows) |
|
58 |
PNG |
|
59 |
TIF |
|
60 |
Lower Quality |
|
61 |
BMP |
|
62 |
GIF |
|
63 |
|
|
64 |
Within each of the second-level folders, you'll find 102 further folders, one for each icon and its variations. Depending on the file format, you may find multiple sizes within these folders along with any icon variations that may exist. Please note that ICO and ICNS files contain all applicable sizes within a single file, and that ICNS files do not support the 24x24 icon size. |
|
65 |
|
|
66 |
|
|
67 |
---------------------------------------------- |
|
68 |
CHALKWORK INFORMATION MANAGEMENT ICON INDEX |
|
69 |
* indicates that variations of this icon are provided within this set |
|
70 |
--------------------------------------------------------------------- |
|
71 |
|
|
72 |
Ad |
|
73 |
- Ad (Dollars) * |
|
74 |
- Ad (Euros) * |
|
75 |
- Ad (Pounds) * |
|
76 |
Address Book * |
|
77 |
Announcement * |
|
78 |
API |
|
79 |
Archive * |
|
80 |
Attachment * |
|
81 |
Authenticate |
|
82 |
Blog * |
|
83 |
Bookmark * |
|
84 |
Briefcase * |
|
85 |
Category * |
|
86 |
Chart (Area) * |
|
87 |
Chart (Bar) * |
|
88 |
Chart (Pie) * |
|
89 |
Collapse |
|
90 |
Colour Palette * |
|
91 |
Continue |
|
92 |
Control Panel |
|
93 |
Conversation * |
|
94 |
Create |
|
95 |
Dashboard * |
|
96 |
Database * |
|
97 |
Dictionary * |
|
98 |
Document (Area Chart) * |
|
99 |
Document (Bar Chart) * |
|
100 |
Document (Blank) * |
|
101 |
Document (Form) * |
|
102 |
Document (Photo) * |
|
103 |
Document (Pie Chart) * |
|
104 |
Document (Secure) * |
|
105 |
Document (Shred) |
|
106 |
Documents (x2) * |
|
107 |
Documents (x3) * |
|
108 |
Download |
|
109 |
Draw |
|
110 |
Entry * |
|
111 |
Excerpt * |
|
112 |
Expand |
|
113 |
Export |
|
114 |
Fax * |
|
115 |
File * |
|
116 |
- File (Closed) |
|
117 |
- File (Open) |
|
118 |
Filter * |
|
119 |
Flag * |
|
120 |
Flag (Black) * |
|
121 |
Flag (Blue) * |
|
122 |
Flag (Brown) * |
|
123 |
Flag (Green) * |
|
124 |
Flag (Light Blue) * |
|
125 |
Flag (Orange) * |
|
126 |
Flag (Pink) * |
|
127 |
Flag (Purple) * |
|
128 |
Flag (Red) * |
|
129 |
Flag (White) * |
|
130 |
Flag (Yellow) * |
|
131 |
Formatting |
|
132 |
Hierarchy * |
|
133 |
Import |
|
134 |
Inbox * |
|
135 |
Index * |
|
136 |
List * |
|
137 |
Log * |
|
138 |
Map * |
|
139 |
Mobile Phone * |
|
140 |
Moderate |
|
141 |
Module * |
|
142 |
News * |
|
143 |
Notes * |
|
144 |
Notification * |
|
145 |
Office * |
|
146 |
Package * |
|
147 |
Password |
|
148 |
Phone * |
|
149 |
- Phone (Batphone) * |
|
150 |
- Phone (Office) * |
|
151 |
Plugin * |
|
152 |
Preview |
|
153 |
Publish |
|
154 |
Read More |
|
155 |
Rebuild |
|
156 |
Relationship (Data) * |
|
157 |
Relationship (People) * |
|
158 |
Rotate Left |
|
159 |
Rotate Right |
|
160 |
Schedule * |
|
161 |
- Schedule (Noun) |
|
162 |
- Schedule (Verb) |
|
163 |
Script * |
|
164 |
Security * |
|
165 |
Sign In |
|
166 |
Sign Out |
|
167 |
Sort Down |
|
168 |
Sort Up |
|
169 |
Spam * |
|
170 |
Statistics * |
|
171 |
Status * |
|
172 |
- Status (Green) |
|
173 |
- Status (Off) |
|
174 |
- Status (On) |
|
175 |
- Status (Red) |
|
176 |
- Status (Yellow) |
|
177 |
Support * |
|
178 |
Sync |
|
179 |
Template * |
|
180 |
Ticket * |
|
181 |
Time Zone * |
|
182 |
Tools * |
|
183 |
Trackback |
|
184 |
View (Columns) |
|
185 |
View (Lists) |
|
186 |
View (Thumbnails) |
|
187 |
Weather * |
|
188 |
Write |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/package.rst | ||
---|---|---|
1 |
|
|
2 |
This plugin provides support for scripting to gvSIG. |
|
3 |
Among other things it contains: |
|
4 |
|
|
5 |
- The gvSIG scripting engine |
|
6 |
- The gvSIG script editor |
|
7 |
- Script engines for: |
|
8 |
- Jython |
|
9 |
- Groovy |
|
10 |
- javascript |
|
11 |
- Renjin |
|
12 |
|
|
13 |
- The script install module for the add-on manager. |
|
14 |
- Utilities to generate packages of complements with our scripts. |
|
15 |
- Python libraries as: |
|
16 |
- Six - Utilities for writing code that runs on Python 2 and 3 |
|
17 |
- PyLint - Python source code analyzer |
|
18 |
- Pygments - syntax highlighting package |
|
19 |
- CSSUtils - CSS Cascading Style Sheets library |
|
20 |
- Docutils - Python Documentation Utilities |
|
21 |
- geopy - client for several popular geocoding web services |
|
22 |
- PyInliner - CSS-to-inline-styles conversion tool for HTML |
|
23 |
- Statistics - functions for calculating statistics of data |
|
24 |
- Cartodb - simple CartoDB client to perform requests against the CartoDB API |
|
25 |
|
|
26 |
- Java libraries to use from scripting as: |
|
27 |
- Abeille forms deseigner |
|
28 |
- jOpenDocument |
|
29 |
- JNumeric |
|
30 |
- CSSBox |
|
31 |
|
|
32 |
This plugin can be configured to be preinstalled automatically, allowing |
|
33 |
"Script" type plugins to be installed during the application installation process. |
|
34 |
To do this, the following entries must be added to the "packages.properties" |
|
35 |
of gvspks:: |
|
36 |
|
|
37 |
installers=scripts |
|
38 |
installer.scripts.initializer=org.gvsig.scripting.app.extension.ScriptsInstallerInitializer |
|
39 |
installer.scripts.package.code=org.gvsig.scripting.app.mainplugin |
|
40 |
installer.scripts.factory.name=Script |
|
41 |
installer.scripts.libs=lib |
|
42 |
|
|
43 |
If the "installers" entry already exists, add "scripts" to the end separating |
|
44 |
it with a space. |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/lib-2_0_0/geom.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
# |
|
3 |
# File: gvsig.py |
|
4 |
# |
|
5 |
# Copyright (c) 2011 by Model Driven Development sl and Antonio Carrasco Valero |
|
6 |
# |
|
7 |
# GNU General Public License (GPL) |
|
8 |
# |
|
9 |
# This program is free software; you can redistribute it and/or |
|
10 |
# modify it under the terms of the GNU General Public License |
|
11 |
# as published by the Free Software Foundation; either version 2 |
|
12 |
# of the License, or (at your option) any later version. |
|
13 |
# |
|
14 |
# This program is distributed in the hope that it will be useful, |
|
15 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
# GNU General Public License for more details. |
|
18 |
# |
|
19 |
# You should have received a copy of the GNU General Public License |
|
20 |
# along with this program; if not, write to the Free Software |
|
21 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
22 |
# 02110-1301, USA. |
|
23 |
# |
|
24 |
# |
|
25 |
|
|
26 |
""" |
|
27 |
Utility functions to manage gvSIG geometries |
|
28 |
""" |
|
29 |
|
|
30 |
__author__ = """Antonio Carrasco Valero |
|
31 |
Model Driven Development sl and Antonio Carrasco Valero |
|
32 |
<carrasco@modeldd.org> |
|
33 |
Victor Acevedo Royer <vacevedo@gvsig.com> <vacevedor@gmail.com> |
|
34 |
""" |
|
35 |
|
|
36 |
__docformat__ = 'plaintext' |
|
37 |
|
|
38 |
|
|
39 |
from org.gvsig.fmap.geom import Geometry, GeometryLocator |
|
40 |
from org.gvsig.fmap.geom.primitive import Point |
|
41 |
from org.gvsig.tools import ToolsLocator |
|
42 |
|
|
43 |
|
|
44 |
#GeometryTypes |
|
45 |
AGGREGATE = Geometry.TYPES.AGGREGATE |
|
46 |
ARC = Geometry.TYPES.ARC |
|
47 |
CIRCLE = Geometry.TYPES.CIRCLE |
|
48 |
CURVE = Geometry.TYPES.CURVE |
|
49 |
ELLIPSE = Geometry.TYPES.ELLIPSE |
|
50 |
ELLIPTICARC = Geometry.TYPES.ELLIPTICARC |
|
51 |
GEOMETRY = Geometry.TYPES.GEOMETRY |
|
52 |
MULTICURVE = Geometry.TYPES.MULTICURVE |
|
53 |
MULTIPOINT = Geometry.TYPES.MULTIPOINT |
|
54 |
MULTISOLID = Geometry.TYPES.MULTISOLID |
|
55 |
MULTISURFACE = Geometry.TYPES.MULTISURFACE |
|
56 |
NULL = Geometry.TYPES.NULL |
|
57 |
POINT = Geometry.TYPES.POINT |
|
58 |
SOLID = Geometry.TYPES.SOLID |
|
59 |
SPLINE = Geometry.TYPES.SPLINE |
|
60 |
SURFACE = Geometry.TYPES.SURFACE |
|
61 |
|
|
62 |
# Common named geometry types |
|
63 |
POLYGON = Geometry.TYPES.SURFACE |
|
64 |
LINE = Geometry.TYPES.CURVE |
|
65 |
MULTILINE = Geometry.TYPES.MULTICURVE |
|
66 |
MULTIPOLYGON = Geometry.TYPES.MULTISURFACE |
|
67 |
|
|
68 |
# geometrySubTypes |
|
69 |
D2 = Geometry.SUBTYPES.GEOM2D |
|
70 |
D2M = Geometry.SUBTYPES.GEOM2DM |
|
71 |
D3 = Geometry.SUBTYPES.GEOM3D |
|
72 |
D3M = Geometry.SUBTYPES.GEOM3DM |
|
73 |
UNKNOWN = Geometry.SUBTYPES.UNKNOWN |
|
74 |
|
|
75 |
def createGeometry(type, subtype=D2): |
|
76 |
""" |
|
77 |
Returns a new geometry with a concrete type and subtype or None if can't |
|
78 |
create geometry. |
|
79 |
:param type: geometry type |
|
80 |
:type type: string |
|
81 |
:param subtype: geometry subtype |
|
82 |
:type type: string |
|
83 |
:return: geometry |
|
84 |
:rtype: geometry |
|
85 |
""" |
|
86 |
try: |
|
87 |
geometryManager = GeometryLocator.getGeometryManager() |
|
88 |
geometry = geometryManager.create(type, subtype) |
|
89 |
except: |
|
90 |
return None |
|
91 |
return geometry |
|
92 |
|
|
93 |
def createPoint(x=0, y=0, subtype=D2): |
|
94 |
""" |
|
95 |
Returns a new point with a subtype and sets the value for the X and the Y |
|
96 |
coordinates (default 0,0) or None if can't create point |
|
97 |
:param x: X coordinate value |
|
98 |
:param y: Y coordinate value |
|
99 |
:type x: double |
|
100 |
:type y: double |
|
101 |
:return: Point |
|
102 |
:rtype: Point |
|
103 |
""" |
|
104 |
try: |
|
105 |
geometryManager = GeometryLocator.getGeometryManager() |
|
106 |
point = geometryManager.createPoint(x, y, subtype) |
|
107 |
except: |
|
108 |
return None |
|
109 |
|
|
110 |
return point |
|
111 |
|
|
112 |
def createMultiPoint(subtype=D2, points=None): |
|
113 |
""" |
|
114 |
Returns a new multipoint with a subtype from a list of Points instances. |
|
115 |
Also values of X and Y tuples like ([x1, y1], [x2, y2], ...., [xn, yn]) are |
|
116 |
allowed. If not points returns empty multipoint geometry. If can't create |
|
117 |
geometry return None. |
|
118 |
:param points: list of points |
|
119 |
:type points: list |
|
120 |
:return: multipoint |
|
121 |
:rtype: multipoint |
|
122 |
""" |
|
123 |
multipoint = createGeometry(MULTIPOINT, subtype) |
|
124 |
if all(points, multipoint): |
|
125 |
try: |
|
126 |
for point in points: |
|
127 |
multipoint.addPrimitive(point) |
|
128 |
except: |
|
129 |
return None |
|
130 |
|
|
131 |
return multipoint |
|
132 |
|
|
133 |
def createPolygon(subtype=D2, vertexes=None): |
|
134 |
""" |
|
135 |
Returns a new polygon with a subtype. Or None if can't create the geometry |
|
136 |
:return: polygon |
|
137 |
:rtype: Geometry |
|
138 |
""" |
|
139 |
polygon = createGeometry(SURFACE, subtype) |
|
140 |
if all(vertexes, polygon): |
|
141 |
try: |
|
142 |
for vertex in vertexes: |
|
143 |
polygon.addPoint(vertex) |
|
144 |
polygon.closePrimitive() |
|
145 |
except: |
|
146 |
return None |
|
147 |
return polygon |
|
148 |
|
|
149 |
def createMultiPolygon(subtype=D2, polygons=None): |
|
150 |
""" |
|
151 |
Returns a new multipolygon with a subtype. or None if can't create geometry |
|
152 |
:return: multipolygon |
|
153 |
:rtype: Geometry |
|
154 |
""" |
|
155 |
multipolygon = createGeometry(MULTISURFACE, subtype) |
|
156 |
return multipolygon |
|
157 |
|
|
158 |
def createLine(subtype=D2, vertexes=None): |
|
159 |
""" |
|
160 |
Returns a new line with a subtype or None if can't create geometry |
|
161 |
:return: polygon |
|
162 |
:rtype: Geometry |
|
163 |
""" |
|
164 |
line = createGeometry(CURVE, subtype) |
|
165 |
return line |
|
166 |
|
|
167 |
def createMultiLine(subtype=D2, lines = None): |
|
168 |
""" |
|
169 |
Create a new multiline with a subtype or None if can't create geometry |
|
170 |
:return: multiline |
|
171 |
:rtype: Geometry |
|
172 |
""" |
|
173 |
multiline = createGeometry(MULTILINE, subtype) |
|
174 |
return multiline |
|
175 |
|
|
176 |
def createEnvelope(pointMax=None, pointMin=None, dimension=2): |
|
177 |
""" |
|
178 |
Returns envelope as a minimum bounding box or rectangle. This envelope is |
|
179 |
equivalent to the GM_Envelope specified in ISO 19107. |
|
180 |
:param pointMax: |
|
181 |
:type pointMax: geometry POINT |
|
182 |
:param pointMin: |
|
183 |
:type pointMin: geometry POINT |
|
184 |
""" |
|
185 |
geometryManager = GeometryLocator.getGeometryManager() |
|
186 |
|
|
187 |
if all((pointMax, pointMin)): |
|
188 |
envelope = geometryManager.createEnvelope(pointMax, pointMin) |
|
189 |
else: |
|
190 |
envelope = geometryManager.createEnvelope() |
|
191 |
|
|
192 |
return envelope |
|
193 |
|
|
194 |
|
|
195 |
def main(): |
|
196 |
point = createPoint(1,1) |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/lib-2_0_0/simpleui.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
# |
|
3 |
# File: simpleui.py |
|
4 |
# |
|
5 |
# Copyright (c) 2011 by Model Driven Development sl and Antonio Carrasco Valero |
|
6 |
# |
|
7 |
# GNU General Public License (GPL) |
|
8 |
# |
|
9 |
# This program is free software; you can redistribute it and/or |
|
10 |
# modify it under the terms of the GNU General Public License |
|
11 |
# as published by the Free Software Foundation; either version 2 |
|
12 |
# of the License, or (at your option) any later version. |
|
13 |
# |
|
14 |
# This program is distributed in the hope that it will be useful, |
|
15 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
# GNU General Public License for more details. |
|
18 |
# |
|
19 |
# You should have received a copy of the GNU General Public License |
|
20 |
# along with this program; if not, write to the Free Software |
|
21 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
22 |
# 02110-1301, USA. |
|
23 |
# |
|
24 |
# |
|
25 |
|
|
26 |
__author__ = """Antonio Carrasco Valero |
|
27 |
Model Driven Development sl and Antonio Carrasco Valero |
|
28 |
<carrasco@modeldd.org>""" |
|
29 |
__docformat__ = 'plaintext' |
|
30 |
|
|
31 |
|
|
32 |
from gvsig import * |
|
33 |
|
|
34 |
def loadViewsInCombo(dialog, combo): |
|
35 |
cleanCombo(dialog, combo) |
|
36 |
project = currentProject() |
|
37 |
print "project" |
|
38 |
views = project.getViews() |
|
39 |
print "views" |
|
40 |
if isinstance(combo, str): |
|
41 |
combo = dialog.find(combo) |
|
42 |
print "combo" |
|
43 |
if combo == None: |
|
44 |
return |
|
45 |
print "combo not None" |
|
46 |
for view in views: |
|
47 |
print "create view choice" |
|
48 |
ch = dialog.create("choice") |
|
49 |
dialog.setString(ch, "name", view.getName()) |
|
50 |
dialog.setString(ch, "text", view.getName()) |
|
51 |
#FIXME |
|
52 |
#-------------------- |
|
53 |
|
|
54 |
dialog.putProperty(ch, "view", View(view)) |
|
55 |
#---------------------- |
|
56 |
dialog.add(combo, ch) |
|
57 |
print "Finish add combo choices" |
|
58 |
|
|
59 |
|
|
60 |
def loadLayersInCombo(dialog, combo, viewName): |
|
61 |
if isinstance(combo, str): |
|
62 |
combo = dialog.find(combo) |
|
63 |
p = currentProject() |
|
64 |
view = p.getView(viewName) |
|
65 |
|
|
66 |
if combo == None or view == None: |
|
67 |
return |
|
68 |
cleanCombo(dialog, combo) |
|
69 |
|
|
70 |
ls = view.getLayers() |
|
71 |
try: |
|
72 |
for i in xrange(len(ls)): |
|
73 |
l = ls.getLayer(i) |
|
74 |
ch = dialog.create("choice") |
|
75 |
dialog.setString(ch, "name", l.getName()) |
|
76 |
dialog.setString(ch, "text", l.getName()) #FIXME |
|
77 |
#-------------------- |
|
78 |
dialog.putProperty(ch, "layer",Layer(l)) |
|
79 |
#---------------------- |
|
80 |
|
|
81 |
dialog.add(combo, ch) |
|
82 |
except Exception, ex: |
|
83 |
print "Error %s"%repr(ex) |
|
84 |
|
|
85 |
|
|
86 |
print "Finish add layers combo choices" |
|
87 |
|
|
88 |
def cleanCombo(dialog, combo): |
|
89 |
print "cleanCombo" |
|
90 |
if isinstance(combo, str): |
|
91 |
combo = dialog.find(combo) |
|
92 |
if combo == None: |
|
93 |
return |
|
94 |
choices = dialog.getItems(combo) |
|
95 |
if len(choices) >0: |
|
96 |
for ch in choices: |
|
97 |
dialog.remove(ch) |
|
98 |
|
|
99 |
def getSelectedView(dialog, combo): |
|
100 |
if isinstance(combo, str): |
|
101 |
combo = dialog.find(combo) |
|
102 |
choice = dialog.getSelectedItem(combo) |
|
103 |
if choice == None: |
|
104 |
return |
|
105 |
viewName = dialog.getString(choice,"name") |
|
106 |
#FIXME |
|
107 |
""" |
|
108 |
project = currentProject() |
|
109 |
view = project.getView(viewName) |
|
110 |
""" |
|
111 |
view = dialog.getProperty(choice, "view") |
|
112 |
return view |
|
113 |
|
|
114 |
def getSelectedViewName(dialog, combo): |
|
115 |
v = getSelectedView(dialog, combo) |
|
116 |
return v.getName() |
|
117 |
|
|
118 |
def getSelectedLayer(dialog, combo): |
|
119 |
if isinstance(combo, str): |
|
120 |
combo = dialog.find(combo) |
|
121 |
choice = dialog.getSelectedItem(combo) |
|
122 |
if choice == None: |
|
123 |
return |
|
124 |
#FIXME |
|
125 |
""" |
|
126 |
layerName = dialog.getString(choice,"name") |
|
127 |
project = currentProject() |
|
128 |
layer = project.getView(layerName) |
|
129 |
""" |
|
130 |
layer = dialog.getProperty(choice,"layer") |
|
131 |
print layer.getName() |
|
132 |
return layer |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/lib-2_0_0/commonsdialog.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
# |
|
3 |
# File: commonsdialog.py |
|
4 |
# |
|
5 |
# Copyright (c) 2011 by Model Driven Development sl and Antonio Carrasco Valero |
|
6 |
# |
|
7 |
# GNU General Public License (GPL) |
|
8 |
# |
|
9 |
# This program is free software; you can redistribute it and/or |
|
10 |
# modify it under the terms of the GNU General Public License |
|
11 |
# as published by the Free Software Foundation; either version 2 |
|
12 |
# of the License, or (at your option) any later version. |
|
13 |
# |
|
14 |
# This program is distributed in the hope that it will be useful, |
|
15 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
# GNU General Public License for more details. |
|
18 |
# |
|
19 |
# You should have received a copy of the GNU General Public License |
|
20 |
# along with this program; if not, write to the Free Software |
|
21 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
22 |
# 02110-1301, USA. |
|
23 |
# |
|
24 |
# |
|
25 |
|
|
26 |
__author__ = """Antonio Carrasco Valero |
|
27 |
Model Driven Development sl and Antonio Carrasco Valero |
|
28 |
<carrasco@modeldd.org> |
|
29 |
Victor Acevedo Royer <vacevedo@gvsig.com> <vacevedor@gmail.com> |
|
30 |
""" |
|
31 |
__docformat__ = 'plaintext' |
|
32 |
|
|
33 |
|
|
34 |
from javax.swing import JFileChooser |
|
35 |
from javax.swing.filechooser import FileNameExtensionFilter |
|
36 |
|
|
37 |
#from org.gvsig.app import ApplicationLocator |
|
38 |
|
|
39 |
from org.gvsig.andami.ui.mdiFrame import DefaultThreadSafeDialogs |
|
40 |
|
|
41 |
#==================================== |
|
42 |
# SWING |
|
43 |
|
|
44 |
# |
|
45 |
#messageType options |
|
46 |
FORBIDEN = 0 |
|
47 |
IDEA= 1 |
|
48 |
WARNING= 2 |
|
49 |
QUESTION= 3 |
|
50 |
|
|
51 |
# |
|
52 |
#Confirmdialog optionType Options |
|
53 |
YES_NO = 0 |
|
54 |
YES_NO_CANCEL = 1 |
|
55 |
ACEPT_CANCEL = 2 |
|
56 |
|
|
57 |
#filechooser options |
|
58 |
OPEN_FILE = 0 |
|
59 |
OPEN_DIRECTORY = 1 |
|
60 |
SAVE_FILE = 2 |
|
61 |
|
|
62 |
#filechooser selectionMode |
|
63 |
FILES_ONLY = JFileChooser.FILES_ONLY |
|
64 |
DIRECTORIES_ONLY = JFileChooser.DIRECTORIES_ONLY |
|
65 |
|
|
66 |
|
|
67 |
def msgbox(message, title="", messageType=IDEA): |
|
68 |
"""Shows a message dialog with ok button only |
|
69 |
:param message: text to present in the dialog |
|
70 |
:param title: title of the dialog |
|
71 |
:param messageType: type of icon to use. |
|
72 |
""" |
|
73 |
DefaultThreadSafeDialogs().messageDialog(message, title, messageType) |
|
74 |
|
|
75 |
|
|
76 |
def inputbox(message, title="", messageType=IDEA, initialValue=""): |
|
77 |
""" |
|
78 |
Shows a input dialog. |
|
79 |
:param message: text to present in the dialog |
|
80 |
:param title: title of the dialog |
|
81 |
:messageType: type of icon to use |
|
82 |
:initialValue: Initial value of the inputbox |
|
83 |
""" |
|
84 |
return DefaultThreadSafeDialogs().inputDialog(message, title, |
|
85 |
messageType, initialValue) |
|
86 |
|
|
87 |
|
|
88 |
def confirmDialog(message, title="", optionType=YES_NO, messageType=IDEA): |
|
89 |
""" |
|
90 |
Create a message dialog with options button |
|
91 |
:param message: text to present in the dialog |
|
92 |
:param title: title of the dialog |
|
93 |
:optionType: bottons to show |
|
94 |
:param messageType: type of icon to use. |
|
95 |
""" |
|
96 |
#0: yes/no option |
|
97 |
#1: yes/no/cancelar |
|
98 |
#2: accept/cancel |
|
99 |
return DefaultThreadSafeDialogs().confirmDialog(message, title, |
|
100 |
optionType, messageType) |
|
101 |
|
|
102 |
def filechooser(option, title="", initialPath=None, |
|
103 |
multiselection=False, filter = None, fileHidingEnabled=True): |
|
104 |
""" |
|
105 |
Allows configuration parameters to filechooser dialogs |
|
106 |
:int option: file chooser selection mode. Allowed values: |
|
107 |
OPEN_FILE, OPEN_DIRECTORY, SAVE_FILE |
|
108 |
:String title: Window title |
|
109 |
:String initialPath: Initial path to the directory to open in the dialog |
|
110 |
:boolean multiselection: Allow select more than one object. |
|
111 |
:String[] filter: list of acepted extension files ("jpg", "png", "gif") |
|
112 |
:boolean fileHidingEnabled: True if hidden files are not displayed |
|
113 |
""" |
|
114 |
# |
|
115 |
#Values for open files dialog |
|
116 |
dialogType = JFileChooser.OPEN_DIALOG |
|
117 |
selectionMode = FILES_ONLY |
|
118 |
|
|
119 |
if option == SAVE_FILE: |
|
120 |
dialogType = JFileChooser.SAVE_DIALOG |
|
121 |
elif option == OPEN_DIRECTORY: |
|
122 |
selectionMode = DIRECTORIES_ONLY |
|
123 |
|
|
124 |
initialPath = getJavaFile(initialPath) |
|
125 |
|
|
126 |
if filter: |
|
127 |
filter = FileNameExtensionFilter("Files", filter) |
|
128 |
|
|
129 |
return DefaultThreadSafeDialogs().showChooserDialog( |
|
130 |
title, |
|
131 |
dialogType, |
|
132 |
selectionMode, |
|
133 |
multiselection, |
|
134 |
initialPath, |
|
135 |
filter, |
|
136 |
fileHidingEnabled) |
|
137 |
|
|
138 |
def openFileDialog(title='', initialPath=None): |
|
139 |
""" |
|
140 |
Shows a window dialog to choose one file. |
|
141 |
:param title: Window title. Default '' |
|
142 |
:type title: string |
|
143 |
:param initialPath: Initial path to open in window dialog |
|
144 |
:type initialPath: string |
|
145 |
""" |
|
146 |
|
|
147 |
return DefaultThreadSafeDialogs().showOpenFileDialog( |
|
148 |
title, |
|
149 |
getJavaFile(initialPath)) |
|
150 |
|
|
151 |
def openFolderDialog(title='', initialPath=None): |
|
152 |
""" |
|
153 |
Shows a window dialog to choose one folder. |
|
154 |
:param title: Window title. Default '' |
|
155 |
:type title: string |
|
156 |
:param initialPath: Initial path to open in window dialog |
|
157 |
:type initialPath: string |
|
158 |
""" |
|
159 |
|
|
160 |
return DefaultThreadSafeDialogs().showOpenDirectoryDialog( |
|
161 |
title, |
|
162 |
getJavaFile(initialPath)) |
|
163 |
|
|
164 |
def saveFileDialog(title='', initialPath=None): |
|
165 |
""" |
|
166 |
Shows a window dialog to choose one file. |
|
167 |
:param title: Window title. Default '' |
|
168 |
:type title: string |
|
169 |
:param initialPath: Initial path to open in window dialog |
|
170 |
:type initialPath: string |
|
171 |
""" |
|
172 |
|
|
173 |
return DefaultThreadSafeDialogs().showSaveFileDialog( |
|
174 |
title, |
|
175 |
getJavaFile(initialPath) |
|
176 |
) |
|
177 |
|
|
178 |
def getJavaFile(path): |
|
179 |
"""Returns a java File using parameter path. |
|
180 |
If path doesn't exists looks for user home folder and if can not find it, |
|
181 |
returns path will be gvSIG instance directory. |
|
182 |
""" |
|
183 |
# |
|
184 |
#Needs because DefaultThreadSafeDialogs files methods use a java File |
|
185 |
#instance as initialPath parameter |
|
186 |
# |
|
187 |
import os |
|
188 |
import java.io.File as JFile |
|
189 |
|
|
190 |
if path: |
|
191 |
path = os.path.normpath(path) |
|
192 |
if os.path.exists(path): |
|
193 |
return JFile(path) |
|
194 |
|
|
195 |
if os.environ.has_key('HOME'): |
|
196 |
return JFile(os.environ.get('HOME', os.getcwd())) |
|
197 |
|
|
198 |
if os.path.exists(os.path.expanduser("~")): |
|
199 |
return JFile(os.path.expanduser("~")) |
|
200 |
|
|
201 |
return JFile(os.getcwd()) |
|
202 |
|
|
203 |
|
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/lib-2_0_0/console/testcase.py | ||
---|---|---|
1 |
import unittest |
|
2 |
import introspect |
|
3 |
|
|
4 |
class IntrospectTestCase(unittest.TestCase): |
|
5 |
|
|
6 |
def testUnboundMethod(self): |
|
7 |
import string |
|
8 |
method = 'string.index(' |
|
9 |
(name, argspec, tip) = introspect.getCallTip(method, locals()) |
|
10 |
|
|
11 |
self.assertEquals('index', name) |
|
12 |
self.assertEquals('s, *args', argspec) |
|
13 |
self.assertEquals('index(s, *args)\n\nindex(s, sub [,start [,end]]) -> int\n\nLike find but raises ValueError when the substring is not found.', tip) |
|
14 |
|
|
15 |
def testBuiltinFunction(self): |
|
16 |
method = 'len(' |
|
17 |
print introspect.getCallTip(method, locals()) |
|
18 |
|
|
19 |
(name, argspec, tip) = introspect.getCallTip(method, locals()) |
|
20 |
|
|
21 |
self.assertEquals('len', name) |
|
22 |
# next 2 assertions fail in Jython! |
|
23 |
self.assertEquals('len(object) -> integer', argspec) |
|
24 |
self.assertEquals('len(object) -> integer\n\nReturn the number of items of a sequence or mapping', tip) |
|
25 |
|
|
26 |
|
|
27 |
if __name__ == '__main__': |
|
28 |
unittest.main() |
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/lib-2_0_0/console/tip.py | ||
---|---|---|
1 |
from java.awt import Color, Dimension |
|
2 |
from javax.swing import JWindow, JTextArea, JScrollPane |
|
3 |
|
|
4 |
__author__ = "Don Coleman <dcoleman@chariotsolutions.com>" |
|
5 |
__cvsid__ = "$Id: tip.py 5782 2006-06-12 07:56:49Z jmvivo $" |
|
6 |
|
|
7 |
class Tip(JWindow): |
|
8 |
""" |
|
9 |
Window which provides the user with information about the method |
|
10 |
For Python, this shows arguments, and the documention |
|
11 |
For Java, this shows the signature(s) and return type |
|
12 |
""" |
|
13 |
# TODO handle java methods with many overload more gracefully |
|
14 |
MAX_HEIGHT = 300 |
|
15 |
MAX_WIDTH = 400 |
|
16 |
|
|
17 |
def __init__(self, frame): |
|
18 |
JWindow.__init__(self, frame) |
|
19 |
#self.size = (300,150) |
|
20 |
self.textarea = JTextArea() |
|
21 |
# TODO put this color with all the other colors |
|
22 |
self.textarea.setBackground(Color(225,255,255)) |
|
23 |
self.textarea.setEditable(0) |
|
24 |
self.jscrollpane = JScrollPane(self.textarea) |
|
25 |
self.getContentPane().add(self.jscrollpane) |
|
26 |
|
|
27 |
def setText(self, tip): |
|
28 |
self.textarea.setText(tip) |
|
29 |
self.textarea.setCaretPosition(0) |
|
30 |
#print >> sys.stderr, self.textarea.getPreferredScrollableViewportSize() |
|
31 |
self.setSize(self.getPreferredSize()) |
|
32 |
|
|
33 |
def getPreferredSize(self): |
|
34 |
# need to add a magic amount to the size to avoid scrollbars |
|
35 |
# I'm sure there's a better way to do this |
|
36 |
MAGIC = 20 |
|
37 |
size = self.textarea.getPreferredScrollableViewportSize() |
|
38 |
height = size.height + MAGIC |
|
39 |
width = size.width + MAGIC |
|
40 |
if height > Tip.MAX_HEIGHT: |
|
41 |
height = Tip.MAX_HEIGHT |
|
42 |
if width > Tip.MAX_WIDTH: |
|
43 |
width = Tip.MAX_WIDTH |
|
44 |
return Dimension(width, height) |
|
45 |
|
org.gvsig.scripting/tags/org.gvsig.scripting-2.3.238/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/lib-2_0_0/console/dis.py | ||
---|---|---|
1 |
"""Disassembler of Python byte code into mnemonics.""" |
|
2 |
|
|
3 |
import sys |
|
4 |
import types |
|
5 |
|
|
6 |
__all__ = ["dis","disassemble","distb","disco","opname","cmp_op", |
|
7 |
"hasconst","hasname","hasjrel","hasjabs","haslocal", |
|
8 |
"hascompare", "hasfree"] |
|
9 |
|
|
10 |
def dis(x=None): |
|
11 |
"""Disassemble classes, methods, functions, or code. |
|
12 |
|
|
13 |
With no argument, disassemble the last traceback. |
|
14 |
|
|
15 |
""" |
|
16 |
if not x: |
|
17 |
distb() |
|
18 |
return |
|
19 |
if type(x) is types.InstanceType: |
|
20 |
x = x.__class__ |
|
21 |
if hasattr(x, 'im_func'): |
|
22 |
x = x.im_func |
|
23 |
if hasattr(x, 'func_code'): |
|
24 |
x = x.func_code |
|
25 |
if hasattr(x, '__dict__'): |
|
26 |
items = x.__dict__.items() |
|
27 |
items.sort() |
|
28 |
for name, x1 in items: |
|
29 |
if type(x1) in (types.MethodType, |
|
30 |
types.FunctionType, |
|
31 |
types.CodeType): |
|
32 |
print "Disassembly of %s:" % name |
|
33 |
try: |
|
34 |
dis(x1) |
|
35 |
except TypeError, msg: |
|
36 |
print "Sorry:", msg |
|
37 |
|
|
38 |
elif hasattr(x, 'co_code'): |
|
39 |
disassemble(x) |
|
40 |
else: |
|
41 |
raise TypeError, \ |
|
42 |
"don't know how to disassemble %s objects" % \ |
|
43 |
type(x).__name__ |
|
44 |
|
|
45 |
def distb(tb=None): |
|
46 |
"""Disassemble a traceback (default: last traceback).""" |
|
47 |
if not tb: |
|
48 |
try: |
|
49 |
tb = sys.last_traceback |
|
50 |
except AttributeError: |
|
51 |
raise RuntimeError, "no last traceback to disassemble" |
|
52 |
while tb.tb_next: tb = tb.tb_next |
|
53 |
disassemble(tb.tb_frame.f_code, tb.tb_lasti) |
|
54 |
|
|
55 |
def disassemble(co, lasti=-1): |
|
56 |
"""Disassemble a code object.""" |
|
57 |
code = co.co_code |
|
58 |
labels = findlabels(code) |
|
59 |
n = len(code) |
|
60 |
i = 0 |
|
61 |
extended_arg = 0 |
|
62 |
free = None |
|
63 |
while i < n: |
|
64 |
c = code[i] |
|
65 |
op = ord(c) |
|
66 |
if op == SET_LINENO and i > 0: print # Extra blank line |
|
67 |
if i == lasti: print '-->', |
|
68 |
else: print ' ', |
|
69 |
if i in labels: print '>>', |
|
70 |
else: print ' ', |
|
71 |
print `i`.rjust(4), |
|
72 |
print opname[op].ljust(20), |
|
73 |
i = i+1 |
|
74 |
if op >= HAVE_ARGUMENT: |
|
75 |
oparg = ord(code[i]) + ord(code[i+1])*256 + extended_arg |
|
76 |
extended_arg = 0 |
|
77 |
i = i+2 |
|
78 |
if op == EXTENDED_ARG: |
|
79 |
extended_arg = oparg*65536L |
|
80 |
print `oparg`.rjust(5), |
|
81 |
if op in hasconst: |
|
82 |
print '(' + `co.co_consts[oparg]` + ')', |
|
83 |
elif op in hasname: |
|
84 |
print '(' + co.co_names[oparg] + ')', |
|
85 |
elif op in hasjrel: |
|
86 |
print '(to ' + `i + oparg` + ')', |
|
87 |
elif op in haslocal: |
|
88 |
print '(' + co.co_varnames[oparg] + ')', |
|
89 |
elif op in hascompare: |
|
90 |
print '(' + cmp_op[oparg] + ')', |
|
91 |
elif op in hasfree: |
|
92 |
if free is None: |
|
93 |
free = co.co_cellvars + co.co_freevars |
|
94 |
print '(' + free[oparg] + ')', |
|
95 |
|
|
96 |
|
|
97 |
disco = disassemble # XXX For backwards compatibility |
|
98 |
|
|
99 |
def findlabels(code): |
|
100 |
"""Detect all offsets in a byte code which are jump targets. |
|
101 |
|
|
102 |
Return the list of offsets. |
|
103 |
|
|
104 |
""" |
|
105 |
labels = [] |
|
106 |
n = len(code) |
|
107 |
i = 0 |
|
108 |
while i < n: |
|
109 |
c = code[i] |
|
110 |
op = ord(c) |
|
111 |
i = i+1 |
|
112 |
if op >= HAVE_ARGUMENT: |
|
113 |
oparg = ord(code[i]) + ord(code[i+1])*256 |
|
114 |
i = i+2 |
|
115 |
label = -1 |
|
116 |
if op in hasjrel: |
|
117 |
label = i+oparg |
|
118 |
elif op in hasjabs: |
|
119 |
label = oparg |
|
120 |
if label >= 0: |
|
121 |
if label not in labels: |
|
122 |
labels.append(label) |
|
123 |
return labels |
|
124 |
|
|
125 |
cmp_op = ('<', '<=', '==', '!=', '>', '>=', 'in', 'not in', 'is', |
|
126 |
'is not', 'exception match', 'BAD') |
|
127 |
|
|
128 |
hasconst = [] |
|
129 |
hasname = [] |
|
130 |
hasjrel = [] |
|
131 |
hasjabs = [] |
|
132 |
haslocal = [] |
|
133 |
hascompare = [] |
|
134 |
hasfree = [] |
|
135 |
|
|
136 |
opname = [''] * 256 |
|
137 |
for op in range(256): opname[op] = '<' + `op` + '>' |
|
138 |
|
|
139 |
def def_op(name, op): |
|
140 |
opname[op] = name |
|
141 |
|
|
142 |
def name_op(name, op): |
|
143 |
opname[op] = name |
|
144 |
hasname.append(op) |
|
145 |
|
|
146 |
def jrel_op(name, op): |
|
147 |
opname[op] = name |
|
148 |
hasjrel.append(op) |
|
149 |
|
|
150 |
def jabs_op(name, op): |
|
151 |
opname[op] = name |
|
152 |
hasjabs.append(op) |
|
153 |
|
|
154 |
# Instruction opcodes for compiled code |
|
155 |
|
|
156 |
def_op('STOP_CODE', 0) |
|
157 |
def_op('POP_TOP', 1) |
|
158 |
def_op('ROT_TWO', 2) |
|
159 |
def_op('ROT_THREE', 3) |
|
160 |
def_op('DUP_TOP', 4) |
|
161 |
def_op('ROT_FOUR', 5) |
|
162 |
|
|
163 |
def_op('UNARY_POSITIVE', 10) |
|
164 |
def_op('UNARY_NEGATIVE', 11) |
|
165 |
def_op('UNARY_NOT', 12) |
|
166 |
def_op('UNARY_CONVERT', 13) |
|
167 |
|
|
168 |
def_op('UNARY_INVERT', 15) |
|
169 |
|
|
170 |
def_op('BINARY_POWER', 19) |
|
171 |
|
|
172 |
def_op('BINARY_MULTIPLY', 20) |
|
173 |
def_op('BINARY_DIVIDE', 21) |
|
174 |
def_op('BINARY_MODULO', 22) |
|
175 |
def_op('BINARY_ADD', 23) |
|
176 |
def_op('BINARY_SUBTRACT', 24) |
|
177 |
def_op('BINARY_SUBSCR', 25) |
|
178 |
def_op('BINARY_FLOOR_DIVIDE', 26) |
|
179 |
def_op('BINARY_TRUE_DIVIDE', 27) |
|
180 |
def_op('INPLACE_FLOOR_DIVIDE', 28) |
|
181 |
def_op('INPLACE_TRUE_DIVIDE', 29) |
|
182 |
|
|
183 |
def_op('SLICE+0', 30) |
|
184 |
def_op('SLICE+1', 31) |
|
185 |
def_op('SLICE+2', 32) |
|
186 |
def_op('SLICE+3', 33) |
|
187 |
|
|
188 |
def_op('STORE_SLICE+0', 40) |
|
189 |
def_op('STORE_SLICE+1', 41) |
|
190 |
def_op('STORE_SLICE+2', 42) |
|
191 |
def_op('STORE_SLICE+3', 43) |
|
192 |
|
|
193 |
def_op('DELETE_SLICE+0', 50) |
|
194 |
def_op('DELETE_SLICE+1', 51) |
|
195 |
def_op('DELETE_SLICE+2', 52) |
|
196 |
def_op('DELETE_SLICE+3', 53) |
|
197 |
|
|
198 |
def_op('INPLACE_ADD', 55) |
|
199 |
def_op('INPLACE_SUBTRACT', 56) |
|
200 |
def_op('INPLACE_MULTIPLY', 57) |
|
201 |
def_op('INPLACE_DIVIDE', 58) |
|
202 |
def_op('INPLACE_MODULO', 59) |
|
203 |
def_op('STORE_SUBSCR', 60) |
|
204 |
def_op('DELETE_SUBSCR', 61) |
|
205 |
|
|
206 |
def_op('BINARY_LSHIFT', 62) |
|
207 |
def_op('BINARY_RSHIFT', 63) |
|
208 |
def_op('BINARY_AND', 64) |
|
209 |
def_op('BINARY_XOR', 65) |
|
210 |
def_op('BINARY_OR', 66) |
|
211 |
def_op('INPLACE_POWER', 67) |
|
212 |
def_op('GET_ITER', 68) |
Also available in: Unified diff