Revision 238

View differences:

tags/org.gvsig.customize.app-1.2.36/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<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">
4

  
5
  <modelVersion>4.0.0</modelVersion>
6
  <artifactId>org.gvsig.customize.app</artifactId>
7
  <packaging>pom</packaging>
8
  <name>${project.artifactId}</name>
9
  <version>1.2.36</version>
10
  <description>Customize some setting of gvSIG desktop</description>
11
  <parent>
12
      <groupId>org.gvsig</groupId>
13
      <artifactId>org.gvsig.desktop</artifactId>
14
      <version>2.0.187</version>
15
  </parent>
16
  <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop-customize</url>
17

  
18
  <scm>
19
      <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop-customize/tags/org.gvsig.customize.app-1.2.36</connection>
20
      <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop-customize/tags/org.gvsig.customize.app-1.2.36</developerConnection>
21
      <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop-customize/repository/show/tags/org.gvsig.customize.app-1.2.36</url>
22
  </scm>
23
    <repositories>
24
      <repository>
25
        <id>gvsig-public-http-repository</id>
26
        <name>gvSIG maven public HTTP repository</name>
27
        <url>http://devel.gvsig.org/m2repo/j2se</url>
28
        <releases>
29
          <enabled>true</enabled>
30
          <updatePolicy>daily</updatePolicy>
31
          <checksumPolicy>warn</checksumPolicy>
32
        </releases>
33
        <snapshots>
34
          <enabled>true</enabled>
35
          <updatePolicy>daily</updatePolicy>
36
          <checksumPolicy>warn</checksumPolicy>
37
        </snapshots>
38
      </repository>
39
    </repositories>
40
      
41
	<build>
42
		<plugins>
43
			<plugin>
44
				<groupId>org.apache.maven.plugins</groupId>
45
				<artifactId>maven-release-plugin</artifactId>
46
				<configuration>
47
					<tagBase>https://devel.gvsig.org/svn/gvsig-desktop-customize/tags</tagBase>
48
				</configuration>
49
			</plugin>
50
		</plugins>
51
	</build>
52

  
53
  <modules>
54
    <module>org.gvsig.customize.app.mainplugin</module>
55
  </modules>
56

  
57
</project>
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/buildNumber.properties
1
#Sun Jun 11 13:32:22 CEST 2017
2
buildNumber=46
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/resources-plugin/plugin-persistence.def
1
<?xml version="1.0"?>
2
<!--
3
Definitions of plugin persistence org.gvsig.editing.  
4
 -->
5
<definitions>
6
  <version>1.0.0</version>
7
  <classes>
8
    <class name="org.gvsig.customize.app.mainplugin">
9
      <description>Persistence for the customize plugin</description>
10
      <fields>
11
        <field name="configureLocale" Label="Apply locale" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
12
          <description>Apply default locale in next startup</description>
13
        </field>
14
        <field name="configureProjection" Label="Apply projection" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
15
          <description>Apply default proyection in next startup</description>
16
        </field>
17
        <field name="configureHTTPPproxy" Label="Apply proxy configuration" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
18
          <description>Apply default proyection in next startup</description>
19
        </field>
20
        <field name="configureOGCServers_WMS" Label="Apply WMS servers" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
21
          <description>Apply default WMS servers in next startup</description>
22
        </field>
23
        <field name="configureOGCServers_WMTS" Label="Apply WMTS servers" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
24
          <description>Apply default WMTS servers in next startup</description>
25
        </field>
26
        <field name="configureOGCServers_WCS" Label="Apply WCS servers" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
27
          <description>Apply default WCS servers in next startup</description>
28
        </field>
29
        <field name="configureOGCServers_WFS" Label="Apply WFS servers" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
30
          <description>Apply default WFS servers in next startup</description>
31
        </field>
32
        <field name="installAdditionalComponents" Label="Install additional components" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
33
          <description>Install additional components if required</description>
34
        </field>
35
        
36
        <field name="showCustomizeTools" Label="Show customize tools" type="Boolean" defaultValue="true" mandatory="false" group="Apply options">
37
          <description>Show the tools to customize and create distributions</description>
38
        </field>
39
        
40
        <field name="distributionID" Label="Distribution identifier" type="String" defaultValue="" mandatory="false" group="Create distribution">
41
          <description>Identifier to use to generate the distribution, only letters and numbers</description>
42
        </field>
43
        <field name="onlineInstaller" Label="Online installer" type="File" defaultValue="" mandatory="false" group="Create distribution">
44
          <description>Last online installer used to generate the distribution</description>
45
        </field>        
46
        <field name="packageSet" Label="Package set" type="File" defaultValue="" mandatory="false" group="Create distribution">
47
          <description>Last package set used to generate the distribution</description>
48
        </field>        
49
        <field name="WorkingFolder" Label="Working folder" type="File" defaultValue="" mandatory="false" group="Create distribution">
50
          <description>Last working folder used to generate the distribution</description>
51
        </field>        
52
        <field name="includeCustomizePlugin" Label="Include customize plugin" type="Boolean" defaultValue="true" mandatory="false" group="Create distribution">
53
          <description>Last value used for the flag of include customize plugins used to generate the distribution</description>
54
        </field>        
55
      </fields>
56
    </class>
57
  </classes>
58
</definitions>  
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/resources-plugin/i18n/text.properties
1
_Configuring_installation=Configurando la instalaci\u00f3n
2
_Close=Cerrar
3
_Terminating_installation=Terminando la instalaci\u00f3n
4
_Preparing_additional_components_installation=Preparando la instalaci\u00f3n de componentes adicionales
5
_Searching_available_packages=Buscando los paquetes disponibles
6
_Installing_{0}=Instalando {0}
7
_Installation_terminated=Instalaci\u00f3n terminada
8
_Additional_components_installed_succesfully_Restart_applicaction=Componentes adicionales instalados correctamente. Reinicie la aplicaci\u00f3n.
9
_Additional_components_installed_succesfully=Componentes adicionales instalados correctamente.
10
_Problems_installing_additional_components=Han habido problemas instalando los componentes adicionales.
11
_Installing_additional_components=Instalando componentes adicionales
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties
1
_Configuring_installation=Configuring installation
2
_Close=Close
3
_Terminating_installation=Terminating installation
4
_Preparing_additional_components_installation=Preparing additional components installation
5
_Searching_available_packages=Searching available packages
6
_Installing_{0}=Installing {0}
7
_Installation_terminated=Installation terminated
8
_Additional_components_installed_succesfully_Restart_applicaction=Additional components installed succesfully. Restart_applicaction.
9
_Additional_components_installed_succesfully=Additional components installed succesfully.
10
_Problems_installing_additional_components=Problems installing additional components.
11
_Installing_additional_components=Installing additional components
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/resources-plugin/theme/andami-theme.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

  
7
    This program is free software; you can redistribute it and/or
8
    modify it under the terms of the GNU General Public License
9
    as published by the Free Software Foundation; either version 3
10
    of the License, or (at your option) any later version.
11

  
12
    This program is distributed in the hope that it will be useful,
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
    GNU General Public License for more details.
16

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<AndamiProperties>
27
    <ApplicationImages>
28
        <SplashImages>
29
            <Splash
30
                path="splash.png"
31
                timer="10000"
32
                x="225" y="50"
33
                fontsize="16" color="80,170,240"
34
                version="${version}.${buildNumber} ${state}"/>
35
        </SplashImages>		
36
        <!--
37
        <BackgroundImage path="wallpaper.png"/>
38
        -->
39
        <!--
40
        <BackgroundColor color="0,0,0"/>
41
        -->
42
        <WallpaperType value="CENTERED"/>
43
        <Icon path="icon16x16.png"/>
44
    </ApplicationImages>
45
    <ApplicationName value="gvSIG ${version}.${buildNumber} ${state}"/>
46
    <priority value="1000"/>
47
</AndamiProperties>
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/resources-plugin/configure.form
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="ScriptAction">
7
      <description></description>
8
      <fields>
9
        <field name="name" label="Name" type="String" defaultValue="" mandatory="false">
10
          <description></description>
11
        </field>
12

  
13
        <field name="script" label="Script name" type="String" defaultValue="" mandatory="false">
14
          <description></description>
15
        </field>
16

  
17
        <field name="label" label="Label" type="String" defaultValue="" mandatory="false">
18
          <description></description>
19
        </field>
20

  
21
        <field name="icon" label="Icon name" type="String" defaultValue="" mandatory="false">
22
          <description></description>
23
        </field>
24

  
25
        <field name="position" label="Position" type="long" defaultValue="0" mandatory="false">
26
          <description></description>
27
        </field>
28

  
29
        <field name="tip" label="Tip" type="String" defaultValue="" mandatory="false">
30
          <description></description>
31
        </field>
32

  
33
      </fields>
34
    </class>
35

  
36
    <class name="ViewTocAction">
37
      <description></description>
38
      <fields>
39
        <field name="name" label="Action name" type="String" defaultValue="" mandatory="false">
40
          <description></description>
41
        </field>
42

  
43
        <field name="group" label="Group" type="String" defaultValue="" mandatory="false">
44
          <description></description>
45
        </field>
46

  
47
        <field name="grouporder" label="Group order" type="integer" defaultValue="0" mandatory="false">
48
          <description></description>
49
        </field>
50

  
51
      </fields>
52
    </class>
53

  
54
    <class name="ToolAction">
55
      <description></description>
56
      <fields>
57
        <field name="name" label="Action name" type="String" defaultValue="" mandatory="false">
58
          <description></description>
59
        </field>
60

  
61
        <field name="toolbarName" label="Toolbar name" type="String" defaultValue="" mandatory="false">
62
          <description></description>
63
        </field>
64

  
65
      </fields>
66
    </class>
67

  
68
    <class name="MenuAction">
69
      <description></description>
70
      <fields>
71
        <field name="name" label="Action name" type="String" defaultValue="" mandatory="false">
72
          <description></description>
73
        </field>
74

  
75
        <field name="text" label="Menu entry" type="String" defaultValue="" mandatory="false">
76
          <description></description>
77
        </field>
78

  
79
      </fields>
80
    </class>
81

  
82
    <class name="ServerURL">
83
      <description></description>
84
      <fields>
85
        <field name="remove" label="Remove" type="Boolean" defaultValue="false" mandatory="false">
86
          <description></description>
87
            <tags>
88
                    <value name="dynform.width" value="30" />
89
            </tags>
90
        </field>
91

  
92
        <field name="url" label="URL" type="String" defaultValue="" mandatory="false">
93
            <description></description>
94
        </field>
95

  
96
      </fields>
97
    </class>
98

  
99
    <class name="ProxyConfiguration">
100
      <description></description>
101
      <fields>
102
        <field name="host" label="Host" type="String" defaultValue="" mandatory="false">
103
          <description></description>
104
        </field>
105
        <field name="port" label="Port" type="String" defaultValue="" mandatory="false">
106
          <description></description>
107
        </field>
108
        <field name="username" label="User name" type="String" defaultValue="" mandatory="false">
109
          <description></description>
110
        </field>
111
        <field name="password" label="Password" type="String" defaultValue="" mandatory="false">
112
          <description></description>
113
        </field>
114
        <field name="nonProxyHosts" label="Non proxy hosts" type="String" defaultValue="" mandatory="false">
115
          <description></description>
116
        </field>
117
        <field name="promptUserAndPassword" label="Prompt user and password" type="boolean" defaultValue="false" mandatory="false">
118
          <description></description>
119
        </field>
120
        <field name="enabled" label="Enabled" type="boolean" defaultValue="false" mandatory="false">
121
          <description></description>
122
        </field>
123
      </fields>
124
    </class>
125

  
126
    <class name="CRSConfiguration">
127
      <description></description>
128
      <fields>
129
        <field name="default_projection" label="Default projection" type="CRS" defaultValue="EPSG:4326" mandatory="false">
130
          <description>Default projection to use in gvSIG</description>
131
        </field>
132
        <field name="recent11" label="Recent projection 1" type="Object" classOfValue="org.cresques.cts.IProjection" type="CRS" defaultValue="" mandatory="false">
133
          <description>Projection to add to recent used projections</description>
134
        </field>
135
        <field name="recent2" label="Recent projection 2" type="CRS" defaultValue="" mandatory="false">
136
          <description>Projection to add to recent used projections</description>
137
        </field>
138
        <field name="recent3" label="Recent projection 3" type="CRS" defaultValue="" mandatory="false">
139
          <description>Projection to add to recent used projections</description>
140
        </field>
141
        <field name="recent4" label="Recent projection 4" type="CRS" defaultValue="" mandatory="false">
142
          <description>Projection to add to recent used projections</description>
143
        </field>
144
      </fields>
145
    </class>
146

  
147
    <class name="ThemeConfiguration">
148
      <description></description>
149
      <fields>
150
        <field name="applicationname" label="Application title" type="String" defaultValue="gvSIG ${version}.${buildNumber} ${state}" mandatory="false">
151
          <description></description>
152
        </field>
153
        <field name="icon" label="Icon image" type="File" defaultValue="icon16x16.png" mandatory="false">
154
          <description></description>
155
        </field>
156
        <field name="splash_image" label="Splash image" type="File" defaultValue="splash.png" mandatory="false">
157
          <description></description>
158
        </field>
159
        <field name="splash_version" label="Version" type="String" defaultValue="${version}.${buildNumber} ${state}" mandatory="false">
160
          <description></description>
161
        </field>
162
        <field name="splash_x" label="Version position X" type="Integer" defaultValue="225" mandatory="false">
163
          <description></description>
164
        </field>
165
        <field name="splash_y" label="Version position Y" type="Integer" defaultValue="50" mandatory="false">
166
          <description></description>
167
        </field>
168
        <field name="splash_font_size" label="Version font size" type="integer" defaultValue="16" mandatory="false">
169
          <description></description>
170
        </field>
171
        <field name="splash_font_color" label="Version font color" type="String" defaultValue="80,170,240" mandatory="false">
172
          <description></description>
173
        </field>
174

  
175
        <field name="wallpaper_image" label="Wallpaper image" type="File" defaultValue="" mandatory="false">
176
          <description></description>
177
        </field>
178
        <field name="wallpaper_mode" label="Wallpaper mode" type="String" defaultValue="CENTERED" mandatory="false">
179
            <description></description>
180
            <availableValues>
181
                    <value label="Centered">CENTERED</value>
182
                    <value label="Expand">EXPAND</value>
183
                    <value label="Mosaic">MOSAIC</value>
184
            </availableValues>
185
        </field>
186
        <field name="background_color" label="Background color" type="String" defaultValue="" mandatory="false">
187
          <description></description>
188
        </field>
189
      </fields>
190
    </class>
191

  
192
    <class name="Configuration">
193
      <description>Customize plugin configuration</description>
194
      <fields>
195
        <field name="default_locale" label="Default locale" type="String" subtype="locale" defaultValue="" mandatory="false" group="Locale">
196
          <description>Default locale to use in gvSIG</description>
197
        </field>
198

  
199
        <field name="crs" type="DynObject" classOfValue="CRSConfiguration" defaultValue="" mandatory="false" group="CRS">
200
          <description></description>
201
            <tags>
202
                    <value name="dynform.label.empty" value="true" />
203
            </tags>
204
        </field>
205

  
206
        <field name="httpproxy" type="DynObject" classOfValue="ProxyConfiguration" defaultValue="" mandatory="false" group="Proxy">
207
          <description></description>
208
            <tags>
209
                    <value name="dynform.label.empty" value="true" />
210
            </tags>
211
        </field>
212

  
213
        <field name="wmsUrls" label="WMS URLs" type="List" subtype="DynObject" typeOfItems="DynObject" classOfItems="ServerURL" defaultValue="" mandatory="false" group="WMS">
214
            <description></description>
215
            <tags>
216
                    <value name="dynform.height" value="300" />
217
                    <value name="ViewMode" value="SimpleTable" />
218
                    <value name="dynform.label.empty" value="true" />
219
            </tags>
220
        </field>
221

  
222
        <field name="wmtsUrls" label="WMTS URLs" type="List" subtype="DynObject" typeOfItems="DynObject" classOfItems="ServerURL" defaultValue="" mandatory="false" group="WMTS">
223
            <description></description>
224
            <tags>
225
                    <value name="dynform.height" value="300" />
226
                    <value name="ViewMode" value="SimpleTable" />
227
                    <value name="dynform.label.empty" value="true" />
228
            </tags>
229
        </field>
230

  
231
        <field name="wcsUrls" label="WCS URLs" type="List" subtype="DynObject" typeOfItems="DynObject" classOfItems="ServerURL" defaultValue="" mandatory="false" group="WCS">
232
            <description></description>
233
            <tags>
234
                    <value name="dynform.height" value="300" />
235
                    <value name="ViewMode" value="SimpleTable" />
236
                    <value name="dynform.label.empty" value="true" />
237
            </tags>
238
        </field>
239

  
240
        <field name="wfsUrls" label="WFS URLs" type="List" subtype="DynObject" typeOfItems="DynObject" classOfItems="ServerURL" defaultValue="" mandatory="false" group="WFS">
241
            <description></description>
242
            <tags>
243
                    <value name="dynform.height" value="300" />
244
                    <value name="ViewMode" value="SimpleTable" />
245
                    <value name="dynform.label.empty" value="true" />
246
            </tags>
247
        </field>
248

  
249
        <field name="theme" type="DynObject" classOfValue="ThemeConfiguration" defaultValue="" mandatory="false" group="Theme">
250
          <description></description>
251
            <tags>
252
                    <value name="dynform.label.empty" value="true" />
253
            </tags>
254
        </field>
255

  
256
        <field name="scriptActions" type="List" subtype="DynObject" typeOfItems="DynObject" classOfItems="ScriptAction"
257
                mandatory="false" defaultValue="" group="Script actions">
258
                <description></description>
259
                <tags>
260
                        <value name="dynform.label.empty" value="true" />
261
                        <value name="dynform.border.empty" value="true" />
262
                        <value name="allowNew" value="true" />
263
                        <value name="allowDelete" value="true" />
264
                        <value name="allowUpdate" value="true" />
265
                        <value name="allowSearch" value="false" />
266
                        <value name="allowClose" value="false" />
267
                </tags>
268
        </field>
269

  
270
        <field name="viewTocActions" type="List" subtype="DynObject" typeOfItems="DynObject" classOfItems="ViewTocAction"
271
                mandatory="false" defaultValue="" group="View TOC actions">
272
                <description></description>
273
                <tags>
274
                        <value name="dynform.label.empty" value="true" />
275
                        <value name="dynform.border.empty" value="true" />
276
                        <value name="allowNew" value="true" />
277
                        <value name="allowDelete" value="true" />
278
                        <value name="allowUpdate" value="true" />
279
                        <value name="allowSearch" value="false" />
280
                        <value name="allowClose" value="false" />
281
                </tags>
282
        </field>
283

  
284
        <field name="toolActions" type="List" subtype="DynObject" typeOfItems="DynObject" classOfItems="ToolAction"
285
                mandatory="false" defaultValue="" group="Tool actions">
286
                <description></description>
287
                <tags>
288
                        <value name="dynform.label.empty" value="true" />
289
                        <value name="dynform.border.empty" value="true" />
290
                        <value name="allowNew" value="true" />
291
                        <value name="allowDelete" value="true" />
292
                        <value name="allowUpdate" value="true" />
293
                        <value name="allowSearch" value="false" />
294
                        <value name="allowClose" value="false" />
295
                </tags>
296
        </field>
297

  
298
        <field name="menuActions" type="List" subtype="DynObject" typeOfItems="DynObject" classOfItems="MenuAction"
299
                mandatory="false" defaultValue="" group="Menu actions">
300
                <description></description>
301
                <tags>
302
                        <value name="dynform.label.empty" value="true" />
303
                        <value name="dynform.border.empty" value="true" />
304
                        <value name="dynform.action.new" value="true" />
305
                        <value name="allowNew" value="true" />
306
                        <value name="allowDelete" value="true" />
307
                        <value name="allowUpdate" value="true" />
308
                        <value name="allowSearch" value="false" />
309
                        <value name="allowClose" value="false" />
310
                </tags>
311
        </field>
312

  
313
      </fields>
314
    </class>
315
  </classes>
316
</definitions>  
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/resources-plugin/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<plugin-config>
3
    <libraries library-dir="lib/"/>
4
    <depends plugin-name="org.gvsig.app.mainplugin"/>
5
    <resourceBundle name="text"/>
6
    <extensions>
7

  
8
        <extension class-name="org.gvsig.customize.CustomizeExtension" active="true">
9

  
10
            <action 
11
                name="tools-customize-create-distribution" 
12
                label="_Create_distribution"
13
                tooltip="_Create_distribution" 
14
                action-command="tools-customize-create-distribution"
15
                icon="tools-customize-create-distribution" 
16
                position="900400050" 
17
                accelerator="" 
18
            />
19
            <action 
20
                name="tools-customize-edit-configuration" 
21
                label="_Edit_configuration"
22
                tooltip="_Edit_configuration" 
23
                action-command="tools-customize-edit-configuration"
24
                icon="tools-customize-edit-configuration" 
25
                position="900400060" 
26
                accelerator="" 
27
            />
28
            <menu
29
                name="tools-customize-edit-configuration" 
30
                text="tools/Customize/_Edit_configuration"
31
            />
32
            <menu
33
                name="tools-customize-create-distribution" 
34
                text="tools/Customize/_Create_distribution"
35
            />
36
        </extension>  
37
    </extensions>
38
</plugin-config>
39

  
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

  
7
    This program is free software; you can redistribute it and/or
8
    modify it under the terms of the GNU General Public License
9
    as published by the Free Software Foundation; either version 3
10
    of the License, or (at your option) any later version.
11

  
12
    This program is distributed in the hope that it will be useful,
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
    GNU General Public License for more details.
16

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<assembly>
27
  <id>gvsig-plugin-package</id>
28
  <formats>
29
    <format>zip</format>
30
  </formats>
31
  <baseDirectory>${project.artifactId}</baseDirectory>
32
  <includeBaseDirectory>true</includeBaseDirectory>
33
  <files>
34
    <file>
35
      <source>target/${project.artifactId}-${project.version}.jar</source>
36
      <outputDirectory>lib</outputDirectory>
37
    </file>
38
    <file>
39
      <source>target/package.info</source>
40
    </file>
41
  </files>
42

  
43
  <fileSets>
44
    <fileSet>
45
      <directory>src/main/resources-plugin</directory>
46
      <outputDirectory>.</outputDirectory>
47
    </fileSet>
48
  </fileSets>
49
  
50

  
51
<!--
52
    Si le quito los comentarios y dejo la seccion includes vacia, me incluye
53
    si o si, todas depedencias, como si no hiciese caso del parametro 
54
    useTransitiveDependencies
55
  <dependencySets>
56
    <dependencySet>
57
      <useProjectArtifact>false</useProjectArtifact>
58
      <useTransitiveDependencies>false</useTransitiveDependencies>
59
      <outputDirectory>lib</outputDirectory>
60
      <includes>
61
      </includes>
62
    </dependencySet>
63
  </dependencySets>
64
-->
65

  
66
</assembly>
67

  
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/CustomizeExtension.java
1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package org.gvsig.customize;
7

  
8
import java.awt.event.ActionEvent;
9
import java.awt.event.ActionListener;
10
import javax.swing.JOptionPane;
11
import org.gvsig.andami.PluginsLocator;
12
import org.gvsig.andami.PluginsManager;
13
import org.gvsig.andami.plugins.Extension;
14
import org.gvsig.app.ApplicationLocator;
15
import org.gvsig.app.ApplicationManager;
16
import org.gvsig.customize.locale.JDynFormFieldLocaleFactory;
17
import org.gvsig.tools.ToolsLocator;
18
import org.gvsig.tools.dynform.spi.DynFormSPILocator;
19
import org.gvsig.tools.dynform.spi.DynFormSPIManager;
20
import org.gvsig.tools.packageutils.PackageManager;
21
import org.gvsig.tools.swing.api.ToolsSwingLocator;
22
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
23
import org.slf4j.Logger;
24
import org.slf4j.LoggerFactory;
25

  
26
/**
27
 *
28
 * @author usuario
29
 */
30
public class CustomizeExtension extends Extension {
31

  
32
    private final static Logger logger = LoggerFactory.getLogger(CustomizeExtension.class);
33

  
34
    @Override
35
    public void initialize() {
36
        PluginsManager pluginsManager = PluginsLocator.getManager();
37
        pluginsManager.addStartupTask("Customize", new CustomizeTask(), false, 2000);
38
        DynFormSPIManager manager = DynFormSPILocator.getDynFormSPIManager();
39
        if( manager != null ) {
40
            manager.addServiceFactory(new JDynFormFieldLocaleFactory());
41
        }
42
    }
43

  
44
    @Override
45
    public void execute(String actionCommand) {
46
        if ("tools-customize-create-distribution".equalsIgnoreCase(actionCommand)) {
47
            final DistributionParametersPanel panel = new DistributionParametersPanel();
48
            panel.setCloseAndCreateVisible(true);
49
            panel.addActionListener(new ActionListener() {
50
                @Override
51
                public void actionPerformed(ActionEvent ae) {
52
                    doCreateDistributionTask(panel);
53
                }
54
            });
55
            WindowManager windowManager = ToolsSwingLocator.getWindowManager();
56
            windowManager.showWindow(panel, "Create distribution", WindowManager.MODE.WINDOW);
57
        } else if ("tools-customize-edit-configuration".equalsIgnoreCase(actionCommand)) {
58
            Configuration config = new Configuration();
59
            config.edit();
60
        }
61
    }
62

  
63

  
64

  
65
    private void doCreateDistributionTask(final DistributionParametersPanel panel) {
66
        ApplicationManager application = ApplicationLocator.getManager();
67

  
68
        if( panel.getOnlineInstaller()==null ) {
69
            application.messageDialog(
70
                    "Shall specify the online installer to use",
71
                    "Parameter required",
72
                    JOptionPane.WARNING_MESSAGE);
73
            return;
74
        }
75
        if( panel.getWorkingFolder()==null ) {
76
            application.messageDialog(
77
                    "Shall specify the working folder to use",
78
                    "Parameter required",
79
                    JOptionPane.WARNING_MESSAGE);
80
            return;
81
        }
82
//        if( panel.getPackageSet()==null ) {
83
//            application.messageDialog(
84
//                    "Shall specify the package set to use",
85
//                    "Parameter required",
86
//                    JOptionPane.WARNING_MESSAGE);
87
//            return;
88
//        }
89
        if( panel.getDistributionId()==null ) {
90
            application.messageDialog(
91
                    "Shall specify the identifier of the new distribution",
92
                    "Parameter required",
93
                    JOptionPane.WARNING_MESSAGE);
94
            return;
95
        }
96

  
97
        panel.setCloseAndCreateEnabled(false);
98

  
99
        final DistributionBuilder builder = new DistributionBuilder(panel);
100
        builder.setDistributionId(panel.getDistributionId());
101
        builder.setOnlineInstaller(panel.getOnlineInstaller());
102
        builder.setPackageSet(panel.getPackageSetFolder());
103
        builder.setWorkingFolder(panel.getWorkingFolder());
104
        builder.setIncludeCustomizePlugin(panel.getIncludeCustomizePlugin());
105

  
106
        Thread task = new Thread(new Runnable() {
107
            @Override
108
            public void run() {
109
                try {
110
                    builder.build();
111
                } finally {
112
                    panel.setCloseAndCreateEnabled(true);
113
                }
114
            }
115
        });
116
        task.start();
117
    }
118

  
119
    public boolean isEnabled() {
120
        return true;
121
    }
122

  
123
    public boolean isVisible() {
124
        return true;
125
    }
126
}
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/locale/JDynFormFieldLocaleFactory.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.customize.locale;
25

  
26
import org.gvsig.tools.ToolsLocator;
27
import org.gvsig.tools.dataTypes.DataTypes;
28
import org.gvsig.tools.dynform.spi.DynFormSPILocator;
29
import org.gvsig.tools.dynform.spi.DynFormSPIManager;
30
import org.gvsig.tools.dynform.spi.JDynFormFieldFactory;
31
import org.gvsig.tools.dynobject.DynField;
32
import org.gvsig.tools.dynobject.DynObject;
33
import org.gvsig.tools.dynobject.DynObjectManager;
34
import org.gvsig.tools.dynobject.DynStruct;
35
import org.gvsig.tools.service.Service;
36
import org.gvsig.tools.service.ServiceException;
37
import org.gvsig.tools.service.spi.ServiceManager;
38

  
39
public class JDynFormFieldLocaleFactory implements JDynFormFieldFactory {
40

  
41
	private String name = null;
42
	private DynStruct parametersDefinition = null;
43
	
44
	public String getName() {
45
		if( name == null ) {
46
			DynFormSPIManager manager = DynFormSPILocator.getDynFormSPIManager();
47
			this.name = manager.makeServiceName(DataTypes.STRING, "locale");
48
		}
49
		return this.name;
50
	}
51

  
52

  
53
	public Service create(DynObject parameters, ServiceManager serviceManager)
54
			throws ServiceException {
55
		return new JDynFormFieldLocale(parameters, serviceManager);
56
	}
57

  
58
	public DynObject createParameters() {
59
		return ToolsLocator.getDynObjectManager().createDynObject(parametersDefinition);
60
	}
61

  
62
	public void initialize() {
63
		if( this.parametersDefinition == null ) {
64
			String serviceName = this.getName();
65
    		DynObjectManager manager = ToolsLocator.getDynObjectManager();
66
    		this.parametersDefinition = manager.createDynClass(
67
    				serviceName, "Parameters definition for locale fields in dynamic forms");
68
    		this.parametersDefinition.addDynFieldObject(DynFormSPIManager.FIELD_FIELDDEFINITION)
69
				.setClassOfValue(DynField.class).setMandatory(true);
70
    		this.parametersDefinition.addDynFieldObject(DynFormSPIManager.FIELD_VALUE)
71
				.setClassOfValue(DynField.class).setMandatory(true);
72
		}
73
	}
74

  
75

  
76
}
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/locale/JDynFormFieldLocale.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.customize.locale;
25

  
26
import java.util.Locale;
27
import java.util.Set;
28
import javax.swing.JComboBox;
29
import org.apache.commons.lang3.StringUtils;
30
import org.gvsig.andami.LocaleManager;
31
import org.gvsig.andami.PluginsLocator;
32
import org.gvsig.tools.dynform.spi.dynformfield.AbstractJDynFormFieldWithValueList;
33
import org.gvsig.tools.dynobject.DynObject;
34
import org.gvsig.tools.dynobject.DynObjectValueItem;
35
import org.gvsig.tools.service.spi.ServiceManager;
36

  
37
public class JDynFormFieldLocale extends AbstractJDynFormFieldWithValueList {
38
	
39
	public JDynFormFieldLocale(DynObject parameters,
40
			ServiceManager serviceManager) {
41
		super(parameters, serviceManager);
42
	}
43
	
44
	protected String getDefaultValue(){
45
		return "";
46
	}
47

  
48
	public Object getValue() {
49
		Object value = null;
50
		String s = this.getValueFromJComponent();
51
		if( StringUtils.isBlank(s) ) {
52
			Object x = this.getDefinition().getDefaultValue();
53
			if( x != null ) {
54
                            value = x.toString();
55
			}
56
		} else {
57
			value = s;
58
		}
59
		return value;
60
	}
61
        
62
        @Override
63
	public void initComponent() {
64
            LocaleManager localeManager = PluginsLocator.getLocaleManager();
65
            Set<Locale> localesSet = localeManager.getInstalledLocales();
66
            DynObjectValueItem[] locales = new DynObjectValueItem[localesSet.size()];
67
            int i=0;
68
            for( Locale locale : localesSet ) {
69
                locales[i++] = new DynObjectValueItem(
70
                        locale.toString(), 
71
                        localeManager.getLocaleDisplayName(locale)
72
                );
73
            }
74
            this.contents = new JComboBox(locales);
75
            if( locales.length>0 ) {
76
                    this.getJComboBox().setSelectedIndex(0);
77
            }
78
            this.contents.addFocusListener(this);
79
            if( this.getDefinition().isReadOnly() ) {
80
                    this.getJComboBox().setEditable(false);
81
            }
82
            this.setValue(this.assignedValue);
83
	}
84
	
85
}
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/DistributionParametersPanelLayout.java
1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package org.gvsig.customize;
7

  
8
/**
9
 *
10
 * @author jjdelcerro
11
 */
12
public class DistributionParametersPanelLayout extends javax.swing.JPanel {
13

  
14
    /**
15
     * Creates new form DistributionPanelLayout
16
     */
17
    public DistributionParametersPanelLayout() {
18
        initComponents();
19
    }
20

  
21
    /**
22
     * This method is called from within the constructor to initialize the form.
23
     * WARNING: Do NOT modify this code. The content of this method is always
24
     * regenerated by the Form Editor.
25
     */
26
    @SuppressWarnings("unchecked")
27
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
28
    private void initComponents() {
29
        java.awt.GridBagConstraints gridBagConstraints;
30

  
31
        filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(2, 2), new java.awt.Dimension(2, 2), new java.awt.Dimension(2, 2));
32
        filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(2, 2), new java.awt.Dimension(2, 2), new java.awt.Dimension(2, 2));
33
        jTabbedPane1 = new javax.swing.JTabbedPane();
34
        jPanel2 = new javax.swing.JPanel();
35
        filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4));
36
        lblOnlineInstaller = new javax.swing.JLabel();
37
        txtOnlineInstaller = new javax.swing.JTextField();
38
        butBrowseOnlineInstaller = new javax.swing.JButton();
39
        lblDistributionId = new javax.swing.JLabel();
40
        txtDistributionId = new javax.swing.JTextField();
41
        lblPackageSet = new javax.swing.JLabel();
42
        txtPackageSet = new javax.swing.JTextField();
43
        butBrowsePackageSet = new javax.swing.JButton();
44
        lblWorkingFolder = new javax.swing.JLabel();
45
        txtWorkingFolder = new javax.swing.JTextField();
46
        butBrowseWorkingFolder = new javax.swing.JButton();
47
        lblIncludeCustomizePlugin = new javax.swing.JLabel();
48
        chkIncludeCustomizePlugin = new javax.swing.JCheckBox();
49
        filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4));
50
        filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
51
        jPanel1 = new javax.swing.JPanel();
52
        filler6 = new javax.swing.Box.Filler(new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4));
53
        butAddPackage = new javax.swing.JButton();
54
        butRemovePackage = new javax.swing.JButton();
55
        jScrollPane2 = new javax.swing.JScrollPane();
56
        lstPackages = new javax.swing.JList();
57
        lblPackagesToInclude = new javax.swing.JLabel();
58
        lblCheckToInstallByDefault = new javax.swing.JLabel();
59
        filler9 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
60
        filler10 = new javax.swing.Box.Filler(new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4), new java.awt.Dimension(4, 4));
61
        butCheckAll = new javax.swing.JButton();
62
        butUncheckAll = new javax.swing.JButton();
63
        butClose = new javax.swing.JButton();
64
        butCreate = new javax.swing.JButton();
65
        filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
66
        lblMessages = new javax.swing.JLabel();
67

  
68
        java.awt.GridBagLayout layout = new java.awt.GridBagLayout();
69
        layout.columnWidths = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0};
70
        layout.rowHeights = new int[] {0, 5, 0, 5, 0, 5, 0};
71
        setLayout(layout);
72
        gridBagConstraints = new java.awt.GridBagConstraints();
73
        gridBagConstraints.gridx = 8;
74
        gridBagConstraints.gridy = 6;
75
        add(filler1, gridBagConstraints);
76
        gridBagConstraints = new java.awt.GridBagConstraints();
77
        gridBagConstraints.gridx = 0;
78
        gridBagConstraints.gridy = 0;
79
        add(filler6, gridBagConstraints);
80

  
81
        java.awt.GridBagLayout jPanel2Layout = new java.awt.GridBagLayout();
82
        jPanel2Layout.columnWidths = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0};
83
        jPanel2Layout.rowHeights = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0};
84
        jPanel2.setLayout(jPanel2Layout);
85
        gridBagConstraints = new java.awt.GridBagConstraints();
86
        gridBagConstraints.gridx = 0;
87
        gridBagConstraints.gridy = 0;
88
        jPanel2.add(filler3, gridBagConstraints);
89

  
90
        lblOnlineInstaller.setText("Online installer");
91
        gridBagConstraints = new java.awt.GridBagConstraints();
92
        gridBagConstraints.gridx = 2;
93
        gridBagConstraints.gridy = 4;
94
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
95
        jPanel2.add(lblOnlineInstaller, gridBagConstraints);
96
        gridBagConstraints = new java.awt.GridBagConstraints();
97
        gridBagConstraints.gridx = 4;
98
        gridBagConstraints.gridy = 4;
99
        gridBagConstraints.gridwidth = 5;
100
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
101
        gridBagConstraints.weightx = 0.1;
102
        jPanel2.add(txtOnlineInstaller, gridBagConstraints);
103

  
104
        butBrowseOnlineInstaller.setText("Browse...");
105
        gridBagConstraints = new java.awt.GridBagConstraints();
106
        gridBagConstraints.gridx = 10;
107
        gridBagConstraints.gridy = 4;
108
        jPanel2.add(butBrowseOnlineInstaller, gridBagConstraints);
109

  
110
        lblDistributionId.setText("Distribution id");
111
        gridBagConstraints = new java.awt.GridBagConstraints();
112
        gridBagConstraints.gridx = 2;
113
        gridBagConstraints.gridy = 2;
114
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
115
        jPanel2.add(lblDistributionId, gridBagConstraints);
116
        gridBagConstraints = new java.awt.GridBagConstraints();
117
        gridBagConstraints.gridx = 4;
118
        gridBagConstraints.gridy = 2;
119
        gridBagConstraints.gridwidth = 7;
120
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
121
        gridBagConstraints.weightx = 0.5;
122
        jPanel2.add(txtDistributionId, gridBagConstraints);
123

  
124
        lblPackageSet.setText("Package set");
125
        gridBagConstraints = new java.awt.GridBagConstraints();
126
        gridBagConstraints.gridx = 2;
127
        gridBagConstraints.gridy = 6;
128
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
129
        jPanel2.add(lblPackageSet, gridBagConstraints);
130
        gridBagConstraints = new java.awt.GridBagConstraints();
131
        gridBagConstraints.gridx = 4;
132
        gridBagConstraints.gridy = 6;
133
        gridBagConstraints.gridwidth = 5;
134
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
135
        gridBagConstraints.weightx = 0.1;
136
        jPanel2.add(txtPackageSet, gridBagConstraints);
137

  
138
        butBrowsePackageSet.setText("Browse...");
139
        gridBagConstraints = new java.awt.GridBagConstraints();
140
        gridBagConstraints.gridx = 10;
141
        gridBagConstraints.gridy = 6;
142
        jPanel2.add(butBrowsePackageSet, gridBagConstraints);
143

  
144
        lblWorkingFolder.setText("Working folder");
145
        gridBagConstraints = new java.awt.GridBagConstraints();
146
        gridBagConstraints.gridx = 2;
147
        gridBagConstraints.gridy = 8;
148
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
149
        jPanel2.add(lblWorkingFolder, gridBagConstraints);
150
        gridBagConstraints = new java.awt.GridBagConstraints();
151
        gridBagConstraints.gridx = 4;
152
        gridBagConstraints.gridy = 8;
153
        gridBagConstraints.gridwidth = 5;
154
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
155
        gridBagConstraints.weightx = 0.1;
156
        jPanel2.add(txtWorkingFolder, gridBagConstraints);
157

  
158
        butBrowseWorkingFolder.setText("Browse...");
159
        gridBagConstraints = new java.awt.GridBagConstraints();
160
        gridBagConstraints.gridx = 10;
161
        gridBagConstraints.gridy = 8;
162
        jPanel2.add(butBrowseWorkingFolder, gridBagConstraints);
163

  
164
        lblIncludeCustomizePlugin.setText("Include Customize Plugin");
165
        gridBagConstraints = new java.awt.GridBagConstraints();
166
        gridBagConstraints.gridx = 2;
167
        gridBagConstraints.gridy = 10;
168
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
169
        jPanel2.add(lblIncludeCustomizePlugin, gridBagConstraints);
170
        gridBagConstraints = new java.awt.GridBagConstraints();
171
        gridBagConstraints.gridx = 4;
172
        gridBagConstraints.gridy = 10;
173
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
174
        jPanel2.add(chkIncludeCustomizePlugin, gridBagConstraints);
175
        gridBagConstraints = new java.awt.GridBagConstraints();
176
        gridBagConstraints.gridx = 12;
177
        gridBagConstraints.gridy = 12;
178
        jPanel2.add(filler7, gridBagConstraints);
179
        gridBagConstraints = new java.awt.GridBagConstraints();
180
        gridBagConstraints.gridx = 0;
181
        gridBagConstraints.gridy = 12;
182
        gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
183
        gridBagConstraints.weighty = 0.4;
184
        jPanel2.add(filler4, gridBagConstraints);
185

  
186
        jTabbedPane1.addTab("General", jPanel2);
187

  
188
        java.awt.GridBagLayout jPanel1Layout = new java.awt.GridBagLayout();
189
        jPanel1Layout.columnWidths = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0};
190
        jPanel1Layout.rowHeights = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0};
191
        jPanel1.setLayout(jPanel1Layout);
192
        gridBagConstraints = new java.awt.GridBagConstraints();
193
        gridBagConstraints.gridx = 0;
194
        gridBagConstraints.gridy = 0;
195
        jPanel1.add(filler6, gridBagConstraints);
196

  
197
        butAddPackage.setText("Add");
198
        gridBagConstraints = new java.awt.GridBagConstraints();
199
        gridBagConstraints.gridx = 8;
200
        gridBagConstraints.gridy = 8;
201
        jPanel1.add(butAddPackage, gridBagConstraints);
202

  
203
        butRemovePackage.setText("Remove");
204
        gridBagConstraints = new java.awt.GridBagConstraints();
205
        gridBagConstraints.gridx = 10;
206
        gridBagConstraints.gridy = 8;
207
        jPanel1.add(butRemovePackage, gridBagConstraints);
208

  
209
        jScrollPane2.setViewportView(lstPackages);
210

  
211
        gridBagConstraints = new java.awt.GridBagConstraints();
212
        gridBagConstraints.gridx = 2;
213
        gridBagConstraints.gridy = 6;
214
        gridBagConstraints.gridwidth = 9;
215
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
216
        gridBagConstraints.weightx = 0.1;
217
        gridBagConstraints.weighty = 0.1;
218
        jPanel1.add(jScrollPane2, gridBagConstraints);
219

  
220
        lblPackagesToInclude.setText("Packages to include in the distribution");
221
        gridBagConstraints = new java.awt.GridBagConstraints();
222
        gridBagConstraints.gridx = 2;
223
        gridBagConstraints.gridy = 2;
224
        gridBagConstraints.gridwidth = 5;
225
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
226
        jPanel1.add(lblPackagesToInclude, gridBagConstraints);
227

  
228
        lblCheckToInstallByDefault.setText("Check the pacakges to install by default");
229
        gridBagConstraints = new java.awt.GridBagConstraints();
230
        gridBagConstraints.gridx = 2;
231
        gridBagConstraints.gridy = 4;
232
        gridBagConstraints.gridwidth = 5;
233
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
234
        jPanel1.add(lblCheckToInstallByDefault, gridBagConstraints);
235
        gridBagConstraints = new java.awt.GridBagConstraints();
236
        gridBagConstraints.gridx = 2;
237
        gridBagConstraints.gridy = 8;
238
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
239
        gridBagConstraints.weightx = 0.2;
240
        jPanel1.add(filler9, gridBagConstraints);
241
        gridBagConstraints = new java.awt.GridBagConstraints();
242
        gridBagConstraints.gridx = 12;
243
        gridBagConstraints.gridy = 10;
244
        jPanel1.add(filler10, gridBagConstraints);
245

  
246
        butCheckAll.setText("Check all");
247
        gridBagConstraints = new java.awt.GridBagConstraints();
248
        gridBagConstraints.gridx = 6;
249
        gridBagConstraints.gridy = 8;
250
        jPanel1.add(butCheckAll, gridBagConstraints);
251

  
252
        butUncheckAll.setText("Uncheck all");
253
        gridBagConstraints = new java.awt.GridBagConstraints();
254
        gridBagConstraints.gridx = 4;
255
        gridBagConstraints.gridy = 8;
256
        jPanel1.add(butUncheckAll, gridBagConstraints);
257

  
258
        jTabbedPane1.addTab("Package set", jPanel1);
259

  
260
        gridBagConstraints = new java.awt.GridBagConstraints();
261
        gridBagConstraints.gridx = 2;
262
        gridBagConstraints.gridy = 2;
263
        gridBagConstraints.gridwidth = 5;
264
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
265
        gridBagConstraints.weightx = 0.1;
266
        gridBagConstraints.weighty = 0.1;
267
        add(jTabbedPane1, gridBagConstraints);
268
        jTabbedPane1.getAccessibleContext().setAccessibleName("tab2");
269

  
270
        butClose.setText("Close");
271
        gridBagConstraints = new java.awt.GridBagConstraints();
272
        gridBagConstraints.gridx = 4;
273
        gridBagConstraints.gridy = 4;
274
        add(butClose, gridBagConstraints);
275

  
276
        butCreate.setText("Create");
277
        gridBagConstraints = new java.awt.GridBagConstraints();
278
        gridBagConstraints.gridx = 6;
279
        gridBagConstraints.gridy = 4;
280
        add(butCreate, gridBagConstraints);
281
        gridBagConstraints = new java.awt.GridBagConstraints();
282
        gridBagConstraints.gridx = 2;
283
        gridBagConstraints.gridy = 4;
284
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
285
        gridBagConstraints.weightx = 0.3;
286
        add(filler5, gridBagConstraints);
287
        gridBagConstraints = new java.awt.GridBagConstraints();
288
        gridBagConstraints.gridx = 2;
289
        gridBagConstraints.gridy = 6;
290
        gridBagConstraints.gridwidth = 5;
291
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
292
        add(lblMessages, gridBagConstraints);
293
    }// </editor-fold>//GEN-END:initComponents
294

  
295

  
296
    // Variables declaration - do not modify//GEN-BEGIN:variables
297
    protected javax.swing.JButton butAddPackage;
298
    protected javax.swing.JButton butBrowseOnlineInstaller;
299
    protected javax.swing.JButton butBrowsePackageSet;
300
    protected javax.swing.JButton butBrowseWorkingFolder;
301
    protected javax.swing.JButton butCheckAll;
302
    protected javax.swing.JButton butClose;
303
    protected javax.swing.JButton butCreate;
304
    protected javax.swing.JButton butRemovePackage;
305
    protected javax.swing.JButton butUncheckAll;
306
    protected javax.swing.JCheckBox chkIncludeCustomizePlugin;
307
    protected javax.swing.Box.Filler filler1;
308
    protected javax.swing.Box.Filler filler10;
309
    protected javax.swing.Box.Filler filler2;
310
    protected javax.swing.Box.Filler filler3;
311
    protected javax.swing.Box.Filler filler4;
312
    protected javax.swing.Box.Filler filler5;
313
    protected javax.swing.Box.Filler filler6;
314
    protected javax.swing.Box.Filler filler7;
315
    protected javax.swing.Box.Filler filler9;
316
    protected javax.swing.JPanel jPanel1;
317
    protected javax.swing.JPanel jPanel2;
318
    protected javax.swing.JScrollPane jScrollPane2;
319
    protected javax.swing.JTabbedPane jTabbedPane1;
320
    protected javax.swing.JLabel lblCheckToInstallByDefault;
321
    protected javax.swing.JLabel lblDistributionId;
322
    protected javax.swing.JLabel lblIncludeCustomizePlugin;
323
    protected javax.swing.JLabel lblMessages;
324
    protected javax.swing.JLabel lblOnlineInstaller;
325
    protected javax.swing.JLabel lblPackageSet;
326
    protected javax.swing.JLabel lblPackagesToInclude;
327
    protected javax.swing.JLabel lblWorkingFolder;
328
    protected javax.swing.JList lstPackages;
329
    protected javax.swing.JTextField txtDistributionId;
330
    protected javax.swing.JTextField txtOnlineInstaller;
331
    protected javax.swing.JTextField txtPackageSet;
332
    protected javax.swing.JTextField txtWorkingFolder;
333
    // End of variables declaration//GEN-END:variables
334
}
tags/org.gvsig.customize.app-1.2.36/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/DistributionParametersPanel.java
1
package org.gvsig.customize;
2

  
3
import java.awt.event.ActionEvent;
4
import java.awt.event.ActionListener;
5
import java.io.File;
6
import java.io.FileOutputStream;
7
import java.io.IOException;
8
import java.nio.file.DirectoryIteratorException;
9
import java.nio.file.DirectoryStream;
10
import java.nio.file.FileSystem;
11
import java.nio.file.FileSystems;
12
import java.nio.file.Files;
13
import java.nio.file.Path;
14
import java.nio.file.Paths;
15
import java.util.ArrayList;
16
import java.util.Arrays;
17
import java.util.Collections;
18
import java.util.HashMap;
19
import java.util.HashSet;
20
import java.util.List;
21
import java.util.Map;
22
import java.util.Set;
23
import javax.swing.DefaultListModel;
24
import javax.swing.JTextField;
25
import javax.swing.ListModel;
26
import javax.swing.ListSelectionModel;
27
import javax.swing.SwingUtilities;
28
import javax.swing.event.ListSelectionEvent;
29
import javax.swing.event.ListSelectionListener;
30
import org.apache.commons.io.FileUtils;
31
import org.apache.commons.io.IOUtils;
32
import org.apache.commons.lang3.BooleanUtils;
33
import org.apache.commons.lang3.StringUtils;
34
import org.gvsig.andami.PluginServices;
35
import org.gvsig.andami.PluginsLocator;
36
import org.gvsig.andami.PluginsManager;
37
import org.gvsig.app.ApplicationLocator;
38
import org.gvsig.app.ApplicationManager;
39
import org.gvsig.tools.dynobject.DynObject;
40
import org.slf4j.Logger;
41
import org.slf4j.LoggerFactory;
42

  
43
public class DistributionParametersPanel extends DistributionParametersPanelLayout implements MessageBar {
44

  
45
    private static final Logger logger = LoggerFactory.getLogger(DistributionParametersPanel.class);
46

  
47
    private List<ActionListener> listeners = new ArrayList<ActionListener>();
48
    private final DynObject pluginProperties;
49
    private final PluginServices plugin;
50
    private JListWithCheckbox lchkPackages;
51
    private Set<String> defaultPackages = new HashSet<String>();
52

  
53
    public DistributionParametersPanel() {
54
        super();
55
        PluginsManager pluginManager = PluginsLocator.getManager();
56
        this.plugin = pluginManager.getPlugin(CustomizeExtension.class);
57
        this.pluginProperties = plugin.getPluginProperties();
58
        this.initComponents();
59
    }
60

  
61
    private String getPropertyPath(String name) {
62
        File f = (File) pluginProperties.getDynValue(name);
63
        if (f == null) {
64
            return "";
65
        }
66
        return f.getAbsolutePath();
67
    }
68

  
69
    private void initComponents() {
70
        this.lchkPackages = new JListWithCheckbox(this.lstPackages);
71

  
72
        this.setCloseAndCreateVisible(false);
73
        this.txtOnlineInstaller.setEditable(false);
74
        this.txtPackageSet.setEditable(false);
75
        this.txtWorkingFolder.setEditable(false);
76
        this.chkIncludeCustomizePlugin.setSelected(false);
77
        loadFormValues();
78

  
79
        this.butBrowseOnlineInstaller.addActionListener(new ActionListener() {
80
            @Override
81
            public void actionPerformed(ActionEvent ae) {
82
                doBrowseFile(getOnlineInstaller(), "Select the online installer", txtOnlineInstaller);
83
            }
84
        });
85
        this.butBrowsePackageSet.addActionListener(new ActionListener() {
86
            @Override
87
            public void actionPerformed(ActionEvent ae) {
88
                doBrowseFile(getPackageSetFolder(), "Select the package set", txtPackageSet);
89
                unzipPackagset();
90
            }
91
        });
92
        this.butBrowseWorkingFolder.addActionListener(new ActionListener() {
93
            @Override
94
            public void actionPerformed(ActionEvent ae) {
95
                doBrowseFolder(getWorkingFolder(), "Select the working folder", txtWorkingFolder);
96
                unzipPackagset();
97
            }
98
        });
99
        this.butClose.addActionListener(new ActionListener() {
100
            @Override
101
            public void actionPerformed(ActionEvent ae) {
102
                doClose();
103
            }
104
        });
105
        this.butCreate.addActionListener(new ActionListener() {
106
            @Override
107
            public void actionPerformed(ActionEvent ae) {
108
                doCreate();
109
            }
110
        });
111
        this.butAddPackage.addActionListener(new ActionListener() {
112
            @Override
113
            public void actionPerformed(ActionEvent ae) {
114
                doAddPackage();
115
            }
116
        });
117
        this.butRemovePackage.addActionListener(new ActionListener() {
118
            @Override
119
            public void actionPerformed(ActionEvent ae) {
120
                doRemovePackage();
121
            }
122
        });
123
        this.lchkPackages.addChecksListener(new ListSelectionListener() {
124
            @Override
125
            public void valueChanged(ListSelectionEvent lse) {
126
                doChecksValueChanged(lse);
127
            }
128
        });
129
        this.butCheckAll.addActionListener(new ActionListener() {
130
            @Override
131
            public void actionPerformed(ActionEvent ae) {
132
                doCheckAll();
133
            }
134
        });
135
        this.butUncheckAll.addActionListener(new ActionListener() {
136
            @Override
137
            public void actionPerformed(ActionEvent ae) {
138
                doUncheckAll();
139
            }
140
        });
141

  
142
    }
143

  
144
    private void doCheckAll() {
145
        ListModel model = this.lchkPackages.getModel();
146
        this.lchkPackages.getCheckedModel().addSelectionInterval(0, model.getSize() - 1);
147
        for (int i = 0; i < model.getSize(); i++) {
148
            String filename = (String) model.getElementAt(i);
149
            String code = getPackageCode(filename);
150
            this.defaultPackages.add(code);
151
        }
152
    }
153

  
154
    private void doUncheckAll() {
155
        this.lchkPackages.getCheckedModel().clearSelection();
156
        this.defaultPackages.clear();
157
    }
158

  
159
    private void doChecksValueChanged(ListSelectionEvent lse) {
160
        ListSelectionModel checkedsModel = this.lchkPackages.getCheckedModel();
161
        ListModel model = this.lchkPackages.getModel();
162
        for (int i = lse.getFirstIndex(); i <= lse.getLastIndex(); i++) {
163
            String packageCode = getPackageCode((String) model.getElementAt(i));
164
            if (checkedsModel.isSelectedIndex(i)) {
165
                this.defaultPackages.add(packageCode);
166
            } else {
167
                this.defaultPackages.remove(packageCode);
168
            }
169
        }
170
    }
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff