Revision 278

View differences:

tags/org.gvsig.customize.app-1.2.44/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.44/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.44/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.44/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.44/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.44/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.44/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.44/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/DistributionBuilder.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.io.File;
9
import java.io.FileNotFoundException;
10
import java.io.FileOutputStream;
11
import java.io.IOException;
12
import java.net.URI;
13
import java.nio.file.FileSystem;
14
import java.nio.file.FileSystems;
15
import java.nio.file.Files;
16
import java.nio.file.Path;
17
import java.nio.file.Paths;
18
import java.nio.file.StandardCopyOption;
19
import java.util.HashMap;
20
import java.util.Map;
21

  
22
import org.apache.commons.io.FileUtils;
23
import org.gvsig.andami.PluginServices;
24
import org.gvsig.andami.PluginsLocator;
25
import org.gvsig.andami.PluginsManager;
26
import org.gvsig.installer.lib.api.InstallerLocator;
27
import org.gvsig.installer.lib.api.InstallerManager;
28
import org.gvsig.installer.lib.api.PackageInfo;
29
import org.gvsig.installer.lib.api.creation.MakePackageService;
30
import org.gvsig.installer.lib.api.creation.MakePackageServiceException;
31
import org.slf4j.Logger;
32
import org.slf4j.LoggerFactory;
33

  
34
/**
35
 *
36
 * @author jjdelcerro
37
 */
38
public class DistributionBuilder {
39

  
40
    private static final Logger logger = LoggerFactory.getLogger(DistributionBuilder.class);
41
    private static final String PCKGNAME= "package.gvspks";
42

  
43
    private String distributionId;
44
    private File onlineInstaller;
45
    private File workingFolder;
46
    private File customizePackagePath;
47
    private MessageBar messagebar;
48
    private boolean includeCustomizePlugin;
49
    private File packagesetFolder;
50

  
51
    public DistributionBuilder(MessageBar messagebar) {
52
        this.messagebar = messagebar;
53
    }
54

  
55
    private void message(String msg) {
56
        this.messagebar.message(msg);
57
    }
58

  
59
    public void setDistributionId(String distributionId) {
60
        this.distributionId = distributionId;
61
    }
62

  
63
    public void setOnlineInstaller(File onlineInstaller) {
64
        this.onlineInstaller = onlineInstaller;
65
    }
66

  
67
    public void setWorkingFolder(File workingFolder) {
68
        this.workingFolder = workingFolder;
69
    }
70

  
71
    void setIncludeCustomizePlugin(boolean includeCustomizePlugin) {
72
        this.includeCustomizePlugin = includeCustomizePlugin;
73
    }
74

  
75
    public boolean build() {
76
        try {
77
            String target_name = this.onlineInstaller.getName().replace("online", this.distributionId);
78
            File target = new File(this.workingFolder, target_name);
79

  
80
            message("Creating package set...");
81
            File packageSet = new File(this.workingFolder, "packages.gvspks");
82
            createPackageset(packageSet);
83

  
84
            if (this.includeCustomizePlugin) {
85
                message("Building customize plugin...");
86
                this.buildCustomizePlugin();
87

  
88
                message("Adding customized plugin to package set...");
89
                this.addToZip(packageSet, customizePackagePath);
90
            }
91

  
92
            message("Coping online installer...");
93
            FileUtils.copyFile(this.onlineInstaller, target);
94

  
95
            message("Adding package set to the installer...");
96
            addPackagetoZip(target, packageSet);
97

  
98
            message("Installer created.");
99
        } catch (Exception ex) {
100
            message("Can't build the distribution.\n" + ex.getMessage());
101
            logger.warn("Can't build the distribution.");
102
            logger.warn("working folder:" + this.workingFolder.getAbsolutePath());
103
            logger.warn("online installer:" + this.onlineInstaller.getAbsolutePath());
104
            return false;
105
        }
106
        return true;
107
    }
108

  
109
    private void addPackagetoZip(File zipFile, File packageFile) throws IOException{
110
        FileSystem zipfs = null;
111
        try {
112
        Map<String, Object> env = new HashMap<>();
113
        env.put("create", "true");
114
        env.put("useTempFile", Boolean.TRUE);
115
        Path zipPath = Paths.get(zipFile.getAbsolutePath());
116
        URI uriZip = URI.create("jar:file:" + zipPath.toUri().getPath());
117
        zipfs = FileSystems.newFileSystem(uriZip,env);
118
        Path pathInZipfile = zipfs.getPath("/"+PCKGNAME);
119
        // copy a file into the zip file
120
        Files.copy( packageFile.toPath(),pathInZipfile,
121
                StandardCopyOption.REPLACE_EXISTING );
122
        message("Package set added to the installer.");
123
        } catch (Exception e) {
124
            logger.warn("Impossible to add ("+packageFile.getAbsolutePath()+") to ("+zipFile.getAbsolutePath()+")",e);
125
        } finally{
126
            if (zipfs != null) {
127
                try {
128
                    zipfs.close();
129
                } catch (IOException ex) {
130
                }
131
            }
132
        }
133
    }
134

  
135
    private void createPackageset(File zipfile) {
136
        Map<String, String> env = new HashMap<>();
137
        env.put("create", "true");
138

  
139
        FileSystem zipfs = null;
140
        try {
141
            Path zippath = Paths.get(zipfile.getAbsolutePath());
142
            final URI uri = URI.create("jar:file:" + zippath.toUri().getPath());
143
            zipfs = FileSystems.newFileSystem(uri, env);
144
            File[] packages = packagesetFolder.listFiles();
145
            for (File newEntry : packages) {
146
                Path externalFile = Paths.get(newEntry.getAbsoluteFile().toURI());
147
                Path pathInZipfile = zipfs.getPath("/" + newEntry.getName());
148
                Files.copy(externalFile, pathInZipfile, StandardCopyOption.REPLACE_EXISTING);
149
            }
150
            zipfs.close();
151
        } catch (Exception ex) {
152
            logger.warn("Can't create packageset ("+zipfile.getAbsolutePath()+")",ex);
153
        } finally {
154
            if (zipfs != null) {
155
                try {
156
                    zipfs.close();
157
                } catch (IOException ex) {
158
                }
159
            }
160
        }
161

  
162
    }
163

  
164
    private void buildCustomizePlugin() throws FileNotFoundException, MakePackageServiceException, IOException {
165
        FileOutputStream fos = null;
166
        try {
167
            PluginsManager pluginsManager = PluginsLocator.getManager();
168
            PluginServices plugin = pluginsManager.getPlugin(CustomizeExtension.class);
169
            InstallerManager installManager = InstallerLocator.getInstallerManager();
170

  
171
            FileUtils.copyFileToDirectory(
172
                    new File(packagesetFolder,"defaultPackages"),
173
                    plugin.getPluginDirectory()
174
            );
175

  
176
            PackageInfo pkginfo = pluginsManager.getPackageInfo(CustomizeExtension.class);
177
            String pkgfilename = installManager.getPackageFileName(pkginfo);
178
            customizePackagePath = new File(this.workingFolder, pkgfilename);
179

  
180
            MakePackageService maker = installManager.createMakePackage(plugin.getPluginDirectory(), pkginfo);
181
            fos = new FileOutputStream(customizePackagePath);
182
            maker.createPackage(fos);
183
        } finally {
184
            if (fos != null) {
185
                fos.close();
186
            }
187
        }
188

  
189
    }
190

  
191
    private void addToZip(File zipfile, File newEntry) {
192
        Map<String, String> env = new HashMap<>();
193
        env.put("create", "true");
194

  
195
        FileSystem zipfs = null;
196
        try {
197
            Path zippath = Paths.get(zipfile.getAbsolutePath());
198
            final URI uri = URI.create("jar:file:" + zippath.toUri().getPath());
199
            zipfs = FileSystems.newFileSystem(uri, env);
200
            Path externalFile = Paths.get(newEntry.getAbsoluteFile().toURI());
201
            Path pathInZipfile = zipfs.getPath("/" + newEntry.getName());
202
            Files.copy(externalFile, pathInZipfile, StandardCopyOption.REPLACE_EXISTING);
203
            zipfs.close();
204
        } catch (IOException ex) {
205

  
206
        } finally {
207
            if (zipfs != null) {
208
                try {
209
                    zipfs.close();
210
                } catch (IOException ex) {
211
                }
212
            }
213
        }
214

  
215
    }
216

  
217
    void setPackageSet(File packageSet) {
218
        this.packagesetFolder = packageSet;
219
    }
220

  
221
}
tags/org.gvsig.customize.app-1.2.44/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/HttpProxyLoginDialogLayout.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

  
7
package org.gvsig.customize;
8

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

  
15
    /**
16
     * Creates new form HttpProxyLoginLayout
17
     */
18
    public HttpProxyLoginDialogLayout() {
19
        initComponents();
20
    }
21

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

  
32
        lblTitle = new javax.swing.JLabel();
33
        lblName = new javax.swing.JLabel();
34
        txtName = new javax.swing.JTextField();
35
        lblPassword = new javax.swing.JLabel();
36
        botLogin = new javax.swing.JButton();
37
        botCancel = new javax.swing.JButton();
38
        txtPassword = new javax.swing.JPasswordField();
39

  
40
        setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
41
        setAlignmentX(1.0F);
42
        setAlignmentY(1.0F);
43
        java.awt.GridBagLayout layout = new java.awt.GridBagLayout();
44
        layout.columnWidths = new int[] {0, 5, 0, 5, 0, 5, 0};
45
        layout.rowHeights = new int[] {0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0};
46
        setLayout(layout);
47

  
48
        lblTitle.setText("Identificacion de usuario para acceso a internet");
49
        gridBagConstraints = new java.awt.GridBagConstraints();
50
        gridBagConstraints.gridx = 2;
51
        gridBagConstraints.gridy = 2;
52
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
53
        add(lblTitle, gridBagConstraints);
54

  
55
        lblName.setText("Nombre de usuario:");
56
        gridBagConstraints = new java.awt.GridBagConstraints();
57
        gridBagConstraints.gridx = 2;
58
        gridBagConstraints.gridy = 6;
59
        gridBagConstraints.gridwidth = 3;
60
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
61
        add(lblName, gridBagConstraints);
62
        gridBagConstraints = new java.awt.GridBagConstraints();
63
        gridBagConstraints.gridx = 2;
64
        gridBagConstraints.gridy = 8;
65
        gridBagConstraints.gridwidth = 3;
66
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
67
        add(txtName, gridBagConstraints);
68

  
69
        lblPassword.setText("Clave:");
70
        gridBagConstraints = new java.awt.GridBagConstraints();
71
        gridBagConstraints.gridx = 2;
72
        gridBagConstraints.gridy = 12;
73
        gridBagConstraints.gridwidth = 3;
74
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
75
        add(lblPassword, gridBagConstraints);
76

  
77
        botLogin.setText("Aceptar");
78
        gridBagConstraints = new java.awt.GridBagConstraints();
79
        gridBagConstraints.gridx = 4;
80
        gridBagConstraints.gridy = 18;
81
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
82
        add(botLogin, gridBagConstraints);
83

  
84
        botCancel.setText("Cancelar");
85
        gridBagConstraints = new java.awt.GridBagConstraints();
86
        gridBagConstraints.gridx = 2;
87
        gridBagConstraints.gridy = 18;
88
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
89
        add(botCancel, gridBagConstraints);
90
        gridBagConstraints = new java.awt.GridBagConstraints();
91
        gridBagConstraints.gridx = 2;
92
        gridBagConstraints.gridy = 14;
93
        gridBagConstraints.gridwidth = 3;
94
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
95
        add(txtPassword, gridBagConstraints);
96
    }// </editor-fold>//GEN-END:initComponents
97

  
98

  
99
    // Variables declaration - do not modify//GEN-BEGIN:variables
100
    protected javax.swing.JButton botCancel;
101
    protected javax.swing.JButton botLogin;
102
    protected javax.swing.JLabel lblName;
103
    protected javax.swing.JLabel lblPassword;
104
    protected javax.swing.JLabel lblTitle;
105
    protected javax.swing.JTextField txtName;
106
    protected javax.swing.JPasswordField txtPassword;
107
    // End of variables declaration//GEN-END:variables
108
}
tags/org.gvsig.customize.app-1.2.44/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/JListWithCheckbox.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.BorderLayout;
9
import java.awt.Color;
10
import java.awt.Component;
11
import java.awt.Dimension;
12
import java.awt.Point;
13
import java.awt.Rectangle;
14
import java.awt.event.MouseAdapter;
15
import java.awt.event.MouseEvent;
16
import java.beans.Transient;
17
import java.util.HashSet;
18
import java.util.Iterator;
19
import java.util.List;
20
import java.util.Set;
21
import java.util.Vector;
22
import javax.accessibility.AccessibleContext;
23
import javax.swing.DefaultListSelectionModel;
24
import javax.swing.JCheckBox;
25
import javax.swing.JList;
26
import javax.swing.JPanel;
27
import javax.swing.ListCellRenderer;
28
import javax.swing.ListModel;
29
import javax.swing.ListSelectionModel;
30
import javax.swing.event.ListSelectionEvent;
31
import javax.swing.event.ListSelectionListener;
32
import javax.swing.plaf.ListUI;
33
import javax.swing.text.Position;
34
import org.slf4j.Logger;
35
import org.slf4j.LoggerFactory;
36

  
37
public class JListWithCheckbox extends JList {
38

  
39
    private static final Logger logger = LoggerFactory.getLogger(JListWithCheckbox.class);
40

  
41

  
42
    public class CheckListCellRenderer extends JPanel implements ListCellRenderer {
43

  
44
        private ListCellRenderer delegate;
45
        private ListSelectionModel selectionModel;
46
        private JCheckBox checkBox = new JCheckBox();
47

  
48
        public CheckListCellRenderer(ListCellRenderer renderer, ListSelectionModel selectionModel) {
49
            this.delegate = renderer;
50
            this.selectionModel = selectionModel;
51
            this.setLayout(new BorderLayout());
52
            this.setOpaque(false);
53
            this.checkBox.setOpaque(false);
54
            checkBoxWidth = this.checkBox.getPreferredSize().width;
55
        }
56

  
57
        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
58
            Component renderer = delegate.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
59
            checkBox.setSelected(selectionModel.isSelectedIndex(index));
60
            removeAll();
61
            add(checkBox, BorderLayout.WEST);
62
            add(renderer, BorderLayout.CENTER);
63
            return this;
64
        }
65
    }
66

  
67
    private int checkBoxWidth = 0;
68
    private final JList wrappedList;
69
    private ListSelectionModel checkedsModel = new DefaultListSelectionModel();
70
    private Set<ListSelectionListener> checkedsListeners;
71
        
72
    public JListWithCheckbox(final JList wrappedList) {
73
        this.wrappedList = wrappedList;
74
        this.checkedsModel.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
75
        this.checkedsListeners = new HashSet<ListSelectionListener>();
76
        
77
        this.wrappedList.setCellRenderer(
78
                new CheckListCellRenderer(
79
                        this.wrappedList.getCellRenderer(),
80
                        this.checkedsModel
81
                )
82
        );
83
        this.wrappedList.addMouseListener(new MouseAdapter() {
84
            public void mouseClicked(MouseEvent me) {
85
                int index = wrappedList.locationToIndex(me.getPoint());
86
                if (index < 0) {
87
                    return;
88
                }
89
                if (me.getX() > wrappedList.getCellBounds(index, index).x + checkBoxWidth) {
90
                    return;
91
                }
92
                toggleCheck(index);
93
            }
94
        });
95
        this.checkedsModel.addListSelectionListener(new ListSelectionListener() {
96
            @Override
97
            public void valueChanged(ListSelectionEvent lse) {
98
                wrappedList.repaint();
99
                //fireCheckedsListeners(lse);
100
            }
101
        });
102
        
103
    }
104

  
105
    public void toggleCheck(int index) {
106
        if (index < 0) {
107
            return;
108
        }
109
        if (this.checkedsModel.isSelectedIndex(index)) {
110
            this.checkedsModel.removeSelectionInterval(index, index);
111
        } else {
112
            this.checkedsModel.addSelectionInterval(index, index);
113
        }
114
        // FIXME: isAdjusting is set to false always
115
        fireCheckedsListeners(new ListSelectionEvent(this, index, index, false));
116
    }
117

  
118
    @Override
119
    public ListUI getUI() {
120
        return this.wrappedList.getUI();
121
    }
122

  
123
    @Override
124
    public void setUI(ListUI ui) {
125
        this.wrappedList.setUI(ui);
126
    }
127

  
128
    @Override
129
    public void updateUI() {
130
        if( this.wrappedList!= null ) {
131
            this.wrappedList.updateUI();
132
        }
133
    }
134

  
135
    @Override
136
    public String getUIClassID() {
137
        return this.wrappedList.getUIClassID();
138
    }
139

  
140
    @Override
141
    public Object getPrototypeCellValue() {
142
        return this.wrappedList.getPrototypeCellValue();
143
    }
144

  
145
    @Override
146
    public void setPrototypeCellValue(Object prototypeCellValue) {
147
        this.wrappedList.setPrototypeCellValue(prototypeCellValue);
148
    }
149

  
150
    @Override
151
    public int getFixedCellWidth() {
152
        return this.wrappedList.getFixedCellWidth();
153
    }
154

  
155
    @Override
156
    public void setFixedCellWidth(int width) {
157
        this.wrappedList.setFixedCellWidth(width);
158
    }
159

  
160
    @Override
161
    public int getFixedCellHeight() {
162
        return this.wrappedList.getFixedCellHeight();
163
    }
164

  
165
    @Override
166
    public void setFixedCellHeight(int height) {
167
        this.wrappedList.setFixedCellHeight(height);
168
    }
169

  
170
    @Transient
171
    @Override
172
    public ListCellRenderer getCellRenderer() {
173
        return this.wrappedList.getCellRenderer();
174
    }
175

  
176
    @Override
177
    public void setCellRenderer(ListCellRenderer cellRenderer) {
178
        this.wrappedList.setCellRenderer(cellRenderer);
179
    }
180

  
181
    @Override
182
    public Color getSelectionForeground() {
183
        return this.wrappedList.getSelectionForeground();
184
    }
185

  
186
    @Override
187
    public void setSelectionForeground(Color selectionForeground) {
188
        this.wrappedList.setSelectionForeground(selectionForeground);
189
    }
190

  
191
    @Override
192
    public Color getSelectionBackground() {
193
        return this.wrappedList.getSelectionBackground();
194
    }
195

  
196
    @Override
197
    public void setSelectionBackground(Color selectionBackground) {
198
        this.wrappedList.setSelectionBackground(selectionBackground);
199
    }
200

  
201
    @Override
202
    public int getVisibleRowCount() {
203
        return this.wrappedList.getVisibleRowCount();
204
    }
205

  
206
    @Override
207
    public void setVisibleRowCount(int visibleRowCount) {
208
        this.wrappedList.setVisibleRowCount(visibleRowCount);
209
    }
210

  
211
    @Override
212
    public int getLayoutOrientation() {
213
        return this.wrappedList.getLayoutOrientation();
214
    }
215

  
216
    @Override
217
    public void setLayoutOrientation(int layoutOrientation) {
218
        this.wrappedList.setLayoutOrientation(layoutOrientation);
219
    }
220

  
221
    @Override
222
    public int getFirstVisibleIndex() {
223
        return this.wrappedList.getFirstVisibleIndex();
224
    }
225

  
226
    @Override
227
    public int getLastVisibleIndex() {
228
        return this.wrappedList.getLastVisibleIndex();
229
    }
230

  
231
    @Override
232
    public void ensureIndexIsVisible(int index) {
233
        this.wrappedList.ensureIndexIsVisible(index);
234
    }
235

  
236
    @Override
237
    public void setDragEnabled(boolean b) {
238
        this.wrappedList.setDragEnabled(b);
239
    }
240

  
241
    @Override
242
    public boolean getDragEnabled() {
243
        return this.wrappedList.getDragEnabled();
244
    }
245
//
246
//    public final void setDropMode(DropMode dropMode) {
247
//        this.wrappedList.setDropMode(dropMode);
248
//    }
249
//
250
//    public final DropMode getDropMode() {
251
//        
252
//    }
253
//
254
//    public final DropLocation getDropLocation() {
255
//        
256
//    }
257

  
258
    @Override
259
    public int getNextMatch(String prefix, int startIndex, Position.Bias bias) {
260
        return this.wrappedList.getNextMatch(prefix, startIndex, bias);
261
    }
262

  
263
    @Override
264
    public String getToolTipText(MouseEvent event) {
265
        return this.wrappedList.getToolTipText(event);
266
    }
267

  
268
    @Override
269
    public int locationToIndex(Point location) {
270
        return this.wrappedList.locationToIndex(location);
271
    }
272

  
273
    @Override
274
    public Point indexToLocation(int index) {
275
        return this.wrappedList.indexToLocation(index);
276
    }
277

  
278
    @Override
279
    public Rectangle getCellBounds(int index0, int index1) {
280
        return this.wrappedList.getCellBounds(index0, index1);
281
    }
282

  
283
    @Override
284
    public ListModel getModel() {
285
        return this.wrappedList.getModel();
286
    }
287

  
288
    @Override
289
    public void setModel(ListModel model) {
290
        this.wrappedList.setModel(model);
291
    }
292

  
293
    @Override
294
    public void setListData(Object[] listData) {
295
        this.wrappedList.setListData(listData);
296
    }
297

  
298
    @Override
299
    public void setListData(Vector listData) {
300
        this.wrappedList.setListData(listData);
301
    }
302

  
303
    @Override
304
    public ListSelectionModel getSelectionModel() {
305
        return this.wrappedList.getSelectionModel();
306
    }
307

  
308
    public ListSelectionModel getCheckedModel() {
309
        return this.checkedsModel;
310
    }
311

  
312
    @Override
313
    public void addListSelectionListener(ListSelectionListener listener) {
314
        this.wrappedList.addListSelectionListener(listener);
315
    }
316
    
317
    public void addChecksListener(ListSelectionListener listener) {
318
       this.checkedsListeners.add(listener);
319
    }
320
    
321
    @Override
322
    public void removeListSelectionListener(ListSelectionListener listener) {
323
        this.wrappedList.removeListSelectionListener(listener);
324
    }    
325
    
326
    public void removeChecksListener(ListSelectionListener listener) {
327
        this.checkedsListeners.remove(listener);
328
    }
329

  
330
    @Override
331
    public ListSelectionListener[] getListSelectionListeners() {
332
        return this.wrappedList.getListSelectionListeners();
333
    }
334

  
335
    public ListSelectionListener[] getChecksListeners() {
336
        return this.checkedsListeners.toArray(new ListSelectionListener[1]);
337
    }
338

  
339
    protected void fireCheckedsListeners(ListSelectionEvent event) {
340
        Iterator<ListSelectionListener> it = this.checkedsListeners.iterator();
341
        while(it.hasNext()) {
342
            ListSelectionListener listener = it.next();
343
            try {
344
                listener.valueChanged(event);
345
            } catch(Throwable th) {
346
                logger.warn("Problems calling check listener ("+listener+").",th);
347
            }
348
        }
349
    }
350
    
351
    @Override
352
    public void setSelectionModel(ListSelectionModel selectionModel) {
353
        this.wrappedList.setSelectionModel(selectionModel);
354
    }
355

  
356
    @Override
357
    public void setSelectionMode(int selectionMode) {
358
        this.wrappedList.setSelectionMode(selectionMode);
359
    }
360

  
361
    @Override
362
    public int getSelectionMode() {
363
        return this.wrappedList.getSelectionMode();
364
    }
365

  
366
    @Override
367
    public int getAnchorSelectionIndex() {
368
        return this.wrappedList.getAnchorSelectionIndex();
369
    }
370

  
371
    @Override
372
    public int getLeadSelectionIndex() {
373
        return this.wrappedList.getLeadSelectionIndex();
374
    }
375

  
376
    @Override
377
    public int getMinSelectionIndex() {
378
        return this.wrappedList.getMinSelectionIndex();
379
    }
380

  
381
    @Override
382
    public int getMaxSelectionIndex() {
383
        return this.wrappedList.getMaxSelectionIndex();
384
    }
385

  
386
    @Override
387
    public boolean isSelectedIndex(int index) {
388
        return this.wrappedList.isSelectedIndex(index);
389
    }
390

  
391
    @Override
392
    public boolean isSelectionEmpty() {
393
        return this.wrappedList.isSelectionEmpty();
394
    }
395

  
396
    @Override
397
    public void clearSelection() {
398
        this.wrappedList.clearSelection();
399
    }
400

  
401
    @Override
402
    public void setSelectionInterval(int anchor, int lead) {
403
        this.wrappedList.setSelectionInterval(anchor, lead);
404
    }
405

  
406
    @Override
407
    public void addSelectionInterval(int anchor, int lead) {
408
        this.wrappedList.addSelectionInterval(anchor, lead);
409
    }
410

  
411
    @Override
412
    public void removeSelectionInterval(int index0, int index1) {
413
        this.wrappedList.removeSelectionInterval(index0, index1);
414
    }
415

  
416
    @Override
417
    public void setValueIsAdjusting(boolean b) {
418
        this.wrappedList.setValueIsAdjusting(b);
419
    }
420

  
421
    @Override
422
    public boolean getValueIsAdjusting() {
423
        return this.wrappedList.getValueIsAdjusting();
424
    }
425

  
426
    @Transient
427
    @Override
428
    public int[] getSelectedIndices() {
429
        return this.wrappedList.getSelectedIndices();
430
    }
431

  
432
    @Override
433
    public void setSelectedIndex(int index) {
434
        this.wrappedList.setSelectedIndex(index);
435
    }
436

  
437
    @Override
438
    public void setSelectedIndices(int[] indices) {
439
        this.wrappedList.setSelectedIndices(indices);
440
    }
441

  
442
    @Deprecated
443
    @Override
444
    public Object[] getSelectedValues() {
445
        return this.wrappedList.getSelectedValues();
446
    }
447

  
448
    @Override
449
    public List getSelectedValuesList() {
450
        return this.wrappedList.getSelectedValuesList();
451
    }
452

  
453
    @Override
454
    public int getSelectedIndex() {
455
        return this.wrappedList.getSelectedIndex();
456
    }
457

  
458
    @Override
459
    public Object getSelectedValue() {
460
        return this.wrappedList.getSelectedValue();
461
    }
462

  
463
    @Override
464
    public void setSelectedValue(Object anObject, boolean shouldScroll) {
465
        this.wrappedList.setSelectedValue(anObject, shouldScroll);
466
    }
467

  
468
    @Override
469
    public Dimension getPreferredScrollableViewportSize() {
470
        return this.wrappedList.getPreferredScrollableViewportSize();
471
    }
472

  
473
    @Override
474
    public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) {
475
        return this.wrappedList.getScrollableUnitIncrement(visibleRect, orientation, direction);
476
    }
477

  
478
    @Override
479
    public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) {
480
        return this.wrappedList.getScrollableBlockIncrement(visibleRect, orientation, direction);
481
    }
482

  
483
    @Override
484
    public boolean getScrollableTracksViewportWidth() {
485
        return this.wrappedList.getScrollableTracksViewportWidth();
486
    }
487

  
488
    @Override
489
    public boolean getScrollableTracksViewportHeight() {
490
        return this.wrappedList.getScrollableTracksViewportHeight();
491
    }
492

  
493
    @Override
494
    public AccessibleContext getAccessibleContext() {
495
        return this.wrappedList.getAccessibleContext();
496
    }
497
}
tags/org.gvsig.customize.app-1.2.44/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/HttpProxyLoginDialog.java
1

  
2

  
3
package org.gvsig.customize;
4

  
5
import java.awt.event.ActionEvent;
6
import java.awt.event.ActionListener;
7
import org.gvsig.tools.ToolsLocator;
8
import org.gvsig.tools.i18n.I18nManager;
9
import org.gvsig.tools.swing.api.ToolsSwingLocator;
10
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
11

  
12

  
13
public class HttpProxyLoginDialog extends HttpProxyLoginDialogLayout {
14
    private boolean cancelled = true;
15
    
16
    public HttpProxyLoginDialog() {
17
        initComponents();
18
    }
19
    
20
    private void initComponents() {
21
        this.botLogin.addActionListener(new ActionListener() {
22
            public void actionPerformed(ActionEvent e) {
23
                doLogin();
24
            }
25
        });
26
        this.botCancel.addActionListener(new ActionListener() {
27
            public void actionPerformed(ActionEvent e) {
28
                doCancel();
29
            }
30
        });
31
        translate();
32
    }
33
    
34
    protected void doLogin() {
35
        this.setVisible(false);
36
        this.cancelled = false;
37
    }
38
    
39
    protected void doCancel() {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff