You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ge...@apache.org on 2019/02/28 12:52:11 UTC
[incubator-netbeans] branch master updated: [NETBEANS-2182] Display
correct licence (Oracle / Eclipse Foundation) depending on version of
GlassFish to download
This is an automated email from the ASF dual-hosted git repository.
geertjan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new ea64766 [NETBEANS-2182] Display correct licence (Oracle / Eclipse Foundation) depending on version of GlassFish to download
new ec8a320 Merge pull request #1148 from peedeeboy/NETBEANS-2182
ea64766 is described below
commit ea64766656ad9e4f5ec807d9b0bed3674aa02271
Author: Pete Whelpton <pe...@gmail.com>
AuthorDate: Wed Feb 27 20:02:39 2019 +0000
[NETBEANS-2182] Display correct licence (Oracle / Eclipse Foundation) depending on version of GlassFish to download
---
enterprise/glassfish.common/manifest.mf | 2 +-
.../modules/glassfish/common/ServerDetails.java | 50 +++++++++-----
.../wizards/AddServerLocationVisualPanel.form | 78 +++++++++++++++------
.../wizards/AddServerLocationVisualPanel.java | 79 +++++++++++++++-------
4 files changed, 147 insertions(+), 62 deletions(-)
diff --git a/enterprise/glassfish.common/manifest.mf b/enterprise/glassfish.common/manifest.mf
index 3472002..e15eb45 100644
--- a/enterprise/glassfish.common/manifest.mf
+++ b/enterprise/glassfish.common/manifest.mf
@@ -4,6 +4,6 @@ OpenIDE-Module: org.netbeans.modules.glassfish.common/0
OpenIDE-Module-Install: org/netbeans/modules/glassfish/common/Installer.class
OpenIDE-Module-Layer: org/netbeans/modules/glassfish/common/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/glassfish/common/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.76
+OpenIDE-Module-Specification-Version: 1.77
OpenIDE-Module-Provides: org.netbeans.modules.glassfish.common
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
index d2e1f1d..8698558 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java
@@ -57,7 +57,8 @@ public enum ServerDetails {
"deployer:gfv3ee6", // NOI18N
300,
"https://download.oracle.com/glassfish/v3/release/glassfish-v3.zip", // NOI18N
- "https://download.oracle.com/glassfish/v3/release/glassfish-v3.zip" // NOI18N
+ "https://download.oracle.com/glassfish/v3/release/glassfish-v3.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
* details for an instance of GlassFish Server 3.0/3.0.x
@@ -66,7 +67,8 @@ public enum ServerDetails {
"deployer:gfv3ee6", // NOI18N
301,
"https://download.oracle.com/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip", // NOI18N
- "https://download.oracle.com/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip" // NOI18N
+ "https://download.oracle.com/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
* details for an instance of GlassFish Server 3.1
@@ -75,7 +77,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
310,
"https://download.oracle.com/glassfish/3.1/release/glassfish-3.1-ml.zip", // NOI18N
- "https://download.oracle.com/glassfish/3.1/release/glassfish-3.1-ml.zip" // NOI18N
+ "https://download.oracle.com/glassfish/3.1/release/glassfish-3.1-ml.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
* details for an instance of GlassFish Server 3.1.1
@@ -84,8 +87,9 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
311,
"https://download.oracle.com/glassfish/3.1.1/release/glassfish-3.1.1-ml.zip", // NOI18N
- "https://download.oracle.com/glassfish/3.1.1/release/glassfish-3.1.1-ml.zip" // NOI18N
- ),
+ "https://download.oracle.com/glassfish/3.1.1/release/glassfish-3.1.1-ml.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
+ ),
/**
* details for an instance of GlassFish Server 3.1.2
*/
@@ -93,7 +97,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
312,
"https://download.oracle.com/glassfish/3.1.2/release/glassfish-3.1.2-ml.zip", // NOI18N
- "https://download.oracle.com/glassfish/3.1.2/release/glassfish-3.1.2-ml.zip" // NOI18N
+ "https://download.oracle.com/glassfish/3.1.2/release/glassfish-3.1.2-ml.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
@@ -103,7 +108,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
312,
"https://download.oracle.com/glassfish/3.1.2.2/release/glassfish-3.1.2.2-ml.zip", // NOI18N
- "https://download.oracle.com/glassfish/3.1.2.2/release/glassfish-3.1.2.2-ml.zip" // NOI18N
+ "https://download.oracle.com/glassfish/3.1.2.2/release/glassfish-3.1.2.2-ml.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
@@ -113,7 +119,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
400,
"https://download.oracle.com/glassfish/4.0/release/glassfish-4.0-ml.zip", // NOI18N
- "https://download.oracle.com/glassfish/4.0/release/glassfish-4.0-ml.zip" // NOI18N
+ "https://download.oracle.com/glassfish/4.0/release/glassfish-4.0-ml.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
@@ -123,7 +130,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
401,
"https://download.oracle.com/glassfish/4.0.1/release/glassfish-4.0.1-ml.zip", // NOI18N
- "https://download.oracle.com/glassfish/4.0.1/release/glassfish-4.0.1-ml.zip" // NOI18N
+ "https://download.oracle.com/glassfish/4.0.1/release/glassfish-4.0.1-ml.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N"
),
/**
@@ -133,7 +141,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
410,
"https://download.oracle.com/glassfish/4.1/release/glassfish-4.1.zip", // NOI18N
- "https://download.oracle.com/glassfish/4.1/release/glassfish-4.1.zip" // NOI18N
+ "https://download.oracle.com/glassfish/4.1/release/glassfish-4.1.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
@@ -143,7 +152,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
411,
"https://download.oracle.com/glassfish/4.1.1/release/glassfish-4.1.1.zip", // NOI18N
- "https://download.oracle.com/glassfish/4.1.1/release/glassfish-4.1.1.zip" // NOI18N
+ "https://download.oracle.com/glassfish/4.1.1/release/glassfish-4.1.1.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
@@ -153,7 +163,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
412,
"https://download.oracle.com/glassfish/4.1.2/release/glassfish-4.1.2.zip", // NOI18N
- "https://download.oracle.com/glassfish/4.1.2/release/glassfish-4.1.2.zip" // NOI18N
+ "https://download.oracle.com/glassfish/4.1.2/release/glassfish-4.1.2.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
@@ -163,7 +174,8 @@ public enum ServerDetails {
"deployer:gfv3ee6wc", // NOI18N
500,
"https://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip", // NOI18N
- "https://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip" // NOI18N
+ "https://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip", // NOI18N
+ "https://javaee.github.io/glassfish/LICENSE" //NOI18N
),
/**
@@ -171,9 +183,10 @@ public enum ServerDetails {
*/
GLASSFISH_SERVER_5_1(NbBundle.getMessage(ServerDetails.class, "STR_51_SERVER_NAME", new Object[]{}), // NOI18N
"deployer:gfv3ee6wc", // NOI18N
- 500,
+ 510,
"https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/5.1.0/glassfish-5.1.0.zip", // NOI18N
- "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/5.1.0/glassfish-5.1.0.zip" // NOI18N
+ "https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/5.1.0/glassfish-5.1.0.zip", // NOI18N
+ "http://www.eclipse.org/legal/epl-2.0" //NOI18N
);
/**
@@ -271,16 +284,18 @@ public enum ServerDetails {
private String uriFragment;
private String indirectUrl;
private String directUrl;
+ private String licenseUrl;
private int versionInt;
ServerDetails(String displayName, String uriFragment, int versionInt,
- String directUrl, String indirectUrl) {
+ String directUrl, String indirectUrl, String licenseUrl) {
this.displayName = displayName;
this.uriFragment = uriFragment;
this.indirectUrl = indirectUrl;
this.directUrl = directUrl;
this.versionInt = versionInt;
+ this.licenseUrl = licenseUrl;
}
@Override
@@ -331,4 +346,7 @@ public enum ServerDetails {
return indirectUrl;
}
+ public String getLicenseUrl() {
+ return licenseUrl;
+ }
}
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/AddServerLocationVisualPanel.form b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/AddServerLocationVisualPanel.form
index 35a6aeb..c13d715 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/AddServerLocationVisualPanel.form
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/AddServerLocationVisualPanel.form
@@ -46,28 +46,29 @@
<Group type="103" groupAlignment="0" attributes="0">
<Component id="downloadStatusLabel" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
- <Group type="103" groupAlignment="0" max="-2" attributes="0">
- <Component id="localDomainRadioButton" max="32767" attributes="0"/>
- <Component id="downloadButton" max="32767" attributes="0"/>
- </Group>
+ <Component id="localDomainRadioButton" min="-2" pref="121" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
+ <Component id="remoteDomainRadioButton" pref="253" max="32767" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="hk2HomeTextField" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" attributes="0">
- <Component id="agreeCheckBox" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
- <Component id="readlicenseButton" pref="0" max="32767" attributes="0"/>
- </Group>
- <Component id="remoteDomainRadioButton" pref="266" max="32767" attributes="0"/>
- </Group>
+ <Component id="browseButton" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
- <Component id="hk2HomeLabel" min="-2" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="hk2HomeLabel" min="-2" max="-2" attributes="0"/>
+ <Component id="chooseServerLabel" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="chooseServerComboBox" alignment="0" min="-2" pref="159" max="-2" attributes="0"/>
+ </Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
- <Component id="hk2HomeTextField" max="32767" attributes="0"/>
+ <Component id="downloadButton" min="-2" max="-2" attributes="0"/>
+ <EmptySpace type="separate" max="-2" attributes="0"/>
+ <Component id="agreeCheckBox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
- <Component id="browseButton" min="-2" max="-2" attributes="0"/>
+ <Component id="readlicenseButton" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
@@ -88,15 +89,26 @@
<Component id="localDomainRadioButton" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="remoteDomainRadioButton" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
+ <EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
+ <Component id="chooseServerLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
- <Group type="103" groupAlignment="2" attributes="0">
- <Component id="downloadButton" alignment="2" min="-2" max="-2" attributes="0"/>
- <Component id="readlicenseButton" alignment="2" min="-2" max="-2" attributes="0"/>
- <Component id="agreeCheckBox" alignment="2" min="-2" max="-2" attributes="0"/>
+ <Component id="chooseServerComboBox" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="agreeCheckBox" min="-2" max="-2" attributes="0"/>
+ <Component id="downloadButton" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace pref="6" max="32767" attributes="0"/>
+ <Component id="downloadStatusLabel" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" attributes="0">
+ <Component id="readlicenseButton" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ </Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
- <Component id="downloadStatusLabel" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -223,5 +235,29 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="remoteDomainRadioButtonActionPerformed"/>
</Events>
</Component>
+ <Component class="javax.swing.JLabel" name="chooseServerLabel">
+ <Properties>
+ <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
+ <ComponentRef name="hk2HomeTextField"/>
+ </Property>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/netbeans/modules/glassfish/common/wizards/Bundle.properties" key="LBL_ChooseOne" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ </Properties>
+ <AuxValues>
+ <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+ </Component>
+ <Component class="javax.swing.JComboBox" name="chooseServerComboBox">
+ <Properties>
+ <Property name="selectedItem" type="java.lang.Object" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
+ <Connection code="wizardIterator.downloadableValues[0]" type="code"/>
+ </Property>
+ </Properties>
+ <AuxValues>
+ <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox<ServerDetails>(wizardIterator.downloadableValues)"/>
+ <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<ServerDetails>"/>
+ </AuxValues>
+ </Component>
</SubComponents>
</Form>
diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/AddServerLocationVisualPanel.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/AddServerLocationVisualPanel.java
index 5174b30..90b266a 100644
--- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/AddServerLocationVisualPanel.java
+++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/AddServerLocationVisualPanel.java
@@ -19,6 +19,8 @@
package org.netbeans.modules.glassfish.common.wizards;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
import java.io.File;
import java.net.URL;
import java.util.List;
@@ -82,6 +84,14 @@ public class AddServerLocationVisualPanel extends javax.swing.JPanel implements
homeFolderChanged();
}
});
+ chooseServerComboBox.addItemListener(new ItemListener() {
+ @Override
+ public void itemStateChanged(ItemEvent e) {
+ if(e.getStateChange() == ItemEvent.SELECTED) {
+ serverVersionChanged();
+ }
+ }
+ });
setDownloadState(DownloadState.AVAILABLE);
updateMessageText("");
// Set initial radio buttons status to local server.
@@ -272,6 +282,11 @@ public class AddServerLocationVisualPanel extends javax.swing.JPanel implements
updateButton();
}
}
+
+ private void serverVersionChanged() {
+ agreeCheckBox.setSelected(false);
+ agreeCheckBoxActionPerformed(null);
+ }
private static class DirFilter extends javax.swing.filechooser.FileFilter {
DirFilter() {
@@ -311,6 +326,8 @@ public class AddServerLocationVisualPanel extends javax.swing.JPanel implements
downloadStatusLabel = new javax.swing.JLabel();
localDomainRadioButton = new javax.swing.JRadioButton();
remoteDomainRadioButton = new javax.swing.JRadioButton();
+ chooseServerLabel = new javax.swing.JLabel();
+ chooseServerComboBox = new javax.swing.JComboBox<ServerDetails>(wizardIterator.downloadableValues);
hk2HomeLabel.setLabelFor(hk2HomeTextField);
org.openide.awt.Mnemonics.setLocalizedText(hk2HomeLabel, org.openide.util.NbBundle.getMessage(AddServerLocationVisualPanel.class, "LBL_InstallLocation")); // NOI18N
@@ -368,6 +385,11 @@ public class AddServerLocationVisualPanel extends javax.swing.JPanel implements
}
});
+ chooseServerLabel.setLabelFor(hk2HomeTextField);
+ org.openide.awt.Mnemonics.setLocalizedText(chooseServerLabel, org.openide.util.NbBundle.getMessage(AddServerLocationVisualPanel.class, "LBL_ChooseOne")); // NOI18N
+
+ chooseServerComboBox.setSelectedItem(wizardIterator.downloadableValues[0]);
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -377,23 +399,25 @@ public class AddServerLocationVisualPanel extends javax.swing.JPanel implements
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(downloadStatusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
- .addComponent(localDomainRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(downloadButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addComponent(localDomainRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(17, 17, 17)
+ .addComponent(remoteDomainRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE))
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(hk2HomeTextField)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(agreeCheckBox)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(readlicenseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
- .addComponent(remoteDomainRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)))
+ .addComponent(browseButton))
.addGroup(layout.createSequentialGroup()
- .addComponent(hk2HomeLabel)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(hk2HomeLabel)
+ .addComponent(chooseServerLabel)
+ .addComponent(chooseServerComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
- .addComponent(hk2HomeTextField)
+ .addComponent(downloadButton)
+ .addGap(18, 18, 18)
+ .addComponent(agreeCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(browseButton)))
+ .addComponent(readlicenseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
@@ -408,14 +432,22 @@ public class AddServerLocationVisualPanel extends javax.swing.JPanel implements
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(localDomainRadioButton)
.addComponent(remoteDomainRadioButton))
+ .addGap(10, 10, 10)
+ .addComponent(chooseServerLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
- .addComponent(downloadButton)
- .addComponent(readlicenseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(agreeCheckBox))
+ .addComponent(chooseServerComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(downloadStatusLabel)
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(agreeCheckBox)
+ .addComponent(downloadButton))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 6, Short.MAX_VALUE)
+ .addComponent(downloadStatusLabel))
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(readlicenseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(0, 0, Short.MAX_VALUE)))
+ .addContainerGap())
);
hk2HomeTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(AddServerLocationVisualPanel.class, "AddServerLocationVisualPanel.hk2HomeTextField.AccessibleContext.accessibleDescription")); // NOI18N
@@ -426,8 +458,9 @@ public class AddServerLocationVisualPanel extends javax.swing.JPanel implements
private void readlicenseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_readlicenseButtonActionPerformed
try {
+ ServerDetails chosenServerVersion = (ServerDetails) chooseServerComboBox.getSelectedItem();
URLDisplayer.getDefault().showURL(
- new URL("https://javaee.github.io/glassfish/LICENSE")); //NOI18N
+ new URL(chosenServerVersion.getLicenseUrl())); //NOI18N
} catch (Exception ex){
Logger.getLogger("glassfish").log(Level.INFO, ex.getLocalizedMessage(), ex);
}
@@ -437,11 +470,7 @@ private void downloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GE
if(retriever == null) {
ServerDetails selectedValue = wizardIterator.downloadableValues[0];
if (wizardIterator.downloadableValues.length > 1) {
- selectedValue = (ServerDetails) JOptionPane.showInputDialog(null,
- NbBundle.getMessage(AddServerLocationVisualPanel.class, "LBL_ChooseOne"), // NOI18N
- NbBundle.getMessage(AddServerLocationVisualPanel.class, "LBL_SELECT_BITS"), // NOI18N
- JOptionPane.INFORMATION_MESSAGE, null,
- wizardIterator.downloadableValues, wizardIterator.downloadableValues[0]);
+ selectedValue = (ServerDetails) chooseServerComboBox.getSelectedItem();
}
if (null != selectedValue) {
updateStatusText(""); // NOI18N
@@ -488,6 +517,8 @@ private void agreeCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox agreeCheckBox;
private javax.swing.JButton browseButton;
+ private javax.swing.JComboBox<ServerDetails> chooseServerComboBox;
+ private javax.swing.JLabel chooseServerLabel;
private javax.swing.ButtonGroup domainType;
private javax.swing.JButton downloadButton;
private javax.swing.JLabel downloadStatusLabel;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists