Revision 506

View differences:

org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/pom.xml
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
  <modelVersion>4.0.0</modelVersion>
3
  <parent>
4
    <groupId>org.gvsig</groupId>
5
    <artifactId>org.gvsig.educa.portableview</artifactId>
6
    <version>1.0.44</version>
7
  </parent>
8
  <groupId>org.gvsig</groupId>
9
  <artifactId>org.gvsig.educa.portableview.swing</artifactId>
10
  <packaging>pom</packaging>
11
  <name>org.gvsig.educa.portableview.swing</name>
12

  
13
  <modules>
14
  	<module>org.gvsig.educa.portableview.swing.api</module>
15
  	<module>org.gvsig.educa.portableview.swing.impl</module>
16
  </modules>
17
</project>
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/resources/org/gvsig/educa/portableview/swing/impl/i18n/text.properties
1
#text.properties
2
accept=Aceptar
3
add=A\u00F1adir
4
add_layer_group=A\u00F1adir agrupaci\u00F3n de capas
5
add_layers=A\u00F1adir capas
6
are_you_sure_to_remove_selected_layers=\u00BFEst\u00E1 seguro de eliminar las capas seleccionadas?
7
cancel=Cancelar
8
clean_messages=Limpiar mensajes
9
current_values_are_not_valid=Los valores actuales no son v\u00E1lidos
10
default=Por defecto
11
edit_source_properties=Editar propiedades de la fuente de datos
12
explorer=Explorador de fuentes de datos
13
explorer_parameters=Par\u00E1metros del explorador
14
explorer_parameters_not_valid=Par\u00E1metro del explorador no v\u00E1lidos
15
get_layer_group_name=Introduzca el nombre para la agrupaci\u00F3n
16
layer_name=Nombre
17
layer_properties=Propiedades de capa
18
layer_show_in_toc=Se muestra en el TOC
19
layer_visible=Visible
20
list_data_explorer=Listar fuentes de datos
21
list_sources=Listar fuentes
22
new=nuevo
23
no_layers_added=No se han a\u00F1adido capas
24
no_layers_to_add=No hay capas para a\u00F1adir
25
open_portable_view=Abrir Vista Portable
26
parameters=Par\u00E1metros
27
problem_adding_group=Se ha encontrado un problema a\u00F1adiendo la agrupaci\u00F3n
28
problems_opening_explorer=Se han encontrado problemas abriendo el explorador
29
remove_layers=Eliminar capas
30
select_layer_show_properties=Seleccione una capa para mostrar sus propiedades
31
select_layers_to_remove=Seleccione las capas a eliminar
32
select_only_one_layer=Seleccione una \u00FAnica capa
33
source_parameters=Par\u00E1metros de la fuente
34
portable_view_compilation_editor=Editor de compilaci\u00F3n de la vista portable
35
portable_view_description=Descripci\u00F3n
36
portable_view_id=Identificador
37
portable_view_information=Informaci\u00F3n de la vista portable
38
portable_view_layers=Capas de la vista portable
39
portable_view_name=Nombre
40
portable_view_validation=Validaci\u00F3n de la vista portable
41
portable_view_version=Versi\u00F3n
42
updateing_compilation_info=Actualizando datos de la compilaci\u00F3n
43
validate=Validar
44
version=Versi\u00F3n
45
version_must_be_a_integer=Versi\u00F3n debe ser un entero
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/resources/org/gvsig/educa/portableview/swing/impl/i18n/text_en.properties
1
#text_en.properties
2
accept=Accept
3
add=Add
4
add_layer_group=Add layer group
5
add_layers=Add layers
6
are_you_sure_to_remove_selected_layers=Are you sure to remove selected layers?
7
cancel=Cancel
8
clean_messages=Clean messages
9
current_values_are_not_valid=Current values are not valid\n
10
default=Default
11
edit_source_properties=Edit source properties
12
explorer=Sources Explorer
13
explorer_parameters=Explorer parameters
14
explorer_parameters_not_valid=Explorer parameters are not valid
15
get_layer_group_name=Input layer group name
16
layer_name=Name
17
layer_properties=Layer properties
18
layer_show_in_toc=Show in TOC
19
layer_visible=Visible
20
list_data_explorer=List sources
21
list_sources=List sources
22
new=New
23
no_layers_added=None layer has been added
24
no_layers_to_add=No layers to add
25
open_portable_view=Open Portable View
26
parameters=Parameters
27
problem_adding_group=Problems found adding layer group
28
problems_opening_explorer=Problems found opening explorer
29
remove_layers=Remove layers
30
select_layer_show_properties=Select a layer to show its properties
31
select_layers_to_remove=Select the layers to remove
32
select_only_one_layer=Select just one layer
33
source_parameters=Source parameters
34
portable_view_compilation_editor=Portable View Compilation Editor
35
portable_view_description=Description
36
portable_view_id=Identifier
37
portable_view_information=Information
38
portable_view_layers=Portable View Layers
39
portable_view_name=Name
40
portable_view_validation=Portable View Validation
41
portable_view_version=Version
42
updateing_compilation_info=Updating compilation information
43
validate=Validate
44
version=Version
45
version_must_be_a_integer=Version must be an integer
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/resources/org/gvsig/educa/portableview/swing/impl/i18n/text_pt_BR.properties
1
#text_pt_BR.properties
2
accept=Aceitar
3
add=Adicionar
4
add_layer_group=Adicionar grupo de camadas
5
add_layers=Adicionar camadas
6
are_you_sure_to_remove_selected_layers=Deseja realmente remover as camadas selecionadas?
7
cancel=Cancelar
8
clean_messages=Apagar mensagens
9
current_values_are_not_valid=Valores inv\u00E1lidos
10
default=Default
11
edit_source_properties=Editar propriedades da fonte de dados
12
explorer=Explorador de fonte de dados
13
explorer_parameters=Explorador de par\u00E2metros
14
explorer_parameters_not_valid=Explorador de par\u00E2metros inv\u00E1lido
15
get_layer_group_name=Forne\u00E7a um nome para o grupo de camadas
16
layer_name=Nome da camada
17
layer_properties=Propriedades da camada
18
layer_show_in_toc=Camada vis\u00EDvel no TOC
19
layer_visible=Camada vis\u00EDvel
20
list_data_explorer=Listar fontes de dados
21
list_sources=Listar fontes
22
new=Novo
23
no_layers_added=Nenhuma camada adicionada
24
no_layers_to_add=Nenhuma camada a adicionar
25
open_portable_view=Abrir mapa tem\u00E1tico
26
parameters=Par\u00E2metros
27
problem_adding_group=Problema ao adicionar grupo
28
problems_opening_explorer=Problemas ao abrir o explorador
29
remove_layers=Remover camadas
30
select_layer_show_properties=Selecione uma camada para mostrar suas propriedades
31
select_layers_to_remove=Selecione as camadas a remover
32
select_only_one_layer=Selecione apenas uma camada
33
source_parameters=Par\u00E2metros da fonte
34
portable_view_compilation_editor=Editor de compila\u00E7\u00E3o de mapa tem\u00E1tico
35
portable_view_description=Descri\u00E7\u00E3o do mapa tem\u00E1tico
36
portable_view_id=Identificador do mapa tem\u00E1tico
37
portable_view_information=Informa\u00E7\u00E3o do mapa tem\u00E1tico
38
portable_view_layers=Camadas do mapa tem\u00E1tico
39
portable_view_name=Nome do mapa tem\u00E1tico
40
portable_view_validation=Valida\u00E7\u00E3o do mapa tem\u00E1tico
41
portable_view_version=Vers\u00E3o do mapa tem\u00E1tico
42
updateing_compilation_info=Atualizadno dados da compila\u00E7\u00E3o
43
validate=Validar
44
version=Vers\u00E3o
45
version_must_be_a_integer=Vers\u00E3o deve ser n\u00FAmero inteiro
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/resources/org/gvsig/educa/portableview/swing/impl/i18n/text_ru.properties
1
#text_ru.properties
2
accept=\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C
3
add=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C
4
add_layer_group=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0433\u0440\u0443\u043F\u043F\u0443 \u0441\u043B\u043E\u0435\u0432
5
add_layers=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u043B\u043E\u0438
6
are_you_sure_to_remove_selected_layers=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u043B\u043E\u0438?
7
cancel=\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C
8
clean_messages=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F
9
current_values_are_not_valid=\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435
10
default=\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E
11
edit_source_properties=\u0418\u0437\u043C\u0435\u043D\u0438\u0442 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445
12
explorer=\u041C\u0435\u043D\u0435\u0434\u0436\u0435\u0440 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432 \u0434\u0430\u043D\u043D\u044B\u0445
13
explorer_parameters=\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B
14
explorer_parameters_not_valid=\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B
15
get_layer_group_name=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F \u0433\u0440\u0443\u043F\u043F\u044B \u0441\u043B\u043E\u0435\u0432
16
layer_name=\u0418\u043C\u044F
17
layer_properties=\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0441\u043B\u043E\u044F
18
layer_show_in_toc=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u0422\u041E\u0421
19
layer_visible=\u0412\u0438\u0434\u0438\u043C\u044B\u0439
20
list_data_explorer=\u0421\u043F\u0438\u0441\u043E\u043A \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432 \u0434\u0430\u043D\u043D\u044B\u0445
21
list_sources=\u0421\u043F\u0438\u0441\u043E\u043A \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432
22
new=\u041D\u043E\u0432\u044B\u0439
23
no_layers_added=\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0441\u043B\u043E\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442
24
no_layers_to_add=\u041D\u0435\u0442 \u0441\u043B\u043E\u0435\u0432 \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F
25
open_portable_view=\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0422\u0435\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0443\u044E \u043A\u0430\u0440\u0442\u0443
26
parameters=\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B
27
problem_adding_group=\u041F\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0433\u0440\u0443\u043F\u043F\u044B \u0441\u043B\u043E\u0435\u0432 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430 
28
problems_opening_explorer=\u041F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440\u0430 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432 \u0434\u0430\u043D\u043D\u044B\u0445 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430
29
remove_layers=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u043B\u043E\u0438
30
select_layer_show_properties=\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043B\u043E\u0439, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0435\u0433\u043E \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430
31
select_layers_to_remove=\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043B\u043E\u0438 \u0434\u043B\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F
32
select_only_one_layer=\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0434\u0438\u043D \u0441\u043B\u043E\u0439
33
source_parameters=\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430
34
portable_view_compilation_editor=\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043A\u043E\u043C\u043F\u0438\u043B\u044F\u0446\u0438\u0438 \u0422\u0435\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u043A\u0430\u0440\u0442\u044B
35
portable_view_description=\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435
36
portable_view_id=\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440
37
portable_view_information=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F
38
portable_view_layers=\u0421\u043B\u043E\u0438 \u0422\u0435\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u043A\u0430\u0440\u0442\u044B
39
portable_view_name=\u0418\u043C\u044F
40
portable_view_validation=\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0422\u0435\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u043A\u0430\u0440\u0442\u044B
41
portable_view_version=\u0412\u0435\u0440\u0441\u0438\u044F
42
updateing_compilation_info=\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438 \u043A\u043E\u043C\u043F\u0438\u043B\u044F\u0446\u0438\u0438
43
validate=\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C
44
version=\u0412\u0435\u0440\u0441\u0438\u044F
45
version_must_be_a_integer=\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u0446\u0435\u043B\u044B\u043C \u0447\u0438\u0441\u043B\u043E\u043C
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/resources/org/gvsig/educa/portableview/swing/impl/i18n/text_es.properties
1
#text_es.properties
2
accept=Aceptar
3
add=A\u00F1adir
4
add_layer_group=A\u00F1adir agrupaci\u00F3n de capas
5
add_layers=A\u00F1adir capas
6
are_you_sure_to_remove_selected_layers=\u00BFEst\u00E1 seguro de eliminar las capas seleccionadas?
7
cancel=Cancelar
8
clean_messages=Limpiar mensajes
9
current_values_are_not_valid=Los valores actuales no son v\u00E1lidos
10
default=Por defecto
11
edit_source_properties=Editar propiedades de la fuente de datos
12
explorer=Explorador de fuentes de datos
13
explorer_parameters=Par\u00E1metros del explorador
14
explorer_parameters_not_valid=Par\u00E1metro del explorador no v\u00E1lidos
15
get_layer_group_name=Introduzca el nombre para la agrupaci\u00F3n
16
layer_name=Nombre
17
layer_properties=Propiedades de capa
18
layer_show_in_toc=Se muestra en el TOC
19
layer_visible=Visible
20
list_data_explorer=Listar fuentes de datos
21
list_sources=Listar fuentes
22
new=nuevo
23
no_layers_added=No se han a\u00F1adido capas
24
no_layers_to_add=No hay capas para a\u00F1adir
25
open_portable_view=Abrir Vista Portable
26
parameters=Par\u00E1metros
27
problem_adding_group=Se ha encontrado un problema a\u00F1adiendo la agrupaci\u00F3n
28
problems_opening_explorer=Se han encontrado problemas abriendo el explorador
29
remove_layers=Eliminar capas
30
select_layer_show_properties=Seleccione una capa para mostrar sus propiedades
31
select_layers_to_remove=Seleccione las capas a eliminar
32
select_only_one_layer=Seleccione una \u00FAnica capa
33
source_parameters=Par\u00E1metros de la fuente
34
portable_view_compilation_editor=Editor de compilaci\u00F3n de la vista portable
35
portable_view_description=Descripci\u00F3n
36
portable_view_id=Identificador
37
portable_view_information=Informaci\u00F3n de la vista portable
38
portable_view_layers=Capas de la vista portable
39
portable_view_name=Nombre
40
portable_view_validation=Validaci\u00F3n de la vista portable
41
portable_view_version=Versi\u00F3n
42
updateing_compilation_info=Actualizando datos de la compilaci\u00F3n
43
validate=Validar
44
version=Versi\u00F3n
45
version_must_be_a_integer=Versi\u00F3n debe ser un entero
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/resources/org/gvsig/educa/portableview/swing/impl/i18n/text_de.properties
1
#text_de.properties
2
accept=Akzeptieren
3
add=Hinzuf\u00FCgen
4
add_layer_group=Layergruppe hinzuf\u00FCgen
5
add_layers=Layer hinzuf\u00FCgen
6
are_you_sure_to_remove_selected_layers=M\u00F6chten Sie die ausgew\u00E4hlten Layer wirklich l\u00F6schen?
7
cancel=Abbrechen
8
clean_messages=Benachrichtigungen l\u00F6schen
9
current_values_are_not_valid=Aktuelle Werte sind nicht g\u00FCltig
10
default=Standard
11
edit_source_properties=Quelldaten-Eigenschaften bearbeiten
12
explorer=Explorer
13
explorer_parameters=Explorer Parameter
14
explorer_parameters_not_valid=Explorer Parameter ung\u00FCltig
15
get_layer_group_name=Layergruppenname eingeben
16
layer_name=Name
17
layer_properties=Layer Eigenschaften
18
layer_show_in_toc=Layer in TOC anzeigen
19
layer_visible=Sichtbar
20
list_data_explorer=Datenquellen anzeigen
21
list_sources=Quellen anzeigen
22
new=Neu
23
no_layers_added=Keine Layer hinzugef\u00FCgt
24
no_layers_to_add=Keine Layer zum hinzuf\u00FCgen vorhanden
25
open_portable_view=Thematische Karte \u00F6ffnen
26
parameters=Parameter
27
problem_adding_group=Problem beim Hinzuf\u00FCgen der Layergruppe
28
problems_opening_explorer=Problem beim \u00D6ffnen des Explorer
29
remove_layers=Layer entfernen
30
select_layer_show_properties=Layer Ausw\u00E4hlen um seine Eigenschaften anzuzeigen
31
select_layers_to_remove=Layer zum Entfernen ausw\u00E4hlen
32
select_only_one_layer=Nur einen Layer ausw\u00E4hlen
33
source_parameters=Quellparameter
34
portable_view_compilation_editor=Editor zum Kompilieren Thematischer Karten
35
portable_view_description=Beschreibung
36
portable_view_id=ID
37
portable_view_information=Information
38
portable_view_layers=Layer der Thematischen Karte
39
portable_view_name=Name
40
portable_view_validation=Validierung der Thematischen Karte
41
portable_view_version=Version
42
updateing_compilation_info=Kompilierungsinformationen aktualisieren
43
validate=Validieren
44
version=Version
45
version_must_be_a_integer=Version muss eine Ganzzahl sein
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/resources/org/gvsig/educa/portableview/swing/impl/i18n/text_it.properties
1
#text_it.properties
2
accept=Accetta
3
add=Aggiungi
4
add_layer_group=Aggiungi gruppo di layer
5
add_layers=Aggiungi layer
6
are_you_sure_to_remove_selected_layers=Sei sicuro di voler rimuovere i layer selezionati?
7
cancel=Cancella
8
clean_messages=Cancella messaggi
9
current_values_are_not_valid=I valori attuali non sono validi
10
default=Predefinito
11
edit_source_properties=Edita le propriet\u00E0 della fonte di dati
12
explorer=Esploratore di fonte di dati
13
explorer_parameters=Parametri dell'esploratore
14
explorer_parameters_not_valid=Parametri dell'esploratore non validi
15
get_layer_group_name=Introdurre il nome del gruppo di layer
16
layer_name=Nome
17
layer_properties=Propriet\u00E0 del layer
18
layer_show_in_toc=Mostra nella TOC
19
layer_visible=Visibile
20
list_data_explorer=Elenca fonti di dati
21
list_sources=Elenca fonti di dati
22
new=Nuovo
23
no_layers_added=Nessun layer \u00E8 stato aggiunto
24
no_layers_to_add=Nessun layer da aggiungere
25
open_portable_view=Apri mappa tematica
26
parameters=Parametri
27
problem_adding_group=Problema nell'aggiunta del gruppo di layer
28
problems_opening_explorer=Problema nell'apertura dell'esploratore
29
remove_layers=Rimuovi layer
30
select_layer_show_properties=Seleziona layer per mostrare le sue propriet\u00E0
31
select_layers_to_remove=Seleziona layer da rimuovere
32
select_only_one_layer=Seleziona un unico layer
33
source_parameters=Parametri della fonte di dati
34
portable_view_compilation_editor=Editor di compilazione di mappa tematica
35
portable_view_description=Descrizione
36
portable_view_id=Identificatore
37
portable_view_information=Informazioni
38
portable_view_layers=Layer della mappa tematica
39
portable_view_name=Nome
40
portable_view_validation=Validazione della mappa tematica
41
portable_view_version=Versione
42
updateing_compilation_info=Aggiornamento delle informazioni di compilazione
43
validate=Valida
44
version=Versione
45
version_must_be_a_integer=La versione deve essere un intero
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.educa.portableview.swing.impl.PortableViewSwingDefaultImplLibrary
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/java/org/gvsig/educa/portableview/swing/impl/editor/layers/DefaultPortableViewLayersEditor.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.educa.portableview.swing.impl.editor.layers;
23

  
24
import java.awt.BorderLayout;
25
import java.util.ArrayList;
26
import java.util.Collections;
27
import java.util.List;
28

  
29
import javax.swing.JComponent;
30
import javax.swing.JPanel;
31
import javax.swing.JScrollPane;
32
import javax.swing.JTree;
33
import javax.swing.tree.DefaultMutableTreeNode;
34
import javax.swing.tree.DefaultTreeModel;
35
import javax.swing.tree.TreePath;
36
import javax.swing.tree.TreeSelectionModel;
37

  
38
import org.gvsig.educa.portableview.swing.editor.PortableViewCompilationEditor;
39
import org.gvsig.educa.portableview.swing.editor.PortableViewLayersEditor;
40
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
41
import org.gvsig.fmap.mapcontext.layers.CancelationException;
42
import org.gvsig.fmap.mapcontext.layers.FLayer;
43
import org.gvsig.fmap.mapcontext.layers.FLayers;
44
import org.gvsig.fmap.mapcontext.layers.LayerCollectionEvent;
45
import org.gvsig.fmap.mapcontext.layers.LayerCollectionListener;
46
import org.gvsig.fmap.mapcontext.layers.LayerEvent;
47
import org.gvsig.fmap.mapcontext.layers.LayerListener;
48
import org.gvsig.fmap.mapcontext.layers.LayerPositionEvent;
49
import org.gvsig.fmap.mapcontext.layers.operations.LayerCollection;
50

  
51
/**
52
 * <p>
53
 * Default implementation of {@link PortableViewLayersEditor}
54
 * </p>
55
 * <p>
56
 * Creates a JTree to represent MapContext structure.
57
 * </p>
58
 * <p>
59
 * Uses {@link LayerCollection} and {@link LayerListener} notifications to
60
 * update JTree contents.
61
 * </p>
62
 *
63
 * @author gvSIG Team
64
 * @version $Id$
65
 *
66
 */
67
public class DefaultPortableViewLayersEditor extends JPanel implements
68
    PortableViewLayersEditor, LayerCollectionListener, LayerListener {
69

  
70
    /**
71
     *
72
     */
73
    private static final long serialVersionUID = 3659268618881281187L;
74

  
75
    private PortableViewCompilationEditor editor;
76

  
77
    private boolean initialized = false;
78

  
79
    private JTree tree;
80

  
81
    private DefaultMutableTreeNode rootNode;
82

  
83
    private DefaultTreeModel treeModel;
84

  
85
    private FLayers rootLayer;
86

  
87
    /**
88
     *
89
     */
90
    public DefaultPortableViewLayersEditor() {
91

  
92
    }
93

  
94
    /**
95
     * Initialize UI components
96
     */
97
    private void initializeUI() {
98
        if (initialized) {
99
            return;
100
        }
101
        setLayout(new BorderLayout());
102

  
103
        tree = new JTree();
104

  
105
        tree.setCellRenderer(new LayerTreeCellRenderer());
106

  
107
        tree.setRootVisible(false);
108

  
109
        tree.getSelectionModel().setSelectionMode(
110
            TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
111

  
112
        add(new JScrollPane(tree), BorderLayout.CENTER);
113

  
114
        initialized = true;
115
    }
116

  
117
    /** {@inheridDoc} */
118
    public JComponent getSwingComponent() {
119
        return this;
120
    }
121

  
122
    /** {@inheridDoc} */
123
    public void setCompilationEditor(
124
        PortableViewCompilationEditor compilationEditor) {
125
        initializeUI();
126
        editor = compilationEditor;
127
        loadTreeModel();
128
    }
129

  
130
    /**
131
     * Load tree model from mapContext
132
     */
133
    private void loadTreeModel() {
134
        rootLayer = editor.getCompilation().getMapContext().getLayers();
135
        // rootNode = new LayerTreeNode(rootLayer);
136
        // rootLayer.addLayerCollectionListener(this);
137
        loadLayerNode(rootLayer, null);
138
        treeModel = new DefaultTreeModel(rootNode);
139
        tree.setModel(treeModel);
140
        tree.invalidate();
141

  
142
    }
143

  
144
    /**
145
     * Load a layer Node
146
     *
147
     * @param layer
148
     * @param parent
149
     */
150
    private void loadLayerNode(FLayer layer, LayerTreeNode parent) {
151
        layer.addLayerListener(this);
152
        LayerTreeNode node = new LayerTreeNode(layer);
153
        if (parent == null) {
154
            rootNode = node;
155
        } else {
156
            parent.add(node);
157
        }
158
        if (layer instanceof LayerCollection) {
159
            LayerCollection collection = (LayerCollection) layer;
160
            collection.addLayerCollectionListener(this);
161
            for (int i = 0; i < collection.getLayersCount(); i++) {
162
                loadLayerNode(collection.getLayer(i), node);
163
            }
164
        }
165
    }
166

  
167
    /** {@inheridDoc} */
168
    public PortableViewCompilationEditor getCompilationEditor() {
169
        return editor;
170
    }
171

  
172
    /** {@inheridDoc} */
173
    public List<FLayer> getSelectedLayers() {
174
        List<FLayer> selectedLayers = new ArrayList<FLayer>();
175
        LayerTreeNode node;
176
        TreePath[] paths = tree.getSelectionPaths();
177
        if (paths != null && paths.length > 0) {
178
            for (TreePath path : paths) {
179
                node = (LayerTreeNode) (path.getLastPathComponent());
180
                selectedLayers.add(node.getLayer());
181
            }
182
        }
183
        return Collections.unmodifiableList(selectedLayers);
184
    }
185

  
186
    /** {@inheridDoc} */
187
    public void removeSelectedLayers() {
188
        List<FLayer> selected = getSelectedLayers();
189
        LayerCollection parent;
190
        for (FLayer fLayer : selected) {
191
            parent = fLayer.getParentLayer();
192
            parent.removeLayer(fLayer);
193
        }
194
    }
195

  
196
    /** {@inheridDoc} */
197
    public void addLayersToGroup(List<FLayer> layers)
198
        throws LoadLayerException, CancelationException {
199
        List<FLayer> selecteds = getSelectedLayers();
200
        if (selecteds.size() > 1) {
201
            throw new IllegalStateException("Too much selected layers");
202
        }
203
        FLayer selected = selecteds.get(0);
204
        LayerCollection parent;
205
        if (selected instanceof LayerCollection) {
206
            parent = (LayerCollection) selected;
207
        } else {
208
            parent = selected.getParentLayer();
209
        }
210

  
211
        for (FLayer fLayer : layers) {
212
            parent.addLayer(fLayer);
213
        }
214
    }
215

  
216
    /**
217
     * Locates the layer node in all tree structure from root
218
     *
219
     * @param layer
220
     * @return
221
     */
222
    private LayerTreeNode findLayerNode(FLayer layer) {
223
        if (rootNode == null) {
224
            return null;
225
        }
226
        return findLayerNode((LayerTreeNode) rootNode, layer);
227
    }
228

  
229
    /**
230
     * Locates the layer node in all tree structure from root
231
     *
232
     * @param node
233
     * @param layer
234
     * @return
235
     */
236
    private LayerTreeNode findLayerNode(LayerTreeNode node, FLayer layer) {
237
        if (node.getLayer() == layer) {
238
            return node;
239
        }
240
        if (node.isLeaf()) {
241
            return null;
242
        }
243
        LayerTreeNode aNode;
244
        LayerTreeNode result;
245
        for (int i = 0; i < node.getChildCount(); i++) {
246
            aNode = (LayerTreeNode) node.getChildAt(i);
247
            result = findLayerNode(aNode, layer);
248
            if (result != null) {
249
                return result;
250
            }
251
        }
252
        return null;
253
    }
254

  
255
    public void layerAdded(LayerCollectionEvent e) {
256
        FLayer afectedLayer = e.getAffectedLayer();
257
        if (afectedLayer instanceof LayerCollection) {
258
            ((LayerCollection) afectedLayer).addLayerCollectionListener(this);
259
        }
260
        afectedLayer.addLayerListener(this);
261
        FLayer parentLayer = afectedLayer.getParentLayer();
262
        LayerTreeNode parentNode = findLayerNode(parentLayer);
263
        LayerTreeNode afectedNode = new LayerTreeNode(afectedLayer);
264
        treeModel.insertNodeInto(afectedNode, parentNode,
265
            parentNode.getChildCount());
266
        tree.scrollPathToVisible(new TreePath(afectedNode.getPath()));
267
    }
268

  
269
    public void layerMoved(LayerPositionEvent e) {
270
        FLayer afectedLayer = e.getAffectedLayer();
271
        FLayer parentLayer = afectedLayer.getParentLayer();
272
        LayerTreeNode parentNode = findLayerNode(parentLayer);
273
        LayerTreeNode afectedNode =
274
            (LayerTreeNode) parentNode.getChildAt(e.getOldPos());
275
        if (afectedNode.getLayer() != afectedLayer) {
276
            // TODO
277
        }
278
        treeModel.removeNodeFromParent(afectedNode);
279
        treeModel.insertNodeInto(afectedNode, parentNode, e.getNewPos());
280
    }
281

  
282
    public void layerRemoved(LayerCollectionEvent e) {
283
        FLayer afectedLayer = e.getAffectedLayer();
284
        if (afectedLayer instanceof LayerCollection) {
285
            ((LayerCollection) afectedLayer)
286
                .removeLayerCollectionListener(this);
287
        }
288
        afectedLayer.removeLayerListener(this);
289
        LayerTreeNode afected = findLayerNode(afectedLayer);
290
        treeModel.removeNodeFromParent(afected);
291
    }
292

  
293
    public void layerAdding(LayerCollectionEvent e) throws CancelationException {
294
        // Nothing to do
295
    }
296

  
297
    public void layerMoving(LayerPositionEvent e) throws CancelationException {
298
        // Nothing to do
299
    }
300

  
301
    public void layerRemoving(LayerCollectionEvent e)
302
        throws CancelationException {
303
        // Nothing to do
304
    }
305

  
306
    public void visibilityChanged(LayerCollectionEvent e)
307
        throws CancelationException {
308
        // Nothing to do
309
    }
310

  
311
    public void visibilityChanged(LayerEvent e) {
312
        // Nothing to do
313
    }
314

  
315
    public void activationChanged(LayerEvent e) {
316
        // Nothing to do
317
    }
318

  
319
    public void nameChanged(LayerEvent e) {
320
        FLayer layer = e.getSource();
321
        LayerTreeNode node = findLayerNode(layer);
322
        treeModel.nodeChanged(node);
323
        tree.scrollPathToVisible(new TreePath(node.getPath()));
324
    }
325

  
326
    public void editionChanged(LayerEvent e) {
327
        // Nothing to do
328
    }
329

  
330
    public void drawValueChanged(LayerEvent e) {
331
        // Nothing to do
332
    }
333

  
334
}
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/java/org/gvsig/educa/portableview/swing/impl/editor/layers/LayerTreeNode.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.educa.portableview.swing.impl.editor.layers;
23

  
24
import javax.swing.tree.DefaultMutableTreeNode;
25

  
26
import org.gvsig.fmap.mapcontext.layers.FLayer;
27
import org.gvsig.fmap.mapcontext.layers.operations.SingleLayer;
28

  
29
/**
30
 * Node representation of a layer in JTree of
31
 * {@link DefaultPortableViewLayersEditor}
32
 *
33
 * @author gvSIG Team
34
 * @version $Id$
35
 *
36
 */
37
public class LayerTreeNode extends DefaultMutableTreeNode {
38

  
39
    /**
40
     *
41
     */
42
    private static final long serialVersionUID = -5660745136587795464L;
43

  
44
    /**
45
     *
46
     */
47
    public LayerTreeNode(FLayer layer) {
48
        super(layer);
49
    }
50

  
51
    public FLayer getLayer() {
52
        return (FLayer) getUserObject();
53
    }
54

  
55
    @Override
56
    public boolean isLeaf() {
57
        return getLayer() instanceof SingleLayer;
58
    }
59

  
60
}
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/java/org/gvsig/educa/portableview/swing/impl/editor/layers/LayerTreeCellRenderer.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.educa.portableview.swing.impl.editor.layers;
23

  
24
import java.awt.Component;
25

  
26
import javax.swing.JTree;
27
import javax.swing.tree.DefaultTreeCellRenderer;
28

  
29
import org.apache.commons.lang3.StringUtils;
30

  
31
/**
32
 * <p>
33
 * Tree cell renderer for {@link DefaultPortableViewLayersEditor} JTree
34
 * </p>
35
 * <p>
36
 * Nodes shows the name of layer.
37
 * </p>
38
 *
39
 * @author gvSIG Team
40
 * @version $Id$
41
 *
42
 */
43
public class LayerTreeCellRenderer extends DefaultTreeCellRenderer {
44

  
45
    /**
46
     *
47
     */
48
    private static final long serialVersionUID = 2372319888923346385L;
49

  
50
    @Override
51
    public Component getTreeCellRendererComponent(JTree tree, Object value,
52
        boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
53

  
54
        if (value instanceof LayerTreeNode) {
55
            LayerTreeNode layerNode = (LayerTreeNode) value;
56
            String layerName = layerNode.getLayer().getName();
57
            if (StringUtils.isBlank(layerName)) {
58
                layerName = "{No_Name}";
59
            }
60
            value = layerName;
61
        }
62

  
63
        return super.getTreeCellRendererComponent(tree, value, sel, expanded,
64
            leaf, row, hasFocus);
65
    }
66
}
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/java/org/gvsig/educa/portableview/swing/impl/editor/layers/DefaultPortableViewLayerPropertiesEditor.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.educa.portableview.swing.impl.editor.layers;
23

  
24
import java.awt.BorderLayout;
25
import java.awt.GridBagConstraints;
26
import java.awt.GridBagLayout;
27
import java.awt.Insets;
28
import java.awt.event.ActionEvent;
29
import java.awt.event.ActionListener;
30

  
31
import javax.swing.Box;
32
import javax.swing.BoxLayout;
33
import javax.swing.JButton;
34
import javax.swing.JCheckBox;
35
import javax.swing.JComponent;
36
import javax.swing.JLabel;
37
import javax.swing.JPanel;
38
import javax.swing.JTextField;
39

  
40
import org.gvsig.educa.portableview.swing.PortableViewSwingLocator;
41
import org.gvsig.educa.portableview.swing.PortableViewSwingManager;
42
import org.gvsig.educa.portableview.swing.editor.PortableViewLayerPropertiesEditor;
43
import org.gvsig.fmap.mapcontext.layers.FLayer;
44
import org.gvsig.tools.swing.api.ToolsSwingLocator;
45
import org.gvsig.tools.swing.api.usability.UsabilitySwingManager;
46

  
47
/**
48
 * <p>
49
 * Default implementation of PortableViewLayerPropertiesEditor
50
 * </p>
51
 * <p>
52
 * Allows to modify:
53
 * <ul>
54
 * <li>name</li>
55
 * <li>visibility</li>
56
 * <li>show in TOC</li>
57
 * </ul>
58
 * </p>
59
 *
60
 * TODO complete this??
61
 *
62
 * @author gvSIG Team
63
 * @version $Id$
64
 *
65
 */
66
public class DefaultPortableViewLayerPropertiesEditor extends JPanel implements
67
    PortableViewLayerPropertiesEditor, ActionListener {
68

  
69
    /**
70
     *
71
     */
72
    private static final long serialVersionUID = -8148127849062866099L;
73

  
74
    private static final GridBagConstraints LABEL_CONSTRAINT =
75
        new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0, 0,
76
            GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(4, 4,
77
                4, 10), 2, 2);
78

  
79
    private static final GridBagConstraints LARGE_LABEL_CONSTRAINT =
80
        new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 3, 0, 0,
81
            GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(4, 4,
82
                4, 10), 2, 2);
83

  
84
    private static final GridBagConstraints FIELD_CONSTRAINT =
85
        new GridBagConstraints(1, GridBagConstraints.RELATIVE,
86
            GridBagConstraints.REMAINDER, 1, 1, 0, GridBagConstraints.WEST,
87
            GridBagConstraints.HORIZONTAL, new Insets(4, 4, 4, 10), 2, 2);
88

  
89
    private static final GridBagConstraints LARGE_FIELD_CONSTRAINT =
90
        new GridBagConstraints(1, GridBagConstraints.RELATIVE,
91
            GridBagConstraints.REMAINDER, 3, 1, 1, GridBagConstraints.WEST,
92
            GridBagConstraints.BOTH, new Insets(4, 4, 4, 10), 2, 2);
93

  
94
    private final PortableViewSwingManager swingManager;
95

  
96
    private boolean initialized;
97

  
98
    private JTextField txtName;
99

  
100
    private JCheckBox chkVisible;
101

  
102
    private JCheckBox chkShowInToc;
103

  
104
    private final UsabilitySwingManager usabManager;
105

  
106
    private JButton botAccept;
107

  
108
    private JButton botCancel;
109

  
110
    private FLayer layer;
111

  
112
    /**
113
     *
114
     */
115
    public DefaultPortableViewLayerPropertiesEditor() {
116
        swingManager = PortableViewSwingLocator.getSwingManager();
117
        usabManager = ToolsSwingLocator.getUsabilitySwingManager();
118
        initialized = false;
119
    }
120

  
121
    /**
122
     * Initializes UI components
123
     */
124
    private void initializeUI() {
125
        if (initialized) {
126
            return;
127
        }
128
        setLayout(new BorderLayout());
129
        JPanel dataPanel = new JPanel();
130
        dataPanel.setLayout(new GridBagLayout());
131
        txtName = new JTextField();
132
        chkVisible =
133
            new JCheckBox(swingManager.getTranslation("layer_visible"));
134
        chkShowInToc =
135
            new JCheckBox(swingManager.getTranslation("layer_show_in_toc"));
136

  
137
        addField(dataPanel, "layer_name", txtName, false);
138
        addField(dataPanel, null, chkVisible, false);
139
        addField(dataPanel, null, chkShowInToc, true);
140
        add(dataPanel, BorderLayout.CENTER);
141

  
142
        JPanel commandsPanel = new JPanel();
143
        commandsPanel.setLayout(new BoxLayout(commandsPanel, BoxLayout.X_AXIS));
144
        commandsPanel.add(Box.createHorizontalGlue());
145
        botAccept =
146
            usabManager.createJButton(swingManager.getTranslation("accept"));
147
        botAccept.addActionListener(this);
148

  
149
        botCancel =
150
            usabManager.createJButton(swingManager.getTranslation("cancel"));
151
        botCancel.addActionListener(this);
152

  
153
        commandsPanel.add(botAccept);
154
        commandsPanel.add(Box.createHorizontalStrut(10));
155
        commandsPanel.add(botCancel);
156
        commandsPanel.add(Box.createHorizontalStrut(5));
157
        add(commandsPanel, BorderLayout.SOUTH);
158

  
159
        initialized = true;
160
    }
