librejack

Blackjack clone written in java
git clone https://github.com/michaelneuper/librejack.git
README | Files | Log | Refs | LICENSE

commit cb1a1613669424224e1d4fcaf2e4cc361c6f5b49
parent a4d03f10f628787b26471c0efeaca97231515976
Author: Michael Neuper <michael@michaelneuper.com>
Date:   Fri, 12 May 2023 17:09:25 +0200

Remove old StatisticsGUI

Diffstat:
Dsrc/view/StatisticsGUI.form | 139-------------------------------------------------------------------------------
Dsrc/view/StatisticsGUI.java | 167-------------------------------------------------------------------------------
2 files changed, 0 insertions(+), 306 deletions(-)

diff --git a/src/view/StatisticsGUI.form b/src/view/StatisticsGUI.form @@ -1,139 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> - -<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> - <Properties> - <Property name="defaultCloseOperation" type="int" value="2"/> - </Properties> - <SyntheticProperties> - <SyntheticProperty name="formSizePolicy" type="int" value="1"/> - <SyntheticProperty name="generateCenter" type="boolean" value="false"/> - </SyntheticProperties> - <AuxValues> - <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> - <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> - <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> - <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> - <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> - <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> - <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> - <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> - <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> - </AuxValues> - - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="jLabelLosses" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="jLabelLossesAmount" min="-2" pref="217" max="-2" attributes="0"/> - </Group> - <Component id="jLabelStatistics" min="-2" pref="342" max="-2" attributes="0"/> - <Group type="102" alignment="0" attributes="0"> - <Component id="jLabelWins" min="-2" pref="84" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="jLabelWinsAmount" min="-2" pref="217" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="jLabelPushes" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="jLabelPushesAmount" min="-2" pref="217" max="-2" attributes="0"/> - </Group> - </Group> - <EmptySpace pref="543" max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="27" max="-2" attributes="0"/> - <Component id="jLabelStatistics" min="-2" pref="44" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="101" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jLabelWins" alignment="3" min="-2" pref="26" max="-2" attributes="0"/> - <Component id="jLabelWinsAmount" alignment="3" min="-2" pref="43" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jLabelLosses" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jLabelLossesAmount" alignment="3" min="-2" pref="43" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jLabelPushes" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jLabelPushesAmount" alignment="3" min="-2" pref="43" max="-2" attributes="0"/> - </Group> - <EmptySpace pref="305" max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> - <SubComponents> - <Component class="javax.swing.JLabel" name="jLabelStatistics"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Dialog" size="48" style="1"/> - </Property> - <Property name="text" type="java.lang.String" value="Statistics"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabelWins"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Dialog" size="24" style="1"/> - </Property> - <Property name="text" type="java.lang.String" value="Wins:"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabelWinsAmount"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Dialog" size="18" style="1"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> - <Connection code="&quot;&quot; + stats.getWins()" type="code"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabelPushes"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Dialog" size="24" style="1"/> - </Property> - <Property name="text" type="java.lang.String" value="Pushes:"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabelPushesAmount"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Dialog" size="18" style="1"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> - <Connection code="&quot;&quot; + stats.getPushes()" type="code"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabelLosses"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Dialog" size="24" style="1"/> - </Property> - <Property name="text" type="java.lang.String" value="Losses:"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabelLossesAmount"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Dialog" size="18" style="1"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> - <Connection code="&quot;&quot; + stats.getLosses()" type="code"/> - </Property> - </Properties> - </Component> - </SubComponents> -</Form> diff --git a/src/view/StatisticsGUI.java b/src/view/StatisticsGUI.java @@ -1,167 +0,0 @@ -package view; - -import com.opencsv.exceptions.CsvValidationException; -import java.io.IOException; -import java.util.logging.Level; -import java.util.logging.Logger; -import model.Statistics; - -/** - * GUI that displays the player's wins, losses and pushes. - * - * @author Michael Neuper - * <a href="mailto:michael@michaelneuper.com">michael@michaelneuper.com</a> - */ -public class StatisticsGUI extends javax.swing.JFrame { - - Statistics stats; - - /** - * Creates new form StatisticsGUI - * - * @throws java.io.IOException is there is a problem with the file reading - * process - */ - public StatisticsGUI() throws IOException { - this.stats = Statistics.load(); - initComponents(); - } - - /** - * 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() { - - jLabelStatistics = new javax.swing.JLabel(); - jLabelWins = new javax.swing.JLabel(); - jLabelWinsAmount = new javax.swing.JLabel(); - jLabelPushes = new javax.swing.JLabel(); - jLabelPushesAmount = new javax.swing.JLabel(); - jLabelLosses = new javax.swing.JLabel(); - jLabelLossesAmount = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); - - jLabelStatistics.setFont(new java.awt.Font("Dialog", 1, 48)); // NOI18N - jLabelStatistics.setText("Statistics"); - - jLabelWins.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N - jLabelWins.setText("Wins:"); - - jLabelWinsAmount.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N - jLabelWinsAmount.setText("" + stats.getWins()); - - jLabelPushes.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N - jLabelPushes.setText("Pushes:"); - - jLabelPushesAmount.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N - jLabelPushesAmount.setText("" + stats.getPushes()); - - jLabelLosses.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N - jLabelLosses.setText("Losses:"); - - jLabelLossesAmount.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N - jLabelLossesAmount.setText("" + stats.getLosses()); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(36, 36, 36) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabelLosses) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jLabelLossesAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(jLabelStatistics, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabelWins, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabelWinsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabelPushes) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jLabelPushesAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap(543, Short.MAX_VALUE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(27, 27, 27) - .addComponent(jLabelStatistics, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(101, 101, 101) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabelWins, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabelWinsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(40, 40, 40) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabelLosses) - .addComponent(jLabelLossesAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(37, 37, 37) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabelPushes) - .addComponent(jLabelPushesAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(305, Short.MAX_VALUE)) - ); - - pack(); - }// </editor-fold>//GEN-END:initComponents - - /** - * @param args the command line arguments - * @throws com.opencsv.exceptions.CsvValidationException if there is an - * error reading from the csv file - */ - public static void main(String args[]) throws CsvValidationException { - /* Set the Nimbus look and feel */ - //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> - /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. - * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html - */ - try { - for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { - if ("Nimbus".equals(info.getName())) { - javax.swing.UIManager.setLookAndFeel(info.getClassName()); - break; - } - } - } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(StatisticsGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(StatisticsGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(StatisticsGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(StatisticsGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - } - //</editor-fold> - - - /* Create and display the form */ - java.awt.EventQueue.invokeLater(new Runnable() { - @Override - public void run() { - try { - new StatisticsGUI().setVisible(true); - } catch (IOException ex) { - Logger.getLogger(StatisticsGUI.class.getName()).log(Level.SEVERE, null, ex); - } - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JLabel jLabelLosses; - private javax.swing.JLabel jLabelLossesAmount; - private javax.swing.JLabel jLabelPushes; - private javax.swing.JLabel jLabelPushesAmount; - private javax.swing.JLabel jLabelStatistics; - private javax.swing.JLabel jLabelWins; - private javax.swing.JLabel jLabelWinsAmount; - // End of variables declaration//GEN-END:variables -}