Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do Not Merge] - [WIP] OpenJDK 11 Upgrades #221

Draft
wants to merge 147 commits into
base: jdk11
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
8f85515
Update README.md
GalaxyCr8r Dec 2, 2020
9b11e34
Merge pull request #218 from Galaxy613/patch-1
WEKarnesky Dec 2, 2020
31df52c
Added Ignores for paths/files added by VSCode
rjhancock Dec 10, 2020
b264c88
Type restrict Vectors
rjhancock Dec 10, 2020
67cd60b
Added serialVersionUID
rjhancock Dec 10, 2020
673740a
Deprication removals
rjhancock Dec 10, 2020
05dd185
Java Warnings related to arrasy and unchecked types
rjhancock Dec 13, 2020
d100444
Strict Type declarations.
rjhancock Dec 14, 2020
3de32a4
Commented out code not used
rjhancock Dec 14, 2020
b3622a6
Strict type control
rjhancock Dec 14, 2020
591539c
Type enforcement for Templates
rjhancock Dec 14, 2020
6ecb187
Commented out code that doesn't appear to be used.
rjhancock Dec 14, 2020
5d444f6
Static template adjustments
rjhancock Dec 14, 2020
8c7230d
Static type declaration for templates
rjhancock Dec 14, 2020
7b71636
Static Assignment of Types for Templates
rjhancock Dec 14, 2020
ada6e6d
Serial Version UID added to class
rjhancock Dec 14, 2020
d4bf9c8
serial Version UID Added
rjhancock Dec 14, 2020
34b4a3d
Serial Version UID and Removed warning supression
rjhancock Dec 14, 2020
d11473b
Serial Version UID Added
rjhancock Dec 14, 2020
91fa1d8
Commented out code not being used
rjhancock Dec 14, 2020
9efb541
Updated gitignore for VS Code settings
rjhancock Dec 14, 2020
7027945
Commented out unused variable
rjhancock Dec 14, 2020
d3b0ff3
Added Serial Version UID
rjhancock Dec 14, 2020
05375a8
Removed warning supression and added Serial Version UID
rjhancock Dec 14, 2020
349c07f
Added serial version UID
rjhancock Dec 14, 2020
8dd7d55
Added Serial Version UID
rjhancock Dec 14, 2020
9410b4a
SAW/GUI/dlgOpen - Type enforcement of combo boxes.
rjhancock Dec 14, 2020
add9ef2
SAW/GUI - dlgPlaceableInfo
rjhancock Dec 14, 2020
ce252bd
SAW/GUI - dlgSummaryInfo
rjhancock Dec 14, 2020
29566dd
SAW/GUI - dlgTechBaseChooser
rjhancock Dec 14, 2020
ebc9b44
SAW/GUI - dlgTextExport
rjhancock Dec 14, 2020
2edfa04
SAW/GUI - dlgVariableSize
rjhancock Dec 14, 2020
7d66da9
SAW/GUI - dlgWeaponInfo
rjhancock Dec 14, 2020
08621f7
SAW/GUI - EquipmentListRenderer
rjhancock Dec 14, 2020
9b1aa44
SAW/GUI - EquipmentSelectedRenderer
rjhancock Dec 14, 2020
56a92ae
SAW/GUI - ifVeeForm
rjhancock Dec 14, 2020
db8a1f0
SAW/GUI - EquimentListRenderer/EquipmentSelectedRenderer
rjhancock Dec 14, 2020
561bf18
SSW/Components - CCGMech
rjhancock Dec 14, 2020
352dda1
ssw/filehandlers - HMPReader
rjhancock Dec 14, 2020
4c76280
ssw/filehandlers - MTFReader
rjhancock Dec 14, 2020
6b19cd8
ssw/gui - DamageChart
rjhancock Dec 14, 2020
1ff6ac3
ssw/gui - dlgAboutBox
rjhancock Dec 14, 2020
6ae2a4e
ssw/gui - dlgAmmoLotSize
rjhancock Dec 14, 2020
48d36a9
ssw/gui - dlgArmorTonnage
rjhancock Dec 14, 2020
8b5d1de
save reference to mech quirk list
Algebro7 Dec 16, 2020
2ba43a7
move quirks assignment to a more logical location
Algebro7 Dec 17, 2020
f0a3e98
Merge pull request #223 from Solaris-Skunk-Werks/bugfix/save-quirks
WEKarnesky Dec 17, 2020
eba7395
Upstream Master Merge
rjhancock Dec 26, 2020
e8d8a13
Commented out variables and methods not used in Class.
rjhancock Dec 26, 2020
3e23673
sswlib/src/main/java/visitors - VHeatSinkSetProtoDouble
rjhancock Dec 26, 2020
6f482cf
sswlib/src/main/java/visitors - VGyroSetNone.java
rjhancock Dec 26, 2020
def2412
sswlib/src/main/java/visitors - VFCSArtemisVLoader
rjhancock Dec 27, 2020
5895f1b
sswlib/src/main/java/visitors - VFCSArtemisIVLoader
rjhancock Dec 27, 2020
c47a176
sswlib/src/main/java/visitors - VFCSApolloLoader
rjhancock Dec 27, 2020
befb4cd
sswlib/src/main/java/visitors - VArmorSetVStealth
rjhancock Dec 27, 2020
a51fdb4
sswlib/src/main/java/visitors - VArmorSetPatchworkLocation
rjhancock Dec 27, 2020
214f93b
sswlib/src/main/java/visitors - VArmorSetIR
rjhancock Dec 27, 2020
5855693
sswlib/src/main/java/visitors
rjhancock Dec 27, 2020
078fc9b
sswlib/src/main/java/visitors - VArmorSetBR
rjhancock Dec 27, 2020
d5d2709
sswlib/src/main/java/visitors - VArmorSetAB
rjhancock Dec 27, 2020
4f79d46
sswlib/src/main/java/utilities - CVCostBVBreakdown
rjhancock Dec 27, 2020
d8b8b45
sswlib/src/main/java/utilities - CostBVBreakdown
rjhancock Dec 27, 2020
3f7ed20
sswlib/src/main/java/states - stEngineNone
rjhancock Dec 27, 2020
5e91af9
sswlib/src/main/java/states - stChassisCVIS
rjhancock Dec 27, 2020
23aa8a9
sswlib/src/main/java/Print - TWVTOLPoints
rjhancock Dec 27, 2020
bbd0dc2
sswlib/src/main/java/Print - TWNavalPoints
rjhancock Dec 27, 2020
468faa6
sswlib/src/main/java/Print - TWAdvGroundPoints
rjhancock Dec 27, 2020
1b0d3f2
sswlib/src/main/java/print - ScenarioPrinter
rjhancock Dec 27, 2020
fe48a8b
sswlib/src/main/java/Print - QuickStrieCardPrinter
rjhancock Dec 27, 2020
3cfac45
sswlib/src/main/java/print - QSVerticalCardPrinter
rjhancock Dec 27, 2020
ca41857
sswlib/src/main/java/print - QSHorizontalCardPrinter
rjhancock Dec 27, 2020
216a0f5
reset quirks when clicking new mech button
Algebro7 Jan 4, 2021
2f0c5fc
fix indentation
Algebro7 Jan 4, 2021
bec23e4
set curlotsize when deserializing Ammunition
Algebro7 Jan 4, 2021
42a49ab
ssw/filehandlers/HMPReader.java
rjhancock Jan 29, 2021
d8df765
ssw/gui/dlgBatchHMP.java
rjhancock Jan 29, 2021
82cbd7b
ssw/gui - dlgBracketCharts.java
rjhancock Jan 29, 2021
9477df3
Mass Update - serialVersionUID Added
rjhancock Jan 29, 2021
67e4d8f
ssw/gui/dlgCCGMech.java
rjhancock Jan 29, 2021
3b70ef9
print/QSCardSheetPrinter.java
rjhancock Jan 29, 2021
e85cf9a
Mass Update - Removed SuprressWarnings
rjhancock Jan 29, 2021
034527c
Single Warning Issues Fixed
rjhancock Jan 29, 2021
b21f0ee
2 Warning Files
rjhancock Jan 29, 2021
6279757
3 Warning Fixes
rjhancock Jan 29, 2021
7fc9d11
Mass Update - Import not used
rjhancock Jan 29, 2021
a1b1acf
Print - PrintConsts.java
rjhancock Jan 29, 2021
89d67c3
Ensure files are closed
rjhancock Jan 29, 2021
e826b08
ssw/gui - dlgPrintBatchMechs.java
rjhancock Jan 29, 2021
3c42b6b
ssw/print - Printer.java
rjhancock Jan 29, 2021
9e16bbf
ssw/printpreview - Preview.java
rjhancock Jan 29, 2021
4f7670a
battleforce - BattleForce.java
rjhancock Jan 29, 2021
05995ee
battleforce - BattleForceData.java
rjhancock Jan 29, 2021
b19ad33
components - CVAmmunitionHandler
rjhancock Jan 29, 2021
b09a7ef
components - CVHeatSinkFactory
rjhancock Jan 29, 2021
522da80
components - CVJumpJetFactory.java
rjhancock Jan 29, 2021
7dabe95
components - EquipmentCollection
rjhancock Jan 29, 2021
c47db3e
components - HeatSinkFactory
rjhancock Jan 29, 2021
e162b81
components - ifCVLoadout
rjhancock Jan 29, 2021
6e917de
components - ifMechLoadout
rjhancock Jan 29, 2021
95f3f61
sswlib/src/main/java/Print - PrintVehicle.java
rjhancock Jan 29, 2021
ce50093
sswlib/src/main/java/Print - PrintMech
rjhancock Jan 29, 2021
77d8fd9
sswlib/src/main/java/Print/preview/PreviewDialog
rjhancock Jan 29, 2021
7489920
Merge pull request #228 from Solaris-Skunk-Werks/bugfix/ammo-lot-size
WEKarnesky Feb 21, 2021
65db9a5
Merge pull request #227 from Solaris-Skunk-Werks/bugfix/save-quirks
WEKarnesky Feb 21, 2021
5eddf0e
Merge branch 'develop' into jdk11
rjhancock Mar 6, 2021
bc345af
Handle Issues with Paths
gblouin Mar 6, 2021
5c6c7f9
Merge pull request #231 from Solaris-Skunk-Werks/imagefix
WEKarnesky Mar 6, 2021
0d7e865
Set BV of Capacitor for CL ER PPC
gblouin Mar 7, 2021
8e59e27
BV Updates
gblouin Mar 7, 2021
d272c5f
Use EncodeFluff for MUL
gblouin Mar 7, 2021
ce0f02d
Convert Double Quotes to Single
gblouin Mar 7, 2021
70510ba
Merge pull request #232 from Solaris-Skunk-Werks/CLERPPC_CapacitorBV
WEKarnesky Mar 7, 2021
20e905b
Merge pull request #233 from Solaris-Skunk-Werks/MUL_Export
WEKarnesky Mar 7, 2021
ff308e8
Instantiate each view once
gblouin Mar 9, 2021
4b9789d
Encode to UTF-8
gblouin Mar 9, 2021
1178244
Update Usages
gblouin Mar 9, 2021
cc66aa2
Missed file
gblouin Mar 9, 2021
028545a
VSCode Space Changes
gblouin Mar 12, 2021
cceeb05
Make the Prefs use Vee
gblouin Mar 12, 2021
39f36c6
GUI Corrections
gblouin Mar 12, 2021
b4e1dca
Handle Long Unit/Model Names
gblouin Mar 12, 2021
5323b45
Handle Mechwarrior Names Too
gblouin Mar 13, 2021
c86d0c2
Open Vehicle work
gblouin Mar 13, 2021
8e40ae2
Stop Enabling
gblouin Mar 13, 2021
6a097a4
Hitting New wasn't clearing Variant
gblouin Mar 13, 2021
d081f89
Merge pull request #237 from Solaris-Skunk-Werks/bfb_roster
WEKarnesky Mar 14, 2021
dc87fa3
Merge pull request #234 from Solaris-Skunk-Werks/selectunits
WEKarnesky Mar 14, 2021
041aad4
Merge pull request #236 from Solaris-Skunk-Werks/sawgui
WEKarnesky Mar 14, 2021
8adb109
Add button to convert to MTF
gblouin Mar 14, 2021
b35c318
Make the file count for Progress consistent
gblouin Mar 14, 2021
796db62
Changing Icon to Crown
gblouin Mar 14, 2021
c2cfbdc
Check Message for Empty
gblouin Mar 20, 2021
b3b7f3f
Take this Gradle!
gblouin Mar 20, 2021
6649a7b
Null check
gblouin Mar 20, 2021
bee7caf
Merge pull request #238 from Solaris-Skunk-Werks/convertdirectory_tomtf
WEKarnesky Mar 24, 2021
31d0e06
drafting release notes
Mar 27, 2021
294b371
Merge pull request #241 from Solaris-Skunk-Werks/release-changes
WEKarnesky Mar 28, 2021
fedc0e7
Merge branch 'release/v0.7.6'
WEKarnesky Apr 13, 2021
3411a30
Merge tag 'v0.7.6' into develop
WEKarnesky Apr 13, 2021
6d0dc21
forgot to commit Version number before release
WEKarnesky Apr 13, 2021
33f7e66
Merge branch 'develop'
WEKarnesky Apr 13, 2021
81cd56f
fix file loading issue
zophar Jun 6, 2021
862166a
Merge pull request #244 from zophar/fix_linux_protocol_error
WEKarnesky Jun 6, 2021
8ffc28d
Changed Clan SRM-2 Improved Oneshot weight to 0.25tons
WEKarnesky Jun 7, 2021
6f11baf
Merge branch 'hotfix/clanSRM2Weight'
WEKarnesky Jun 7, 2021
6781137
Merge remote-tracking branch 'upstream'
rjhancock Jan 14, 2022
809238d
Latest updates.
rjhancock Jan 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@ gradle-app.setting
*/Data/
# End of https://www.gitignore.io/api/gradle,intellij
Logs/

.settings/
bin/
.classpath
.project
8 changes: 4 additions & 4 deletions BFB/src/main/java/BFB/GUI/ForcePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
import javax.swing.event.TableModelListener;

public class ForcePanel extends javax.swing.JPanel {
private static final long serialVersionUID = 9012868947346629504L;
Algebro7 marked this conversation as resolved.
Show resolved Hide resolved

private Force force;
private abTable currentModel = new tbTotalWarfare();
Expand Down Expand Up @@ -79,7 +80,6 @@ private void OverrideSkills() {
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

Expand All @@ -93,7 +93,7 @@ private void initComponents() {
jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
txtForceName = new javax.swing.JTextField();
cmbForceType = new javax.swing.JComboBox();
cmbForceType = new javax.swing.JComboBox<String>();
Copy link
Contributor

@Algebro7 Algebro7 Dec 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I found a way to fix these in the form designer, which will allow the updates to persist when editing any dialogs in Netbeans. For example, open BFB/GUI/ForcePanel.java in Netbeans, right click the cmbForceType component, go to Code, and then type <String> in the "Type Parameters" box and then save the form:

typeproperties

Can you do these for any changes that take place in autogenerated code sections, instead of modifying the Java directly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to revert or undo the previous changes, because once you open and save the forms in Netbeans the changes in the autogenerated code sections will be erased anyway

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not using NetBeans. Using VS Code. Although that is good to know for future forms y'all mess with. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately Netbeans is required for any changes to GUI code :( I wish there was a way to make it totally IDE-agnostic but it would be too hard for us not to have a form designer.

I only use Netbeans for that purpose, any IDE will work for logic changes that don't happen inside of autogenerated GUI code

jLabel2 = new javax.swing.JLabel();
txtOverrideGunnery = new javax.swing.JTextField();
txtOverridePiloting = new javax.swing.JTextField();
Expand Down Expand Up @@ -175,7 +175,7 @@ public void keyReleased(java.awt.event.KeyEvent evt) {

jLabel1.setText("Unit Name:");

cmbForceType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Inner Sphere", "Clan", "Comstar/WoB" }));
cmbForceType.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "Inner Sphere", "Clan", "Comstar/WoB" }));

jLabel2.setText("Type:");

Expand Down Expand Up @@ -401,7 +401,7 @@ public void tableChanged(TableModelEvent e) {
private javax.swing.JButton btnRandom;
private javax.swing.JButton btnSaveForce;
private javax.swing.JButton btnTransfer;
private javax.swing.JComboBox cmbForceType;
private javax.swing.JComboBox<String> cmbForceType;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel6;
Expand Down
3 changes: 1 addition & 2 deletions BFB/src/main/java/BFB/GUI/dlgAbout.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* @author gblouin
*/
public class dlgAbout extends javax.swing.JDialog {
private static final long serialVersionUID = 2091416214909819417L;

/** Creates new form dlgAbout */
public dlgAbout() {
Expand All @@ -43,7 +44,6 @@ public dlgAbout() {
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

Expand Down Expand Up @@ -114,5 +114,4 @@ private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextPane txtAbout;
// End of variables declaration//GEN-END:variables

}
26 changes: 13 additions & 13 deletions BFB/src/main/java/BFB/GUI/dlgAdvancedSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @author gblouin
*/
public class dlgAdvancedSearch extends javax.swing.JDialog {
private static final long serialVersionUID = -1887334518951060000L;

/** Creates new form dlgAdvancedSearch */
public dlgAdvancedSearch(java.awt.Frame parent, boolean modal) {
Expand All @@ -28,7 +29,6 @@ public dlgAdvancedSearch(java.awt.Frame parent, boolean modal) {
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

Expand All @@ -44,14 +44,14 @@ private void initComponents() {
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
cmbClass = new javax.swing.JComboBox();
cmbClass = new javax.swing.JComboBox<String>();
jLabel16 = new javax.swing.JLabel();
cmbMechType = new javax.swing.JComboBox();
cmbMechType = new javax.swing.JComboBox<String>();
jLabel15 = new javax.swing.JLabel();
cmbMotive = new javax.swing.JComboBox();
cmbMotive = new javax.swing.JComboBox<String>();
jLabel14 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
cmbRulesLevel = new javax.swing.JComboBox();
cmbRulesLevel = new javax.swing.JComboBox<String>();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

Expand Down Expand Up @@ -144,7 +144,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Options"));

cmbClass.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All", "Light", "Medium", "Heavy", "Assault" }));
cmbClass.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "All", "Light", "Medium", "Heavy", "Assault" }));
cmbClass.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmbClassActionPerformed(evt);
Expand All @@ -153,7 +153,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

jLabel16.setText("Mech Type:");

cmbMechType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "BattleMech", "IndustrialMech", "Primitive BattleMech", "Primitive IndustrialMech" }));
cmbMechType.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "BattleMech", "IndustrialMech", "Primitive BattleMech", "Primitive IndustrialMech" }));
cmbMechType.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmbMechTypeActionPerformed(evt);
Expand All @@ -162,7 +162,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

jLabel15.setText("Motive Type:");

cmbMotive.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Biped", "Quad" }));
cmbMotive.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "Biped", "Quad" }));
cmbMotive.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmbMotiveActionPerformed(evt);
Expand All @@ -173,7 +173,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

jLabel20.setText("Rules Level:");

cmbRulesLevel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Introductory", "Tournament Legal", "Advanced Rules", "Experimental Tech", "Era Specific" }));
cmbRulesLevel.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "Introductory", "Tournament Legal", "Advanced Rules", "Experimental Tech", "Era Specific" }));
cmbRulesLevel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmbRulesLevelActionPerformed(evt);
Expand Down Expand Up @@ -364,10 +364,10 @@ public void windowClosing(java.awt.event.WindowEvent e) {
}

// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JComboBox cmbClass;
private javax.swing.JComboBox cmbMechType;
private javax.swing.JComboBox cmbMotive;
private javax.swing.JComboBox cmbRulesLevel;
private javax.swing.JComboBox<String> cmbClass;
private javax.swing.JComboBox<String> cmbMechType;
private javax.swing.JComboBox<String> cmbMotive;
private javax.swing.JComboBox<String> cmbRulesLevel;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel14;
Expand Down
27 changes: 14 additions & 13 deletions BFB/src/main/java/BFB/GUI/dlgBalance.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
import Force.Skills;

public class dlgBalance extends javax.swing.JDialog {
private static final long serialVersionUID = -3950107051873075862L;

public int Result = -1;
public Skills skills = new Skills();
public boolean overwrite = false;

private Force force;
// private Force force;

public static final int SK_CANCEL = -1,
SK_BESTSKILLS = 0,
Expand All @@ -46,15 +48,14 @@ public dlgBalance(java.awt.Frame parent, boolean modal, Force force) {
super(parent, modal);
initComponents();

this.force = force;
// this.force = force;
}

/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

Expand All @@ -71,11 +72,11 @@ private void initComponents() {
rdoNeither = new javax.swing.JRadioButton();
jPanel7 = new javax.swing.JPanel();
jLabel12 = new javax.swing.JLabel();
cmbSkillLevel = new javax.swing.JComboBox();
cmbSkillLevel = new javax.swing.JComboBox<String>();
btnRandomGen = new javax.swing.JButton();
jPanel9 = new javax.swing.JPanel();
jLabel14 = new javax.swing.JLabel();
cmbNameFilter = new javax.swing.JComboBox();
cmbNameFilter = new javax.swing.JComboBox<String>();
btnRandomName = new javax.swing.JButton();
chkOverwriteName = new javax.swing.JCheckBox();

Expand Down Expand Up @@ -159,7 +160,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

jLabel12.setText("Skill Level:");

cmbSkillLevel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Random", "Green", "Regular", "Veteran", "Elite" }));
cmbSkillLevel.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "Random", "Green", "Regular", "Veteran", "Elite" }));

btnRandomGen.setText("Generate");
btnRandomGen.addActionListener(new java.awt.event.ActionListener() {
Expand Down Expand Up @@ -198,7 +199,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

jLabel14.setText("Filter By:");

cmbNameFilter.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Random" }));
cmbNameFilter.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "Random" }));

btnRandomName.setText("Generate");
btnRandomName.addActionListener(new java.awt.event.ActionListener() {
Expand Down Expand Up @@ -291,21 +292,21 @@ private void btnRandomNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN
private javax.swing.JButton btnFilter;
private javax.swing.ButtonGroup btnGrpMinimize;
private javax.swing.JButton btnRandomGen;
private javax.swing.JButton btnRandomGen1;
// private javax.swing.JButton btnRandomGen1;
private javax.swing.JButton btnRandomName;
private javax.swing.JCheckBox chkOverwriteName;
private javax.swing.JComboBox cmbNameFilter;
private javax.swing.JComboBox cmbSkillLevel;
private javax.swing.JComboBox cmbSkillLevel1;
private javax.swing.JComboBox<String> cmbNameFilter;
private javax.swing.JComboBox<String> cmbSkillLevel;
// private javax.swing.JComboBox<String> cmbSkillLevel1;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
// private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel7;
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
// private javax.swing.JPanel jPanel8;
private javax.swing.JPanel jPanel9;
private javax.swing.JRadioButton rdoGunnery;
private javax.swing.JRadioButton rdoNeither;
Expand Down
8 changes: 4 additions & 4 deletions BFB/src/main/java/BFB/GUI/dlgGenericUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import Force.Unit;

public class dlgGenericUnit extends javax.swing.JDialog {
private static final long serialVersionUID = -4119661501553704680L;

Force force;

Expand All @@ -20,14 +21,13 @@ public dlgGenericUnit(java.awt.Frame parent, boolean modal, Force force) {
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jLabel1 = new javax.swing.JLabel();
txtName = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
cmbType = new javax.swing.JComboBox();
cmbType = new javax.swing.JComboBox<String>();
jLabel3 = new javax.swing.JLabel();
txtBaseBV = new javax.swing.JTextField();
txtModel = new javax.swing.JTextField();
Expand All @@ -47,7 +47,7 @@ private void initComponents() {

jLabel2.setText("Unit Type:");

cmbType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "BattleMech", "IndustrialMech", "ProtoMech", "Vehicle", "Infantry", "Battle Armor", "Conventional Fighter", "Aerospace Fighter", "Small Craft", "Dropship", "Support Vehicle", "Mobile Structure" }));
cmbType.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "BattleMech", "IndustrialMech", "ProtoMech", "Vehicle", "Infantry", "Battle Armor", "Conventional Fighter", "Aerospace Fighter", "Small Craft", "Dropship", "Support Vehicle", "Mobile Structure" }));

jLabel3.setText("Base BV:");

Expand Down Expand Up @@ -181,7 +181,7 @@ private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
private javax.swing.JButton btnClear;
private javax.swing.JButton btnClose;
private javax.swing.JButton btnSave;
private javax.swing.JComboBox cmbType;
private javax.swing.JComboBox<String> cmbType;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
Expand Down
35 changes: 20 additions & 15 deletions BFB/src/main/java/BFB/GUI/dlgGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import javax.swing.DefaultListModel;

public class dlgGroup extends javax.swing.JDialog {
private static final long serialVersionUID = -6264074581148435903L;

private Scenario scenario;
private Media media = new Media();
private Group curGroup;
Expand All @@ -31,20 +33,19 @@ public dlgGroup(java.awt.Frame parent, boolean modal, Scenario scenario) {
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

btnGrpType = new javax.swing.ButtonGroup();
jPanel2 = new javax.swing.JPanel();
btnCancel = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
lstGroups = new javax.swing.JList();
lstGroups = new javax.swing.JList<Group>();
jLabel1 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
lblGroupLogo = new javax.swing.JLabel();
jScrollPane2 = new javax.swing.JScrollPane();
lstUnits = new javax.swing.JList();
lstUnits = new javax.swing.JList<Unit>();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
Expand Down Expand Up @@ -80,10 +81,12 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(btnCancel)
);

lstGroups.setModel(new javax.swing.AbstractListModel() {
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
lstGroups.setModel(new javax.swing.AbstractListModel<Group>() {
private static final long serialVersionUID = 1L;

Group[] groups = { };
public int getSize() { return groups.length; }
public Group getElementAt(int i) { return groups[i]; }
});
lstGroups.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
Expand All @@ -102,10 +105,12 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
});

lstUnits.setBackground(new java.awt.Color(240, 240, 240));
lstUnits.setModel(new javax.swing.AbstractListModel() {
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
lstUnits.setModel(new javax.swing.AbstractListModel<Unit>() {
private static final long serialVersionUID = 2L;

Unit[] units = { };
public int getSize() { return units.length; }
public Unit getElementAt(int i) { return units[i]; }
});
jScrollPane2.setViewportView(lstUnits);

Expand Down Expand Up @@ -261,7 +266,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
}// </editor-fold>//GEN-END:initComponents

private void loadGroupList() {
DefaultListModel gModel = new DefaultListModel();
DefaultListModel<Group> gModel = new DefaultListModel<Group>();
for ( Force f : scenario.getForces() ) {
for ( Group g : f.Groups ) {
gModel.addElement(g);
Expand Down Expand Up @@ -292,7 +297,7 @@ else if ( curGroup.getType().equals(BattleForce.Clan) )
lblPV.setText(curGroup.getTotalPV()+"");
media.setLogo(lblGroupLogo, new File(curGroup.getLogo()));

DefaultListModel uModel = new DefaultListModel();
DefaultListModel<Unit> uModel = new DefaultListModel<Unit>();
for ( Unit u : curGroup.getUnits() ) {
uModel.addElement(u);
}
Expand Down Expand Up @@ -352,8 +357,8 @@ private void rdoComstarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI
private javax.swing.JLabel lblBV;
private javax.swing.JLabel lblGroupLogo;
private javax.swing.JLabel lblPV;
private javax.swing.JList lstGroups;
private javax.swing.JList lstUnits;
private javax.swing.JList<Group> lstGroups;
private javax.swing.JList<Unit> lstUnits;
private javax.swing.JRadioButton rdoClan;
private javax.swing.JRadioButton rdoComstar;
private javax.swing.JRadioButton rdoInnerSphere;
Expand Down
Loading