161

  
162
    /**
163
     * Add a field to form
164
     *
165
     * @param panel
166
     *            where add field
167
     * @param key
168
     *            for translation of field label
169
     * @param component
170
     *            input component
171
     * @param large
172
     *            if is a large field (multirow size)
173
     */
174
    private void addField(JPanel panel, String key, JComponent component,
175
        boolean large) {
176
        GridBagConstraints gbc;
177
        if (key != null) {
178
            gbc = LABEL_CONSTRAINT;
179
            if (large) {
180
                gbc = LARGE_LABEL_CONSTRAINT;
181
            }
182
            panel
183
                .add(new JLabel(swingManager.getTranslation(key)), gbc.clone());
184
        }
185
        gbc = FIELD_CONSTRAINT;
186
        if (large) {
187
            gbc = LARGE_FIELD_CONSTRAINT;
188
        }
189
        panel.add(component, gbc.clone());
190
    }
191

  
192
    /** {@inheridDoc} */
193
    public JComponent getSwingComponent() {
194
        initializeUI();
195
        return this;
196
    }
197

  
198
    /** {@inheridDoc} */
199
    public void setLayer(FLayer layer) {
200
        this.layer = layer;
201
        loadUI();
202
    }
203

  
204
    /** {@inheridDoc} */
205
    public void saveLayerData() {
206
        layer.setName(txtName.getText());
207
        layer.setInTOC(chkShowInToc.isSelected());
208
        layer.setVisible(chkVisible.isSelected());
209
    }
210

  
211
    /** {@inheridDoc} */
212
    public void discartAllChanges() {
213
        loadUI();
214
    }
215

  
216
    /**
217
     * Load data to UI components
218
     */
219
    private void loadUI() {
220
        initializeUI();
221
        txtName.setText(layer.getName());
222
        chkShowInToc.setSelected(layer.isInTOC());
223
        chkVisible.setSelected(layer.isVisible());
224
    }
225

  
226
    public void actionPerformed(ActionEvent e) {
227
        Object source = e.getSource();
228
        if (source == botAccept) {
229
            saveLayerData();
230
            close();
231
        }
232
        if (source == botCancel) {
233
            close();
234
        }
235

  
236
    }
237

  
238
    /**
239
     * Close panel
240
     */
241
    public void close() {
242
        setVisible(false);
243
    }
244

  
245
}
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/java/org/gvsig/educa/portableview/swing/impl/editor/StepIdentification.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.educa.portableview.swing.impl.editor;
23

  
24
import java.awt.GridBagConstraints;
25
import java.awt.GridBagLayout;
26
import java.awt.Insets;
27

  
28
import javax.swing.JComponent;
29
import javax.swing.JLabel;
30
import javax.swing.JPanel;
31
import javax.swing.JScrollPane;
32
import javax.swing.JTextArea;
33
import javax.swing.JTextField;
34

  
35
import org.apache.commons.lang3.StringUtils;
36

  
37
import org.gvsig.educa.portableview.compilation.PortableViewCompilation;
38
import org.gvsig.educa.portableview.compilation.PortableViewCompilationInformation;
39
import org.gvsig.educa.portableview.swing.PortableViewSwingLocator;
40
import org.gvsig.educa.portableview.swing.PortableViewSwingManager;
41
import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
42
import org.gvsig.gui.beans.wizard.panel.OptionPanel;
43

  
44
/**
45
 *
46
 * {@link DefaultPortableViewCompilationEditor} step which allows set/modify
47
 * information data of the compilation
48
 *
49
 * @author gvSIG Team
50
 * @version $Id$
51
 *
52
 */
53
public class StepIdentification extends JPanel implements OptionPanel {
54

  
55
    /**
56
     *
57
     */
58
    private static final long serialVersionUID = 5061121028061557890L;
59

  
60
    private static final GridBagConstraints LABEL_CONSTRAINT =
61
        new GridBagConstraints(GridBagConstraints.RELATIVE,
62
            GridBagConstraints.RELATIVE, 1, 1, 0, 0, GridBagConstraints.WEST,
63
            GridBagConstraints.NONE, new Insets(4, 4, 4, 10), 2, 2);
64

  
65
    private static final GridBagConstraints LARGE_LABEL_CONSTRAINT =
66
        new GridBagConstraints(GridBagConstraints.RELATIVE,
67
            GridBagConstraints.RELATIVE, 1, 3, 0, 0, GridBagConstraints.WEST,
68
            GridBagConstraints.NONE, new Insets(4, 4, 4, 10), 2, 2);
69

  
70
    private static final GridBagConstraints FIELD_CONSTRAINT =
71
        new GridBagConstraints(GridBagConstraints.RELATIVE,
72
            GridBagConstraints.RELATIVE, GridBagConstraints.REMAINDER, 1, 1, 0,
73
            GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(
74
                4, 4, 4, 10), 2, 2);
75

  
76
    private static final GridBagConstraints LARGE_FIELD_CONSTRAINT =
77
        new GridBagConstraints(GridBagConstraints.RELATIVE,
78
            GridBagConstraints.RELATIVE, GridBagConstraints.REMAINDER, 3, 1, 1,
79
            GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(4, 4,
80
                4, 10), 2, 2);
81

  
82
    private final PortableViewCompilation compilation;
83

  
84
    private final PortableViewSwingManager swingManager;
85

  
86
    @SuppressWarnings("unused")
87
    private final DefaultPortableViewCompilationEditor editor;
88

  
89
    private JTextField txtId;
90

  
91
    private JTextField txtName;
92

  
93
    private JTextField txtVersion;
94

  
95
    private JTextArea txtDescription;
96

  
97
    private boolean allowChangeId;
98

  
99
    /**
100
     * @param defaultPortableViewCompilationEditor
101
     * @param allowChangeId
102
     */
103
    public StepIdentification(
104
        DefaultPortableViewCompilationEditor defaultPortableViewCompilationEditor,
105
        boolean allowChangeId) {
106
        swingManager = PortableViewSwingLocator.getSwingManager();
107
        this.editor = defaultPortableViewCompilationEditor;
108
        this.compilation = defaultPortableViewCompilationEditor.getCompilation();
109
        this.allowChangeId = allowChangeId;
110
        initializeUI();
111
    }
112

  
113
    /**
114
     * Initialize UI components
115
     */
116
    private void initializeUI() {
117
        setLayout(new GridBagLayout());
118

  
119
        // Create input widgets
120
        txtId = new JTextField();
121
        txtId.setEditable(allowChangeId);
122
        txtName = new JTextField();
123
        txtVersion = new JTextField();
124
        txtDescription = new JTextArea();
125
        JScrollPane scrDescription = new JScrollPane(txtDescription);
126

  
127
        // Add components
128
        addField("portable_view_id", txtId, false);
129
        addField("portable_view_name", txtName, false);
130
        addField("portable_view_version", txtVersion, false);
131
        addField("portable_view_description", scrDescription, true);
132
    }
133

  
134
    /**
135
     * Add field to form
136
     *
137
     * @param key
138
     *            translation key for field name
139
     * @param component
140
     *            file input component
141
     * @param large
142
     *            if field is large
143
     */
144
    private void addField(String key, JComponent component, boolean large) {
145
        GridBagConstraints gbc = LABEL_CONSTRAINT;
146
        if (large) {
147
            gbc = LARGE_LABEL_CONSTRAINT;
148
        }
149
        add(new JLabel(swingManager.getTranslation(key)), gbc.clone());
150
        gbc = FIELD_CONSTRAINT;
151
        if (large) {
152
            gbc = LARGE_FIELD_CONSTRAINT;
153
        }
154
        add(component, gbc.clone());
155
    }
156

  
157
    /** {@inheridDoc} */
158
    public String getPanelTitle() {
159
        return swingManager.getTranslation("portable_view_information");
160
    }
161

  
162
    /** {@inheridDoc} */
163
    public void nextPanel() throws NotContinueWizardException {
164
        if (StringUtils.isBlank(txtId.getText())) {
165
            throw new NotContinueWizardException(
166
                swingManager.getTranslation("missing_id_value"), txtId, true);
167
        }
168
        if (StringUtils.isBlank(txtName.getText())) {
169
            throw new NotContinueWizardException(
170
                swingManager.getTranslation("missing_name_value"), txtName,
171
                true);
172
        }
173
        if (StringUtils.isBlank(txtVersion.getText())) {
174
            txtVersion.setText("1");
175
        }
176
        if (!StringUtils.isNumeric(txtVersion.getText())) {
177
            throw new NotContinueWizardException(
178
                swingManager.getTranslation("version_must_be_a_integer"),
179
                txtName, true);
180
        }
181
        PortableViewCompilationInformation info = compilation.getInformation();
182
        if (allowChangeId) {
183
            info.setId(StringUtils.trim(txtId.getText()));
184
        }
185
        info.setName(StringUtils.trim(txtName.getText()));
186
        info.setVersion(Integer.parseInt(StringUtils.trim(txtVersion.getText())));
187
        info.setDescription(StringUtils.trim(txtDescription.getText()));
188
    }
189

  
190
    /** {@inheridDoc} */
191
    public void lastPanel() {
192
        // TODO Auto-generated method stub
193

  
194
    }
195

  
196
    /** {@inheridDoc} */
197
    public void updatePanel() {
198
        PortableViewCompilationInformation info = compilation.getInformation();
199
        txtId.setText(info.getId());
200
        txtName.setText(info.getName());
201
        txtVersion.setText(String.valueOf(info.getVersion()));
202
        txtDescription.setText(info.getDescription());
203
    }
204

  
205
    /** {@inheridDoc} */
206
    public JPanel getJPanel() {
207
        return this;
208
    }
209

  
210
    /**
211
     * Informs if all data of the panel is ok
212
     *
213
     * @return
214
     */
215
    public boolean isPanelDataOk() {
216
        try {
217
            nextPanel();
218
        } catch (NotContinueWizardException ex) {
219
            return false;
220
        }
221
        return true;
222
    }
223

  
224
    public boolean isAllowChangeId() {
225
        return allowChangeId;
226
    }
227

  
228
    public void allowChangeId(boolean allow) {
229
        this.allowChangeId = allow;
230
        if (txtId != null) {
231
            txtId.setEnabled(allow);
232
        }
233

  
234
    }
235

  
236
}
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/java/org/gvsig/educa/portableview/swing/impl/editor/addlayer/StoreParametersCellEditor.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.educa.portableview.swing.impl.editor.addlayer;
23

  
24
import java.awt.Component;
25
import java.awt.GridBagConstraints;
26
import java.awt.GridBagLayout;
27
import java.awt.Insets;
28
import java.awt.event.ActionEvent;
29
import java.awt.event.ActionListener;
30

  
31
import javax.swing.AbstractCellEditor;
32
import javax.swing.JButton;
33
import javax.swing.JPanel;
34
import javax.swing.JTable;
35
import javax.swing.table.TableCellEditor;
36

  
37
import org.gvsig.educa.portableview.swing.PortableViewSwingLocator;
38
import org.gvsig.educa.portableview.swing.PortableViewSwingManager;
39
import org.gvsig.tools.swing.api.windowmanager.WindowManager.MODE;
40

  
41
/**
42
 * <p>
43
 * Store Parameters Table cell editor for
44
 * {@link DefaultPortableViewAddLayerComponent} sources list
45
 * </p>
46
 * <p>
47
 * Shows store parameter description (delegates on
48
 * {@link StoreParametersCellRenderer}) and a button which shows a dialog (
49
 * {@link StoreParametersEditor}) to modify the values.
50
 * </p>
51
 *
52
 * @author gvSIG Team
53
 * @version $Id$
54
 *
55
 */
56
public class StoreParametersCellEditor extends AbstractCellEditor implements
57
    ActionListener, TableCellEditor {
58

  
59
    /**
60
     *
61
     */
62
    private static final long serialVersionUID = -6112666198058347246L;
63

  
64
    private final PortableViewSwingManager swingManager;
65

  
66
    private final JPanel panel;
67
    private final StoreParametersCellRenderer renderer;
68
    private final JButton button;
69

  
70
    private final GridBagConstraints constrainLabel;
71
    private final GridBagConstraints constrainButton;
72

  
73
    /**
74
     *
75
     */
76
    public StoreParametersCellEditor() {
77
        swingManager = PortableViewSwingLocator.getSwingManager();
78
        panel = new JPanel(new GridBagLayout());
79
        renderer = new StoreParametersCellRenderer();
80
        this.button = new JButton("...");
81
        this.button.addActionListener(this);
82
        constrainLabel = new GridBagConstraints();
83
        constrainLabel.gridx = 0;
84
        constrainLabel.gridy = 0;
85
        constrainLabel.fill = GridBagConstraints.BOTH;
86
        constrainLabel.weightx = 1;
87
        constrainLabel.weighty = 1;
88
        constrainLabel.ipadx = 0;
89
        constrainLabel.ipady = 0;
90
        constrainLabel.insets = new Insets(0, 0, 0, 0);
91

  
92
        constrainButton = new GridBagConstraints();
93
        constrainButton.gridx = 1;
94
        constrainButton.gridy = 0;
95
        constrainButton.fill = GridBagConstraints.VERTICAL;
96
        constrainButton.weightx = 0;
97
        constrainButton.weighty = 1;
98
        constrainButton.insets = constrainLabel.insets;
99

  
100
    }
101

  
102
    public Object getCellEditorValue() {
103
        return renderer.getValue();
104
    }
105

  
106
    public void actionPerformed(ActionEvent e) {
107
        Object source = e.getSource();
108
        if (source == button) {
109
            showPropertiesPanel(renderer.getValue());
110
        }
111

  
112
    }
113

  
114
    /**
115
     * @param value
116
     */
117
    private void showPropertiesPanel(Object value) {
118
        swingManager.getWindowManager().showWindow(
119
            new StoreParametersEditor(renderer.getValue()),
120
            swingManager.getTranslation("edit_source_properties"), MODE.DIALOG);
121

  
122
    }
123

  
124
    public Component getTableCellEditorComponent(JTable table, Object value,
125
        boolean isSelected, int row, int column) {
126
        panel.removeAll();
127
        panel.add(renderer.getTableCellRendererComponent(table, value,
128
            isSelected, true, row, column), constrainLabel);
129
        panel.add(button, constrainButton);
130
        return panel;
131
    }
132

  
133
}
org.gvsig.educa.portableview/tags/org.gvsig.educa.portableview-1.0.44/org.gvsig.educa.portableview.swing/org.gvsig.educa.portableview.swing.impl/src/main/java/org/gvsig/educa/portableview/swing/impl/editor/addlayer/StoreParametersCellRenderer.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff