Revision 33743
branches/v2_0_0_prep/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/GvSIGFolders.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
package org.gvsig.installer.app.extension; |
|
23 |
|
|
24 |
import java.io.File; |
|
25 |
|
|
26 |
import org.gvsig.andami.Launcher; |
|
27 |
|
|
28 |
/** |
|
29 |
* Gets the main gvSIG application folders. |
|
30 |
* |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
*/ |
|
34 |
public class GvSIGFolders { |
|
35 |
|
|
36 |
/** |
|
37 |
* Returns the gvSIG main application folder. |
|
38 |
* |
|
39 |
* @return the gvSIG main application folder |
|
40 |
*/ |
|
41 |
public File getApplicationFolder() { |
|
42 |
// TODO: check if there is a better way to handle this |
|
43 |
return new File(System.getProperty("user.dir")); |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* Returns the gvSIG plugins folder. |
|
48 |
* |
|
49 |
* @return the gvSIG plugins folder |
|
50 |
*/ |
|
51 |
public File getPluginsFolder() { |
|
52 |
return new File(Launcher.getAndamiConfig().getPluginsDirectory()) |
|
53 |
.getAbsoluteFile(); |
|
54 |
} |
|
55 |
|
|
56 |
/** |
|
57 |
* Returns the default gvSIG folder with the installable package bundles. |
|
58 |
* |
|
59 |
* @return the default gvSIG folder with the installable package bundles |
|
60 |
*/ |
|
61 |
public File getInstallFolder() { |
|
62 |
return new File(getApplicationFolder(), "install"); |
|
63 |
} |
|
64 |
|
|
65 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageWindow.java | ||
---|---|---|
50 | 50 |
private static final long serialVersionUID = 4719868181091291809L; |
51 | 51 |
WindowInfo windowInfo = null; |
52 | 52 |
|
53 |
public InstallPackageWindow(File applicationDirectory) |
|
54 |
throws LocatorException, InstallPackageWizardException { |
|
53 |
public InstallPackageWindow(File applicationFolder, File pluginsFolder, |
|
54 |
File installFolder) throws LocatorException, |
|
55 |
InstallPackageWizardException { |
|
55 | 56 |
super(); |
56 | 57 |
InstallPackageWizard installPackageWizard = |
57 | 58 |
SwingInstallerLocator.getSwingInstallerManager() |
58 |
.createInstallPackageWizard(applicationDirectory); |
|
59 |
.createInstallPackageWizard(applicationFolder, pluginsFolder, |
|
60 |
installFolder); |
|
59 | 61 |
installPackageWizard |
60 | 62 |
.setWizardActionListener(new WindowInstallerListener(this)); |
61 | 63 |
this.setLayout(new BorderLayout()); |
branches/v2_0_0_prep/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageExtension.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.installer.app.extension.execution; |
29 | 29 |
|
30 |
import java.io.File; |
|
31 |
|
|
32 | 30 |
import org.slf4j.Logger; |
33 | 31 |
import org.slf4j.LoggerFactory; |
34 | 32 |
|
35 |
import org.gvsig.andami.Launcher; |
|
36 | 33 |
import org.gvsig.andami.PluginServices; |
37 | 34 |
import org.gvsig.andami.plugins.Extension; |
35 |
import org.gvsig.installer.app.extension.GvSIGFolders; |
|
38 | 36 |
|
39 | 37 |
/** |
40 | 38 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
41 | 39 |
*/ |
42 | 40 |
public class InstallPackageExtension extends Extension { |
43 | 41 |
|
44 |
private static final Logger log = LoggerFactory
|
|
42 |
private static final Logger LOG = LoggerFactory
|
|
45 | 43 |
.getLogger(InstallPackageExtension.class); |
46 | 44 |
|
47 | 45 |
public void execute(String actionCommand) { |
48 |
File pluginsDirectory = |
|
49 |
new File(Launcher.getAndamiConfig().getPluginsDirectory()) |
|
50 |
.getAbsoluteFile(); |
|
46 |
GvSIGFolders folders = new GvSIGFolders(); |
|
47 |
|
|
51 | 48 |
try { |
52 | 49 |
PluginServices.getMDIManager().addCentredWindow( |
53 |
new InstallPackageWindow(pluginsDirectory.getParentFile()
|
|
54 |
.getParentFile()));
|
|
50 |
new InstallPackageWindow(folders.getApplicationFolder(),
|
|
51 |
folders.getPluginsFolder(), folders.getInstallFolder()));
|
|
55 | 52 |
} catch (Exception e) { |
56 |
log.error("Error creating teh wizard to install a package ", e);
|
|
53 |
LOG.error("Error creating teh wizard to install a package ", e);
|
|
57 | 54 |
} |
58 | 55 |
} |
59 | 56 |
|
branches/v2_0_0_prep/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/creation/MakePluginPackageWindow.java | ||
---|---|---|
50 | 50 |
private static final long serialVersionUID = 3423389124323013058L; |
51 | 51 |
WindowInfo windowInfo = null; |
52 | 52 |
|
53 |
public MakePluginPackageWindow(File applicationDirectory) |
|
54 |
throws LocatorException, MakePluginPackageWizardException { |
|
53 |
public MakePluginPackageWindow(File applicationFolder, File pluginsFolder, |
|
54 |
File installFolder) throws LocatorException, |
|
55 |
MakePluginPackageWizardException { |
|
55 | 56 |
super(); |
56 | 57 |
MakePluginPackageWizard makePluginPackageWizard = |
57 | 58 |
SwingInstallerLocator.getSwingInstallerManager() |
58 |
.createMakePluginPackageWizard(applicationDirectory); |
|
59 |
.createMakePluginPackageWizard(applicationFolder, |
|
60 |
pluginsFolder, installFolder); |
|
59 | 61 |
makePluginPackageWizard |
60 | 62 |
.setWizardActionListener(new WindowInstallerListener(this)); |
61 | 63 |
this.setLayout(new BorderLayout()); |
branches/v2_0_0_prep/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/creation/MakePluginPackageExtension.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.installer.app.extension.creation; |
29 | 29 |
|
30 |
import java.io.File; |
|
31 |
|
|
32 | 30 |
import org.slf4j.Logger; |
33 | 31 |
import org.slf4j.LoggerFactory; |
34 | 32 |
|
35 |
import org.gvsig.andami.Launcher; |
|
36 | 33 |
import org.gvsig.andami.PluginServices; |
37 | 34 |
import org.gvsig.andami.plugins.Extension; |
38 | 35 |
import org.gvsig.app.ApplicationLocator; |
39 | 36 |
import org.gvsig.app.extension.Version; |
37 |
import org.gvsig.installer.app.extension.GvSIGFolders; |
|
40 | 38 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
41 | 39 |
|
42 | 40 |
/** |
... | ... | |
44 | 42 |
*/ |
45 | 43 |
public class MakePluginPackageExtension extends Extension { |
46 | 44 |
|
47 |
private static final Logger log = LoggerFactory
|
|
45 |
private static final Logger LOG = LoggerFactory
|
|
48 | 46 |
.getLogger(MakePluginPackageExtension.class); |
49 | 47 |
|
50 | 48 |
public void execute(String actionCommand) { |
51 |
File pluginsDirectory = |
|
52 |
new File(Launcher.getAndamiConfig().getPluginsDirectory()) |
|
53 |
.getAbsoluteFile(); |
|
49 |
GvSIGFolders folders = new GvSIGFolders(); |
|
50 |
|
|
54 | 51 |
try { |
55 | 52 |
PluginServices.getMDIManager().addCentredWindow( |
56 |
new MakePluginPackageWindow(pluginsDirectory.getParentFile()
|
|
57 |
.getParentFile()));
|
|
53 |
new MakePluginPackageWindow(folders.getApplicationFolder(),
|
|
54 |
folders.getPluginsFolder(), folders.getInstallFolder()));
|
|
58 | 55 |
} catch (Exception e) { |
59 |
log.error("Error creating teh wizard to create an installer ", e);
|
|
56 |
LOG.error("Error creating teh wizard to create an installer ", e);
|
|
60 | 57 |
} |
61 | 58 |
} |
62 | 59 |
|
... | ... | |
68 | 65 |
public void postInitialize() { |
69 | 66 |
super.postInitialize(); |
70 | 67 |
Version version = ApplicationLocator.getManager().getVersion(); |
71 |
SwingInstallerLocator.getSwingInstallerManager().setGvSIGVersion(
|
|
68 |
SwingInstallerLocator.getSwingInstallerManager().setApplicationVersion(
|
|
72 | 69 |
version.getFormat()); |
73 | 70 |
} |
74 | 71 |
|
branches/v2_0_0_prep/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/resources/locale/text.properties | ||
---|---|---|
1 | 1 |
make_plugin_package=Hacer un instalable de un plugin |
2 | 2 |
make_plugin_package_description=Crea un instalable de un plugin instalado |
3 |
install_package=Ejecutar un instalable |
|
4 |
install_package_description=Ejecuta un instalable para instalar un nuevo plugin en gvSIG |
|
3 |
install_package=Instalar un nuevo paquete |
|
4 |
install_package_description=instala un nuevo paquete (plugin, traducciones, tema, etc.) en gvSIG |
branches/v2_0_0_prep/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/resources/locale/text_en.properties | ||
---|---|---|
1 | 1 |
make_plugin_package=Make a plugin installer |
2 | 2 |
make_plugin_package_description=Create an installer from an installed plugin |
3 |
install_package=Execute an installer |
|
4 |
install_package_description=Executes an installer to install a new plugin in gvSIG |
|
3 |
install_package=Install a new bundle |
|
4 |
install_package_description=Installs a new bundle (plugin, translations, theme, etc.) in gvSIG |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageServiceFrame.java | ||
---|---|---|
46 | 46 |
private static final long serialVersionUID = -5107758157530922356L; |
47 | 47 |
private InstallPackageWizard installerExecutionWizard; |
48 | 48 |
|
49 |
public InstallPackageServiceFrame(File applicationDirectory) |
|
50 |
throws LocatorException, InstallPackageWizardException { |
|
49 |
public InstallPackageServiceFrame(File applicationFolder, |
|
50 |
File pluginsFolder, File installFolder) throws LocatorException, |
|
51 |
InstallPackageWizardException { |
|
51 | 52 |
super(); |
52 | 53 |
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
53 | 54 |
installerExecutionWizard = |
54 | 55 |
SwingInstallerLocator.getSwingInstallerManager() |
55 |
.createInstallPackageWizard(applicationDirectory); |
|
56 |
.createInstallPackageWizard(applicationFolder, pluginsFolder, |
|
57 |
installFolder); |
|
56 | 58 |
installerExecutionWizard |
57 | 59 |
.setWizardActionListener(new FrameWizardListener(this)); |
58 | 60 |
this.add(installerExecutionWizard); |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageWizardFromDefaultDirectoryLauncher.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.installer.main.execution; |
29 | 29 |
|
30 |
import java.io.File; |
|
31 | 30 |
import java.io.IOException; |
32 | 31 |
|
33 | 32 |
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException; |
... | ... | |
57 | 56 |
public InstallPackageWizardFromDefaultDirectoryLauncher() |
58 | 57 |
throws LocatorException, InstallPackageWizardException, |
59 | 58 |
InstallPackageServiceException, IOException { |
60 |
File applicationDirectory = getApplicationDirectory(); |
|
61 | 59 |
|
62 | 60 |
InstallPackageServiceFrame frame = |
63 |
new InstallPackageServiceFrame(applicationDirectory); |
|
61 |
new InstallPackageServiceFrame(getApplicationFolder(), |
|
62 |
getPluginsFolder(), getInstallFolder()); |
|
64 | 63 |
frame.installFromDefaultDirectory(); |
65 | 64 |
frame.setVisible(true); |
66 | 65 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageWizardLauncher.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.installer.main.execution; |
29 | 29 |
|
30 |
import java.io.File; |
|
31 | 30 |
import java.io.IOException; |
32 | 31 |
|
33 | 32 |
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException; |
... | ... | |
56 | 55 |
public InstallPackageWizardLauncher() throws LocatorException, |
57 | 56 |
InstallPackageWizardException, InstallPackageServiceException, |
58 | 57 |
IOException { |
59 |
File applicationDirectory = getApplicationDirectory(); |
|
60 | 58 |
|
61 | 59 |
InstallPackageServiceFrame frame = |
62 |
new InstallPackageServiceFrame(applicationDirectory); |
|
60 |
new InstallPackageServiceFrame(getApplicationFolder(), |
|
61 |
getPluginsFolder(), getInstallFolder()); |
|
63 | 62 |
frame.setVisible(true); |
64 | 63 |
} |
65 | 64 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/creation/MakePluginPackageWizardLauncher.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.installer.main.creation; |
29 | 29 |
|
30 |
import java.io.File; |
|
31 | 30 |
import java.io.IOException; |
32 | 31 |
|
33 | 32 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException; |
... | ... | |
56 | 55 |
public MakePluginPackageWizardLauncher() throws LocatorException, |
57 | 56 |
MakePluginPackageWizardException, IOException, |
58 | 57 |
MakePluginPackageServiceException { |
59 |
File applicationDirectory = getApplicationDirectory(); |
|
60 | 58 |
|
61 | 59 |
MakePluginPackageFrame frame = |
62 |
new MakePluginPackageFrame(applicationDirectory); |
|
60 |
new MakePluginPackageFrame(getApplicationFolder(), |
|
61 |
getPluginsFolder(), getInstallFolder()); |
|
63 | 62 |
frame.setVisible(true); |
64 | 63 |
} |
65 | 64 |
|
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/creation/MakePluginPackageFrame.java | ||
---|---|---|
45 | 45 |
private static final long serialVersionUID = 4144834319158286247L; |
46 | 46 |
private MakePluginPackageWizard installerCreationWizard; |
47 | 47 |
|
48 |
public MakePluginPackageFrame(File applicationDirectory) |
|
49 |
throws LocatorException, MakePluginPackageWizardException { |
|
48 |
public MakePluginPackageFrame(File applicationFolder, File pluginsFolder, |
|
49 |
File installFolder) throws LocatorException, |
|
50 |
MakePluginPackageWizardException { |
|
50 | 51 |
super(); |
51 | 52 |
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
52 | 53 |
installerCreationWizard = |
53 | 54 |
SwingInstallerLocator.getSwingInstallerManager() |
54 |
.createMakePluginPackageWizard(applicationDirectory); |
|
55 |
.createMakePluginPackageWizard(applicationFolder, |
|
56 |
pluginsFolder, installFolder); |
|
55 | 57 |
installerCreationWizard |
56 | 58 |
.setWizardActionListener(new FrameWizardListener(this)); |
57 | 59 |
this.add(installerCreationWizard); |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/DefaultLauncher.java | ||
---|---|---|
39 | 39 |
*/ |
40 | 40 |
public class DefaultLauncher { |
41 | 41 |
|
42 |
public File getApplicationDirectory() throws IOException { |
|
43 |
File templateFile = |
|
44 |
new File(getClass().getClassLoader().getResource("application") |
|
45 |
.getFile()); |
|
46 |
File applicationDirectory = |
|
47 |
new File(System.getProperty("java.io.tmpdir") + File.separator |
|
48 |
+ "tmp_gvsig_installer"); |
|
42 |
private File appFolder; |
|
49 | 43 |
|
50 |
copy(templateFile, applicationDirectory); |
|
44 |
public File getApplicationFolder() throws IOException { |
|
45 |
if (appFolder == null) { |
|
46 |
File templateFile = |
|
47 |
new File(getClass().getClassLoader().getResource("application") |
|
48 |
.getFile()); |
|
49 |
appFolder = |
|
50 |
new File(System.getProperty("java.io.tmpdir") + File.separator |
|
51 |
+ "tmp_gvsig_installer"); |
|
51 | 52 |
|
52 |
return applicationDirectory; |
|
53 |
copy(templateFile, appFolder); |
|
54 |
} |
|
55 |
|
|
56 |
return appFolder; |
|
53 | 57 |
} |
54 | 58 |
|
59 |
public File getPluginsFolder() throws IOException { |
|
60 |
return new File(appFolder, "plugins"); |
|
61 |
} |
|
62 |
|
|
63 |
public File getInstallFolder() throws IOException { |
|
64 |
return new File(appFolder, "install"); |
|
65 |
} |
|
66 |
|
|
55 | 67 |
public void copy(File sourceLocation, File targetLocation) |
56 | 68 |
throws IOException { |
57 | 69 |
if (sourceLocation.isDirectory()) { |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/PackageInfo.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import java.io.File; |
31 | 31 |
|
32 |
import org.gvsig.installer.lib.api.InstallerManager.ARCH; |
|
33 |
import org.gvsig.installer.lib.api.InstallerManager.JVM; |
|
34 |
import org.gvsig.installer.lib.api.InstallerManager.OS; |
|
35 |
import org.gvsig.installer.lib.api.InstallerManager.STATE; |
|
36 |
|
|
32 | 37 |
/** |
33 | 38 |
* Information of a package that is used on the installation process. |
34 | 39 |
* This information is composed by next fields: |
... | ... | |
93 | 98 |
/** |
94 | 99 |
* @return |
95 | 100 |
* Gets the state of the package. |
101 |
* @see STATE |
|
96 | 102 |
*/ |
97 | 103 |
public String getState(); |
98 | 104 |
|
105 |
/** |
|
106 |
* Sets the state of the package |
|
107 |
* |
|
108 |
* @param state |
|
109 |
* @see STATE |
|
110 |
*/ |
|
99 | 111 |
public void setState(String state); |
100 | 112 |
|
101 | 113 |
/** |
... | ... | |
114 | 126 |
|
115 | 127 |
public void setType(String type); |
116 | 128 |
|
129 |
/** |
|
130 |
* Returns the supported operating system. |
|
131 |
* |
|
132 |
* @return the supported operating system |
|
133 |
* @see OS |
|
134 |
*/ |
|
117 | 135 |
public String getOperatingSystem(); |
118 | 136 |
|
137 |
/** |
|
138 |
* Sets the supported operating system. |
|
139 |
* |
|
140 |
* @param operatingSystem |
|
141 |
* the supported operating system |
|
142 |
* @see OS |
|
143 |
*/ |
|
119 | 144 |
public void setOperatingSystem(String operatingSystem); |
120 | 145 |
|
146 |
/** |
|
147 |
* Returns the supported hardware architecture. |
|
148 |
* |
|
149 |
* @return the supported hardware architecture |
|
150 |
* @see ARCH |
|
151 |
*/ |
|
121 | 152 |
public String getArchitecture(); |
122 | 153 |
|
154 |
/** |
|
155 |
* Sets the supported hardware architecture. |
|
156 |
* |
|
157 |
* @param architecture |
|
158 |
* the supported hardware architecture |
|
159 |
* @see ARCH |
|
160 |
*/ |
|
123 | 161 |
public void setArchitecture(String architecture); |
124 | 162 |
|
163 |
/** |
|
164 |
* Returns the supported java vm version. |
|
165 |
* |
|
166 |
* @return the supported java vm version |
|
167 |
* @see JVM |
|
168 |
*/ |
|
125 | 169 |
public String getJavaVM(); |
126 | 170 |
|
171 |
/** |
|
172 |
* Sets the supported java vm version. |
|
173 |
* |
|
174 |
* @param javaVM |
|
175 |
* the supported java vm version |
|
176 |
* @see JVM |
|
177 |
*/ |
|
127 | 178 |
public void setJavaVM(String javaVM); |
128 | 179 |
|
129 | 180 |
public String getGvSIGVersion(); |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/InstallerManager.java | ||
---|---|---|
28 | 28 |
package org.gvsig.installer.lib.api; |
29 | 29 |
|
30 | 30 |
import java.io.File; |
31 |
import java.text.MessageFormat; |
|
31 | 32 |
|
32 | 33 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageService; |
33 | 34 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException; |
... | ... | |
87 | 88 |
*/ |
88 | 89 |
public interface InstallerManager extends Manager { |
89 | 90 |
|
91 |
/** |
|
92 |
* Package state default values. |
|
93 |
*/ |
|
90 | 94 |
public static interface STATE { |
91 | 95 |
|
92 |
public static final String DEVEL = "devel";
|
|
93 |
public static final String TESTING = "testing";
|
|
94 |
public static final String PILOT = "pilot";
|
|
95 |
public static final String PROTOTYPE = "prototype";
|
|
96 |
public static final String ALPHA = "alpha";
|
|
97 |
public static final String BETA = "beta";
|
|
98 |
public static final String RC = "RC";
|
|
99 |
public static final String FINAL = "final";
|
|
96 |
static final String DEVEL = "devel"; |
|
97 |
static final String TESTING = "testing"; |
|
98 |
static final String PILOT = "pilot"; |
|
99 |
static final String PROTOTYPE = "prototype"; |
|
100 |
static final String ALPHA = "alpha"; |
|
101 |
static final String BETA = "beta"; |
|
102 |
static final String RC = "RC"; |
|
103 |
static final String FINAL = "final"; |
|
100 | 104 |
} |
101 | 105 |
|
106 |
/** |
|
107 |
* Supported operating system default values. |
|
108 |
*/ |
|
102 | 109 |
public static interface OS { |
103 | 110 |
|
104 |
public static final String ALL = "all";
|
|
105 |
public static final String LINUX = "lin";
|
|
106 |
public static final String WINDOWS = "win";
|
|
107 |
public static final String OSX_10_4 = "osx_10_4";
|
|
108 |
public static final String OSX_10_5 = "osx_10_5";
|
|
109 |
public static final String OSX_10_6 = "osx_10_6";
|
|
111 |
static final String ALL = "all"; |
|
112 |
static final String LINUX = "lin"; |
|
113 |
static final String WINDOWS = "win"; |
|
114 |
static final String OSX_10_4 = "osx_10_4"; |
|
115 |
static final String OSX_10_5 = "osx_10_5"; |
|
116 |
static final String OSX_10_6 = "osx_10_6"; |
|
110 | 117 |
} |
111 | 118 |
|
119 |
/** |
|
120 |
* Supported architecture default values. |
|
121 |
*/ |
|
112 | 122 |
public static interface ARCH { |
113 | 123 |
|
114 |
public static final String ALL = "all";
|
|
115 |
public static final String X86 = "x86";
|
|
116 |
public static final String X86_64 = "x86_64";
|
|
124 |
static final String ALL = "all"; |
|
125 |
static final String X86 = "x86"; |
|
126 |
static final String X86_64 = "x86_64"; |
|
117 | 127 |
} |
118 | 128 |
|
129 |
/** |
|
130 |
* Supported Java virtual machine version default values. |
|
131 |
*/ |
|
119 | 132 |
public static interface JVM { |
120 | 133 |
|
121 |
public static final String J1_5 = "j1_5";
|
|
122 |
public static final String J1_6 = "j1_6";
|
|
134 |
static final String J1_5 = "j1_5"; |
|
135 |
static final String J1_6 = "j1_6"; |
|
123 | 136 |
} |
124 | 137 |
|
125 | 138 |
/** |
139 |
* Fields into the bundle file name message format. |
|
140 |
* |
|
141 |
* @see InstallerManager#getPackageBundleNameFormat() |
|
142 |
* @see InstallerManager#setPackageBundleNameFormat(String) |
|
143 |
*/ |
|
144 |
public static interface BUNDLE_FILE_NAME_FIELDS { |
|
145 |
|
|
146 |
static final int GVSIG_VERSION = 0; |
|
147 |
static final int NAME = 1; |
|
148 |
static final int VERSION = 2; |
|
149 |
static final int BUILD = 3; |
|
150 |
static final int STATE = 4; |
|
151 |
static final int OS = 5; |
|
152 |
static final int ARCH = 6; |
|
153 |
static final int JVM = 7; |
|
154 |
} |
|
155 |
|
|
156 |
/** |
|
126 | 157 |
* It registers a class that implements the service for the creation of |
127 | 158 |
* bundle that contains inside a package of type plugin. The registered |
128 | 159 |
* class |
... | ... | |
148 | 179 |
public MakePluginPackageService getMakePluginPackageService( |
149 | 180 |
File pluginsDirectory) throws MakePluginPackageServiceException; |
150 | 181 |
|
182 |
/** |
|
183 |
* Returns a list of package infos for the already installed plugins. |
|
184 |
* |
|
185 |
* @param pluginsDirectory |
|
186 |
* where to look for the installed plugins |
|
187 |
* @return the list of package infos for the already installed plugins |
|
188 |
* @throws MakePluginPackageServiceException |
|
189 |
* if there is an error loading |
|
190 |
* the information of the installed plugins |
|
191 |
*/ |
|
192 |
public PackageInfo[] getInstalledPackages(File pluginsDirectory) |
|
193 |
throws MakePluginPackageServiceException; |
|
194 |
|
|
195 |
/** |
|
196 |
* Returns the package bundle file name format. |
|
197 |
* <p> |
|
198 |
* The string has to use a suitable {@link MessageFormat} format, and the |
|
199 |
* available field numbers are the ones defined in the |
|
200 |
* BUNDLE_FILE_NAME_FIELDS interface. |
|
201 |
* </p> |
|
202 |
* |
|
203 |
* @return the package bundle file name format. |
|
204 |
*/ |
|
151 | 205 |
public String getPackageBundleNameFormat(); |
152 | 206 |
|
207 |
/** |
|
208 |
* Sets the package bundle file name format. |
|
209 |
* |
|
210 |
* @see InstallerManager#getPackageBundleNameFormat() |
|
211 |
* @param packageBundleNameFormat |
|
212 |
* the package bundle file name format. |
|
213 |
*/ |
|
153 | 214 |
public void setPackageBundleNameFormat(String packageBundleNameFormat); |
154 | 215 |
|
216 |
/** |
|
217 |
* Returns the name of the package bundle file for a given package info. |
|
218 |
* |
|
219 |
* @param info |
|
220 |
* of the plugin |
|
221 |
* @return the name of the package bundle file |
|
222 |
*/ |
|
155 | 223 |
public String getPackageBundleFileName(PackageInfo info); |
156 | 224 |
|
157 | 225 |
/** |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/execution/InstallPackageService.java | ||
---|---|---|
28 | 28 |
package org.gvsig.installer.lib.api.execution; |
29 | 29 |
|
30 | 30 |
import java.io.File; |
31 |
import java.net.URI; |
|
32 | 31 |
|
33 | 32 |
import org.gvsig.installer.lib.api.InstallerManager; |
34 | 33 |
import org.gvsig.installer.lib.api.PackageInfo; |
... | ... | |
63 | 62 |
* @throws InstallPackageServiceException |
64 | 63 |
* it is thrown if there is an exception reading the URI. |
65 | 64 |
*/ |
66 |
public void addBundle(URI bundleURI) throws InstallPackageServiceException; |
|
65 |
public void addBundle(File bundleFile) |
|
66 |
throws InstallPackageServiceException; |
|
67 | 67 |
|
68 | 68 |
/** |
69 | 69 |
* In reads a directory and reads all the bundles. This method retrieve |
... | ... | |
84 | 84 |
* selected |
85 | 85 |
* package has to be contained in one of the bundles that has been |
86 | 86 |
* previously |
87 |
* added using the {@link #addBundle(URI)} or the
|
|
87 |
* added using the {@link #addBundle(File)} or the
|
|
88 | 88 |
* {@link #addBundlesFromDirectory(File)} method. |
89 | 89 |
* |
90 | 90 |
* @param applicationDirectory |
... | ... | |
103 | 103 |
* selected |
104 | 104 |
* package has to be contained in one of the bundles that has been |
105 | 105 |
* previously |
106 |
* added using the {@link #addBundle(URI)} or the
|
|
106 |
* added using the {@link #addBundle(File)} or the
|
|
107 | 107 |
* {@link #addBundlesFromDirectory(File)} method. |
108 | 108 |
* |
109 | 109 |
* @param applicationDirectory |
... | ... | |
121 | 121 |
* @return |
122 | 122 |
* the number of packages that has been loaded form one or more |
123 | 123 |
* bundles |
124 |
* using the {@link #addBundle(URI)} or the
|
|
124 |
* using the {@link #addBundle(File)} or the
|
|
125 | 125 |
* {@link #addBundlesFromDirectory(File)} method. |
126 | 126 |
*/ |
127 | 127 |
public int getPackageCount(); |
... | ... | |
129 | 129 |
/** |
130 | 130 |
* Return the package information for a concrete position. All |
131 | 131 |
* the packages has been loaded form one or more bundles |
132 |
* using the {@link #addBundle(URI)} or the
|
|
132 |
* using the {@link #addBundle(File)} or the
|
|
133 | 133 |
* {@link #addBundlesFromDirectory(File)} method. |
134 | 134 |
* |
135 | 135 |
* @param index |
... | ... | |
143 | 143 |
/** |
144 | 144 |
* Return the package information for a concrete position. All |
145 | 145 |
* the packages has been loaded form one or more bundles |
146 |
* using the {@link #addBundle(URI)} or the
|
|
146 |
* using the {@link #addBundle(File)} or the
|
|
147 | 147 |
* {@link #addBundlesFromDirectory(File)} method. |
148 | 148 |
* |
149 | 149 |
* @param packageCode |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/creation/MakePluginPackageService.java | ||
---|---|---|
174 | 174 |
public String getDefaultAntScript() |
175 | 175 |
throws MakePluginPackageServiceException; |
176 | 176 |
|
177 |
/** |
|
178 |
* Returns the list of packages already installed in the application. |
|
179 |
* |
|
180 |
* @return the list of packages already installed in the application |
|
181 |
* @throws MakePluginPackageServiceException |
|
182 |
* if there is an error getting |
|
183 |
* the installed packages |
|
184 |
*/ |
|
185 |
public PackageInfo[] getInstalledPackages() |
|
186 |
throws MakePluginPackageServiceException; |
|
177 | 187 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/execution/DefaultInstallPackageService.java | ||
---|---|---|
31 | 31 |
import java.io.FileInputStream; |
32 | 32 |
import java.io.FileNotFoundException; |
33 | 33 |
import java.io.InputStream; |
34 |
import java.net.URI; |
|
35 | 34 |
import java.util.ArrayList; |
36 | 35 |
import java.util.HashMap; |
37 | 36 |
import java.util.List; |
... | ... | |
56 | 55 |
*/ |
57 | 56 |
public class DefaultInstallPackageService implements InstallPackageService { |
58 | 57 |
|
59 |
private Map<PackageInfo, URI> packageInfoUriMap = null;
|
|
58 |
private Map<PackageInfo, File> packageInfoFileMap = null;
|
|
60 | 59 |
private Map<PackageInfo, String> zipEntriesMap = null; |
61 | 60 |
private List<PackageInfo> packageInfos = null; |
62 | 61 |
private Manager manager; |
... | ... | |
67 | 66 |
public DefaultInstallPackageService(DefaultInstallerManager manager) { |
68 | 67 |
super(); |
69 | 68 |
this.manager = manager; |
70 |
packageInfoUriMap = new HashMap<PackageInfo, URI>();
|
|
69 |
packageInfoFileMap = new HashMap<PackageInfo, File>();
|
|
71 | 70 |
packageInfos = new ArrayList<PackageInfo>(); |
72 | 71 |
zipEntriesMap = new HashMap<PackageInfo, String>(); |
73 | 72 |
installerProviderServices = |
... | ... | |
81 | 80 |
throw new InstallPackageServiceException( |
82 | 81 |
"application_directory_not_found"); |
83 | 82 |
} |
84 |
if (!packageInfoUriMap.containsKey(packageInfo)) {
|
|
83 |
if (!packageInfoFileMap.containsKey(packageInfo)) {
|
|
85 | 84 |
throw new InstallPackageServiceException("package_not_found"); |
86 | 85 |
} |
87 | 86 |
|
88 | 87 |
InputStream bundleStream = null; |
89 | 88 |
|
90 | 89 |
try { |
91 |
File file = new File(packageInfoUriMap.get(packageInfo));
|
|
90 |
File file = packageInfoFileMap.get(packageInfo);
|
|
92 | 91 |
bundleStream = new FileInputStream(file); |
93 | 92 |
} catch (FileNotFoundException e) { |
94 | 93 |
throw new InstallPackageServiceException("not_uri_selected"); |
... | ... | |
144 | 143 |
return null; |
145 | 144 |
} |
146 | 145 |
|
147 |
public void addBundle(URI inputURI) throws InstallPackageServiceException { |
|
148 |
File file = new File(inputURI); |
|
149 |
if (!file.exists()) { |
|
146 |
public void addBundle(File bundle) throws InstallPackageServiceException { |
|
147 |
if (!bundle.exists()) { |
|
150 | 148 |
throw new InstallPackageServiceException( |
151 |
"Only URI form existing file is supported");
|
|
149 |
"Only an existing file is supported");
|
|
152 | 150 |
} |
153 | 151 |
try { |
154 | 152 |
int packageInfoCount = packageInfos.size(); |
155 |
installerProviderServices.readPackageInfo( |
|
156 |
new FileInputStream(file), packageInfos, zipEntriesMap);
|
|
153 |
installerProviderServices.readPackageInfo(new FileInputStream(
|
|
154 |
bundle), packageInfos, zipEntriesMap);
|
|
157 | 155 |
for (int i = packageInfoCount; i < packageInfos.size(); i++) { |
158 |
packageInfoUriMap.put(packageInfos.get(i), inputURI);
|
|
156 |
packageInfoFileMap.put(packageInfos.get(i), bundle);
|
|
159 | 157 |
} |
160 | 158 |
} catch (FileNotFoundException e) { |
161 | 159 |
logger.error("File not found", e); |
... | ... | |
170 | 168 |
} |
171 | 169 |
File[] files = directory.listFiles(); |
172 | 170 |
for (int i = 0; i < files.length; i++) { |
173 |
addBundle(files[i].toURI()); |
|
171 |
if (files[i].isFile()) { |
|
172 |
addBundle(files[i]); |
|
173 |
} |
|
174 | 174 |
} |
175 | 175 |
} |
176 | 176 |
|
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/creation/DefaultMakePluginPackageService.java | ||
---|---|---|
390 | 390 |
public File getPluginsDirectory() { |
391 | 391 |
return pluginsDirectory; |
392 | 392 |
} |
393 |
|
|
394 |
public PackageInfo[] getInstalledPackages() |
|
395 |
throws MakePluginPackageServiceException { |
|
396 |
return installerInfos.toArray(new PackageInfo[installerInfos.size()]); |
|
397 |
} |
|
393 | 398 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/DefaultInstallerManager.java | ||
---|---|---|
59 | 59 |
private ExtensionPointManager extensionPoints = ToolsLocator |
60 | 60 |
.getExtensionPointManager(); |
61 | 61 |
|
62 |
public static final int FIELD_GVSIG_VERSION = 0; |
|
63 |
public static final int FIELD_NAME = 1; |
|
64 |
public static final int FIELD_VERSION = 2; |
|
65 |
public static final int FIELD_BUILD = 3; |
|
66 |
public static final int FIELD_STATE = 4; |
|
67 |
public static final int FIELD_OS = 5; |
|
68 |
public static final int FIELD_ARCH = 6; |
|
69 |
public static final int FIELD_JVM = 7; |
|
70 | 62 |
private String packageBundleNameFormat = |
71 | 63 |
"gvSIG-desktop-{0}-{1}-{2}-{3,number,#}-{4}-{5}-{6}-{7}.zip"; |
72 | 64 |
|
... | ... | |
135 | 127 |
|
136 | 128 |
public String getPackageBundleFileName(PackageInfo info) { |
137 | 129 |
Object[] parameters = new Object[8]; |
138 |
parameters[FIELD_GVSIG_VERSION] = info.getGvSIGVersion(); |
|
139 |
parameters[FIELD_NAME] = info.getCode(); |
|
140 |
parameters[FIELD_VERSION] = info.getVersion(); |
|
141 |
parameters[FIELD_BUILD] = info.getBuild(); |
|
142 |
parameters[FIELD_STATE] = info.getState(); |
|
143 |
parameters[FIELD_OS] = info.getOperatingSystem(); |
|
144 |
parameters[FIELD_ARCH] = info.getArchitecture(); |
|
145 |
parameters[FIELD_JVM] = info.getJavaVM(); |
|
130 |
parameters[BUNDLE_FILE_NAME_FIELDS.GVSIG_VERSION] = |
|
131 |
info.getGvSIGVersion(); |
|
132 |
parameters[BUNDLE_FILE_NAME_FIELDS.NAME] = info.getCode(); |
|
133 |
parameters[BUNDLE_FILE_NAME_FIELDS.VERSION] = info.getVersion(); |
|
134 |
parameters[BUNDLE_FILE_NAME_FIELDS.BUILD] = info.getBuild(); |
|
135 |
parameters[BUNDLE_FILE_NAME_FIELDS.STATE] = info.getState(); |
|
136 |
parameters[BUNDLE_FILE_NAME_FIELDS.OS] = info.getOperatingSystem(); |
|
137 |
parameters[BUNDLE_FILE_NAME_FIELDS.ARCH] = info.getArchitecture(); |
|
138 |
parameters[BUNDLE_FILE_NAME_FIELDS.JVM] = info.getJavaVM(); |
|
146 | 139 |
return MessageFormat.format(getPackageBundleNameFormat(), parameters); |
147 | 140 |
} |
141 |
|
|
142 |
public PackageInfo[] getInstalledPackages(File pluginsDirectory) |
|
143 |
throws MakePluginPackageServiceException { |
|
144 |
MakePluginPackageService service = |
|
145 |
getMakePluginPackageService(pluginsDirectory); |
|
146 |
return service.getInstalledPackages(); |
|
147 |
} |
|
148 | 148 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/execution/InstallPackageServiceTest.java | ||
---|---|---|
120 | 120 |
|
121 | 121 |
InstallPackageService installerExecutionService = |
122 | 122 |
InstallerLocator.getInstallerManager().getInstallPackageService(); |
123 |
installerExecutionService.addBundle(externalInstallationFile.toURI());
|
|
123 |
installerExecutionService.addBundle(externalInstallationFile); |
|
124 | 124 |
|
125 | 125 |
PackageInfo packageInfo = |
126 | 126 |
installerExecutionService.getPackageInfo("org.gvsig.plugin1"); |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/creation/MakePluginPackageServiceTest.java | ||
---|---|---|
110 | 110 |
InstallPackageService installPackageService = |
111 | 111 |
InstallerLocator.getInstallerManager().getInstallPackageService(); |
112 | 112 |
|
113 |
installPackageService.addBundle(installerFile.toURI());
|
|
113 |
installPackageService.addBundle(installerFile); |
|
114 | 114 |
assertEquals(1, installPackageService.getPackageCount()); |
115 | 115 |
PackageInfo newInstallerInfo = |
116 | 116 |
makePluginPackageService.getPluginPackageInfo(0); |
... | ... | |
138 | 138 |
// decompress the plugin and read the plugin information |
139 | 139 |
InstallPackageService installPackageService = |
140 | 140 |
InstallerLocator.getInstallerManager().getInstallPackageService(); |
141 |
installPackageService.addBundle(installerFile.toURI());
|
|
141 |
installPackageService.addBundle(installerFile); |
|
142 | 142 |
assertEquals(1, installPackageService.getPackageCount()); |
143 | 143 |
PackageInfo newInstallerInfo = |
144 | 144 |
makePluginPackageService.getPluginPackageInfo(0); |
... | ... | |
169 | 169 |
// decompress the plugin and read the plugin information |
170 | 170 |
InstallPackageService installPackageService = |
171 | 171 |
InstallerLocator.getInstallerManager().getInstallPackageService(); |
172 |
installPackageService.addBundle(installerFile.toURI());
|
|
172 |
installPackageService.addBundle(installerFile); |
|
173 | 173 |
assertEquals(1, installPackageService.getPackageCount()); |
174 | 174 |
PackageInfo newInstallerInfo = |
175 | 175 |
makePluginPackageService.getPluginPackageInfo(0); |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/resources/locale/text.properties | ||
---|---|---|
13 | 13 |
output_options=Opciones de salida |
14 | 14 |
progress=Progreso de instalaci?n |
15 | 15 |
advanced_mode=El modo avanzado permite copiar recursos que est?n localizados fuera de el directorio de los plugins. No se recomienda usar esta opci?n. |
16 |
initializing=Initializing
|
|
17 |
create_output_file_exception=Error creando el fichero de salida
|
|
16 |
initializing=Inicializando
|
|
17 |
create_output_file_exception=Error creando el archivo de salida
|
|
18 | 18 |
select_installer=Selecciona el instalador |
19 | 19 |
select_plugins=Selecciona los plugins a instalar |
20 | 20 |
execute_adding_error=Error a?adiendo el recurso |
... | ... | |
28 | 28 |
enable_advanced_mode=Habilitar el modo avanzado |
29 | 29 |
compressing=Comprimiendo |
30 | 30 |
finished=Terminado |
31 |
standard_installation=Instalaci?n esd?ndar
|
|
31 |
standard_installation=Instalaci?n est?ndar
|
|
32 | 32 |
installation_from_file=Instalaci?n desde archivo |
33 | 33 |
official=Oficial |
34 | 34 |
not_official=No oficial |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/DefaultInstallPackageWizard.java | ||
---|---|---|
44 | 44 |
import org.gvsig.installer.lib.api.PackageInfo; |
45 | 45 |
import org.gvsig.installer.lib.api.execution.InstallPackageService; |
46 | 46 |
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException; |
47 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
|
48 | 47 |
import org.gvsig.installer.swing.api.execution.InstallPackageWizard; |
49 | 48 |
import org.gvsig.installer.swing.impl.execution.wizard.ProgressWizard; |
50 | 49 |
import org.gvsig.installer.swing.impl.execution.wizard.SelectBundlesWizard; |
... | ... | |
69 | 68 |
|
70 | 69 |
private WizardListenerAdapter wizardListenerAdapter = null; |
71 | 70 |
|
72 |
public DefaultInstallPackageWizard(File applicationDirectory) |
|
71 |
public DefaultInstallPackageWizard(File applicationFolder, |
|
72 |
File pluginsFolder, File installFolder) |
|
73 | 73 |
throws InstallPackageServiceException { |
74 |
super(applicationDirectory); |
|
74 |
super(applicationFolder, pluginsFolder, installFolder); |
|
75 |
|
|
76 |
installerExecutionService = |
|
77 |
InstallerLocator.getInstallerManager().getInstallPackageService(); |
|
78 |
|
|
75 | 79 |
URL iconURL = |
76 | 80 |
getClass().getClassLoader().getResource( |
77 | 81 |
"images/installpackageicon.png"); |
... | ... | |
93 | 97 |
|
94 | 98 |
this.setLayout(new BorderLayout()); |
95 | 99 |
this.add(wizardPanelWithLogo, BorderLayout.CENTER); |
96 |
|
|
97 |
installerExecutionService = |
|
98 |
InstallerLocator.getInstallerManager().getInstallPackageService(); |
|
99 | 100 |
} |
100 | 101 |
|
101 | 102 |
private void addWizards() { |
... | ... | |
138 | 139 |
public void installFromDefaultDirectory() |
139 | 140 |
throws InstallPackageServiceException { |
140 | 141 |
getWizardComponents().removeWizardPanel(0); |
141 |
installerExecutionService |
|
142 |
.addBundlesFromDirectory(getDefaultInstallersDirectory()); |
|
142 |
installerExecutionService.addBundlesFromDirectory(getInstallFolder()); |
|
143 | 143 |
selectPluginsWizard.updatePanel(); |
144 | 144 |
} |
145 | 145 |
|
146 |
public File getDefaultInstallersDirectory() { |
|
147 |
return SwingInstallerLocator.getSwingInstallerManager() |
|
148 |
.getDefaultInstallersFolder(applicationDirectory); |
|
149 |
} |
|
150 |
|
|
151 | 146 |
public WizardPanelActionListener getWizardPanelActionListener() { |
152 | 147 |
if (((wizardListenerAdapter == null) && (getWizardActionListener() != null))) { |
153 | 148 |
return new WizardListenerAdapter(this); |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/InstalledPackageCellRenderer.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
package org.gvsig.installer.swing.impl.execution.panel; |
|
23 |
|
|
24 |
import java.awt.Component; |
|
25 |
import java.awt.Font; |
|
26 |
|
|
27 |
import javax.swing.JTable; |
|
28 |
|
|
29 |
import org.gvsig.installer.swing.impl.execution.model.PackagesTableModel.TablePackageInfo; |
|
30 |
|
|
31 |
/** |
|
32 |
* @author gvSIG Team |
|
33 |
* @version $Id$ |
|
34 |
*/ |
|
35 |
public class InstalledPackageCellRenderer extends |
|
36 |
AbstractTablePackageInfoCellRenderer { |
|
37 |
|
|
38 |
private static final long serialVersionUID = 8084888009827442141L; |
|
39 |
|
|
40 |
protected Component getTableCellRendererComponent(TablePackageInfo info, |
|
41 |
Component defaultComponent, JTable table, Object value, |
|
42 |
boolean isSelected, boolean hasFocus, int row, int column) { |
|
43 |
|
|
44 |
if (info.isInstalled()) { |
|
45 |
defaultComponent.setFont(defaultComponent.getFont().deriveFont( |
|
46 |
Font.BOLD)); |
|
47 |
} |
|
48 |
return defaultComponent; |
|
49 |
} |
|
50 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagesTablePanel.java | ||
---|---|---|
43 | 43 |
import org.gvsig.installer.lib.api.PackageInfo; |
44 | 44 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
45 | 45 |
import org.gvsig.installer.swing.api.SwingInstallerManager; |
46 |
import org.gvsig.installer.swing.impl.execution.model.PackagesTableCellRenderer; |
|
47 | 46 |
import org.gvsig.installer.swing.impl.execution.model.PackagesTableModel; |
48 | 47 |
|
49 | 48 |
/** |
... | ... | |
65 | 64 |
initComponents(); |
66 | 65 |
pluginsTable.getSelectionModel().addListSelectionListener(this); |
67 | 66 |
pluginsTable.setDefaultRenderer(Boolean.class, |
68 |
new PackagesTableCellRenderer(selectPluginsPanel)); |
|
67 |
new PackageToInstallCellRenderer(selectPluginsPanel)); |
|
68 |
AbstractTablePackageInfoCellRenderer ipcr = new InstalledPackageCellRenderer(); |
|
69 |
pluginsTable.setDefaultRenderer(String.class, ipcr); |
|
70 |
pluginsTable.setDefaultRenderer(Number.class, ipcr); |
|
69 | 71 |
pluginsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
70 | 72 |
} |
71 | 73 |
|
... | ... | |
90 | 92 |
|
91 | 93 |
public boolean isPackageSelected() { |
92 | 94 |
return ((PackagesTableModel) pluginsTable.getModel()) |
93 |
.isPackageSelected();
|
|
95 |
.hasAnyPackageSelected();
|
|
94 | 96 |
} |
95 | 97 |
|
96 | 98 |
private void initComponents() { |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/AbstractTablePackageInfoCellRenderer.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
package org.gvsig.installer.swing.impl.execution.panel; |
|
23 |
|
|
24 |
import java.awt.Component; |
|
25 |
|
|
26 |
import javax.swing.JTable; |
|
27 |
import javax.swing.table.DefaultTableCellRenderer; |
|
28 |
import javax.swing.table.TableModel; |
|
29 |
|
|
30 |
import org.gvsig.installer.swing.impl.execution.model.PackagesTableModel; |
|
31 |
import org.gvsig.installer.swing.impl.execution.model.PackagesTableModel.TablePackageInfo; |
|
32 |
|
|
33 |
/** |
|
34 |
* @author gvSIG Team |
|
35 |
* @version $Id$ |
|
36 |
*/ |
|
37 |
public abstract class AbstractTablePackageInfoCellRenderer extends |
|
38 |
DefaultTableCellRenderer { |
|
39 |
|
|
40 |
private static final long serialVersionUID = -8534540354786328208L; |
|
41 |
|
|
42 |
public Component getTableCellRendererComponent(JTable table, Object value, |
|
43 |
boolean isSelected, boolean hasFocus, int row, int column) { |
|
44 |
|
|
45 |
Component defaultComponent = |
|
46 |
super.getTableCellRendererComponent(table, value, isSelected, |
|
47 |
hasFocus, row, column); |
|
48 |
|
|
49 |
TableModel tableModel = table.getModel(); |
|
50 |
|
|
51 |
if (tableModel instanceof PackagesTableModel) { |
|
52 |
PackagesTableModel packagesTableModel = |
|
53 |
(PackagesTableModel) tableModel; |
|
54 |
|
|
55 |
TablePackageInfo info = packagesTableModel.getPackageInfo(row); |
|
56 |
|
|
57 |
return getTableCellRendererComponent(info, defaultComponent, table, |
|
58 |
value, isSelected, hasFocus, row, column); |
|
59 |
} |
|
60 |
return defaultComponent; |
|
61 |
} |
|
62 |
|
|
63 |
protected abstract Component getTableCellRendererComponent( |
|
64 |
TablePackageInfo info, Component defaultComponent, JTable table, |
|
65 |
Object value, boolean isSelected, boolean hasFocus, int row, int column); |
|
66 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackageToInstallCellRenderer.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Prodevelop} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.installer.swing.impl.execution.panel; |
|
29 |
|
|
30 |
import java.awt.Component; |
|
31 |
|
|
32 |
import javax.swing.JCheckBox; |
|
33 |
import javax.swing.JLabel; |
|
34 |
import javax.swing.JTable; |
|
35 |
|
|
36 |
import org.gvsig.installer.swing.impl.execution.model.IPackageSelectionListener; |
|
37 |
import org.gvsig.installer.swing.impl.execution.model.PackagesTableModel.TablePackageInfo; |
|
38 |
|
|
39 |
/** |
|
40 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
41 |
*/ |
|
42 |
public class PackageToInstallCellRenderer extends |
|
43 |
AbstractTablePackageInfoCellRenderer { |
|
44 |
|
|
45 |
private static final long serialVersionUID = 5104570009030434792L; |
|
46 |
protected JCheckBox check = new JCheckBox(); |
|
47 |
protected JLabel empty = new JLabel(); |
|
48 |
private IPackageSelectionListener packagesSelectionListener = null; |
|
49 |
|
|
50 |
public PackageToInstallCellRenderer( |
|
51 |
IPackageSelectionListener packagesSelectionListener) { |
|
52 |
this.packagesSelectionListener = packagesSelectionListener; |
|
53 |
} |
|
54 |
|
|
55 |
protected Component getTableCellRendererComponent(TablePackageInfo info, |
|
56 |
Component defaultComponent, JTable table, Object value, |
|
57 |
boolean isSelected, boolean hasFocus, int row, int column) { |
|
58 |
|
|
59 |
if (info.isInstallable()) { |
|
60 |
check.setSelected(((value != null) && ((Boolean) value) |
|
61 |
.booleanValue())); |
|
62 |
packagesSelectionListener.packageSelectionchanged(value); |
|
63 |
return check; |
|
64 |
} else { |
|
65 |
return empty; |
|
66 |
} |
|
67 |
} |
|
68 |
} |
|
0 | 69 |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/model/PackagesTableCellRenderer.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Prodevelop} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.installer.swing.impl.execution.model; |
|
29 |
|
|
30 |
import java.awt.Component; |
|
31 |
|
|
32 |
import javax.swing.JCheckBox; |
|
33 |
import javax.swing.JTable; |
|
34 |
import javax.swing.table.TableCellRenderer; |
|
35 |
|
|
36 |
/** |
|
37 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
38 |
*/ |
|
39 |
public class PackagesTableCellRenderer extends JCheckBox implements |
|
40 |
TableCellRenderer { |
|
41 |
|
|
42 |
/** |
|
43 |
* |
|
44 |
*/ |
|
45 |
private static final long serialVersionUID = 5104570009030434792L; |
|
46 |
protected JCheckBox check = new JCheckBox(); |
|
47 |
private IPackageSelectionListener packagesSelectionListener = null; |
|
48 |
|
|
49 |
public PackagesTableCellRenderer( |
|
50 |
IPackageSelectionListener packagesSelectionListener) { |
|
51 |
super(); |
|
52 |
this.packagesSelectionListener = packagesSelectionListener; |
|
53 |
} |
|
54 |
|
|
55 |
public Component getTableCellRendererComponent(JTable table, Object value, |
|
56 |
boolean isSelected, boolean hasFocus, int row, int column) { |
|
57 |
|
|
58 |
setSelected(((value != null) && ((Boolean) value).booleanValue())); |
|
59 |
|
|
60 |
packagesSelectionListener.packageSelectionchanged(value); |
|
61 |
return this; |
|
62 |
} |
|
63 |
} |
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/model/PackagesTableModel.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.installer.swing.impl.execution.model; |
29 | 29 |
|
30 |
import java.util.ArrayList; |
|
30 |
import java.io.File; |
|
31 |
import java.util.Comparator; |
|
31 | 32 |
import java.util.List; |
33 |
import java.util.Set; |
|
34 |
import java.util.TreeSet; |
|
32 | 35 |
|
33 |
import javax.swing.event.TableModelListener; |
|
34 |
import javax.swing.table.TableModel; |
|
36 |
import javax.swing.table.AbstractTableModel; |
|
35 | 37 |
|
38 |
import org.gvsig.installer.lib.api.InstallerLocator; |
|
39 |
import org.gvsig.installer.lib.api.InstallerManager; |
|
36 | 40 |
import org.gvsig.installer.lib.api.PackageInfo; |
41 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException; |
|
37 | 42 |
import org.gvsig.installer.lib.api.execution.InstallPackageService; |
38 |
import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
|
|
43 |
import org.gvsig.installer.swing.api.SwingInstallerManager;
|
|
39 | 44 |
|
40 | 45 |
/** |
41 | 46 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
42 | 47 |
*/ |
43 |
public class PackagesTableModel implements TableModel {
|
|
48 |
public class PackagesTableModel extends AbstractTableModel {
|
|
44 | 49 |
|
45 |
private DefaultSwingInstallerManager swingInstallerManager = null; |
|
46 |
private List<PackageInfo> installerInfos = null; |
|
47 |
private List<Boolean> selected = null; |
|
50 |
private static final long serialVersionUID = 5953623592122163923L; |
|
51 |
private TablePackageInfo[] installerInfos = null; |
|
48 | 52 |
|
49 |
public PackagesTableModel( |
|
50 |
DefaultSwingInstallerManager swingInstallerManager, |
|
51 |
InstallPackageService installerExecutionService, boolean isOfficial) { |
|
52 |
super(); |
|
53 |
this.swingInstallerManager = swingInstallerManager; |
|
53 |
private final String[] columnNames; |
|
54 | 54 |
|
55 |
installerInfos = new ArrayList<PackageInfo>(); |
|
56 |
selected = new ArrayList<Boolean>(); |
|
55 |
private InstallerManager installerManager = InstallerLocator |
|
56 |
.getInstallerManager(); |
|
57 |
|
|
58 |
public PackagesTableModel(SwingInstallerManager swingInstallerManager, |
|
59 |
InstallPackageService installerExecutionService, boolean isOfficial, |
|
60 |
File pluginsFolder) { |
|
61 |
|
|
62 |
Set<TablePackageInfo> infoSet = |
|
63 |
new TreeSet<TablePackageInfo>(new TablePackageInfoComparator()); |
|
57 | 64 |
for (int i = 0; i < installerExecutionService.getPackageCount(); i++) { |
58 | 65 |
PackageInfo installerInfo = |
59 | 66 |
installerExecutionService.getPackageInfo(i); |
60 | 67 |
if (installerInfo.isOfficial() == isOfficial) { |
61 |
installerInfos.add(installerInfo); |
|
62 |
selected.add(false); |
|
68 |
TablePackageInfo info = |
|
69 |
new TablePackageInfo(installerInfo, false, true); |
|
70 |
infoSet.add(info); |
|
63 | 71 |
} |
64 | 72 |
} |
65 |
} |
|
73 |
try { |
|
74 |
PackageInfo[] installedPackages = |
|
75 |
installerManager.getInstalledPackages(pluginsFolder); |
|
66 | 76 |
|
67 |
public void addTableModelListener(TableModelListener l) { |
|
68 |
// TODO Auto-generated method stub |
|
77 |
for (int i = 0; i < installedPackages.length; i++) { |
|
78 |
if (installedPackages[i].isOfficial() == isOfficial) { |
|
79 |
TablePackageInfo info = |
|
80 |
new TablePackageInfo(installedPackages[i], true, false); |
|
81 |
infoSet.add(info); |
|
82 |
} |
|
83 |
} |
|
84 |
} catch (MakePluginPackageServiceException e) { |
|
85 |
throw new RuntimeException(e); |
|
86 |
} |
|
69 | 87 |
|
88 |
installerInfos = infoSet.toArray(new TablePackageInfo[infoSet.size()]); |
|
89 |
|
|
90 |
columnNames = |
|
91 |
new String[] { |
|
92 |
"", // Check column |
|
93 |
swingInstallerManager.getText("id"), |
|
94 |
swingInstallerManager.getText("type"), |
|
95 |
swingInstallerManager.getText("status"), |
|
96 |
swingInstallerManager.getText("version"), |
|
97 |
swingInstallerManager.getText("build"), |
|
98 |
swingInstallerManager.getText("operating_system"), |
|
99 |
swingInstallerManager.getText("architecture"), |
|
100 |
swingInstallerManager.getText("java_version"), |
|
101 |
swingInstallerManager.getText("gvSIG_version") }; |
|
70 | 102 |
} |
71 | 103 |
|
72 | 104 |
public Class<?> getColumnClass(int columnIndex) { |
... | ... | |
79 | 111 |
} |
80 | 112 |
|
81 | 113 |
public int getColumnCount() { |
82 |
return 10;
|
|
114 |
return columnNames.length;
|
|
83 | 115 |
} |
84 | 116 |
|
85 | 117 |
public String getColumnName(int columnIndex) { |
86 |
switch (columnIndex) { |
|
87 |
case 0: |
|
88 |
return swingInstallerManager.getText(""); |
|
89 |
case 1: |
|
90 |
return swingInstallerManager.getText("name"); |
|
91 |
case 2: |
|
92 |
return swingInstallerManager.getText("type"); |
|
93 |
case 3: |
|
94 |
return swingInstallerManager.getText("status"); |
|
95 |
case 4: |
|
96 |
return swingInstallerManager.getText("version"); |
|
97 |
case 5: |
|
98 |
return swingInstallerManager.getText("build"); |
|
99 |
case 6: |
|
100 |
return swingInstallerManager.getText("operating_system"); |
|
101 |
case 7: |
|
102 |
return swingInstallerManager.getText("architecture"); |
|
103 |
case 8: |
|
104 |
return swingInstallerManager.getText("java_version"); |
|
105 |
case 9: |
|
106 |
return swingInstallerManager.getText("gvSIG_version"); |
|
107 |
default: |
|
108 |
return ""; |
|
109 |
} |
|
118 |
return columnIndex >= columnNames.length ? "" |
|
119 |
: columnNames[columnIndex]; |
|
110 | 120 |
} |
111 | 121 |
|
112 | 122 |
public int getRowCount() { |
113 |
return installerInfos.size();
|
|
123 |
return installerInfos.length;
|
|
114 | 124 |
} |
115 | 125 |
|
116 | 126 |
public Object getValueAt(int rowIndex, int columnIndex) { |
117 |
PackageInfo installerInfo = installerInfos.get(rowIndex); |
|
127 |
TablePackageInfo tableInfo = installerInfos[rowIndex]; |
|
128 |
PackageInfo installerInfo = tableInfo.getPackageInfo(); |
|
118 | 129 |
switch (columnIndex) { |
119 | 130 |
case 0: |
120 |
return selected.get(rowIndex);
|
|
131 |
return tableInfo.isSelected();
|
|
121 | 132 |
case 1: |
122 |
return installerInfo.getName();
|
|
133 |
return installerInfo.getCode();
|
|
123 | 134 |
case 2: |
124 | 135 |
return installerInfo.getType(); |
125 | 136 |
case 3: |
... | ... | |
142 | 153 |
} |
143 | 154 |
} |
144 | 155 |
|
156 |
private PackageInfo getPackageInfoAt(int rowIndex) { |
|
157 |
return installerInfos[rowIndex].getPackageInfo(); |
|
158 |
} |
|
159 |
|
|
145 | 160 |
public String getDescriptionAt(int rowIndex) { |
146 |
return installerInfos.get(rowIndex).getDescription();
|
|
161 |
return getPackageInfoAt(rowIndex).getDescription();
|
|
147 | 162 |
} |
148 | 163 |
|
149 | 164 |
public boolean isCellEditable(int rowIndex, int columnIndex) { |
150 |
if (columnIndex == 0) { |
|
151 |
return true; |
|
152 |
} |
|
153 |
return false; |
|
165 |
return (columnIndex == 0) && installerInfos[rowIndex].isInstallable(); |
|
154 | 166 |
} |
155 | 167 |
|
156 |
public void removeTableModelListener(TableModelListener l) { |
|
157 |
// TODO Auto-generated method stub |
|
158 |
|
|
159 |
} |
|
160 |
|
|
161 | 168 |
public void setValueAt(Object aValue, int rowIndex, int columnIndex) { |
162 |
selected.remove(rowIndex); |
|
163 |
selected.add(rowIndex, (Boolean) aValue); |
Also available in: Unified diff