Coverage Report - com.liquidatom.derbyscore.ui.AboutDialog
 
Classes in this File Line Coverage Branch Coverage Complexity
AboutDialog
0%
0/61
0%
0/2
1.5
AboutDialog$1
0%
0/3
N/A
1.5
 
 1  
 package com.liquidatom.derbyscore.ui;
 2  
 
 3  
 import java.io.IOException;
 4  
 import javax.imageio.ImageIO;
 5  
 import org.slf4j.Logger;
 6  
 import org.slf4j.LoggerFactory;
 7  
 
 8  
 /**
 9  
  * @author Russell Francis (russ@metro-six.com)
 10  
  */
 11  0
 public class AboutDialog extends javax.swing.JFrame {
 12  
 
 13  0
     static private final Logger log = LoggerFactory.getLogger(AboutDialog.class);
 14  
     
 15  0
     public AboutDialog() {
 16  0
         initComponents();
 17  0
         setLocationRelativeTo(null);
 18  
         try {
 19  0
             setIconImage(ImageIO.read(getClass().getResource("/gfx/brrg.png")));
 20  
         }
 21  0
         catch (IOException e) {
 22  0
             if (log.isErrorEnabled()) {
 23  0
                 log.error("Unable to set JFrame icon: " + e.getMessage(), e);
 24  
             }
 25  0
         }
 26  0
     }
 27  
 
 28  
     /** This method is called from within the constructor to
 29  
      * initialize the form.
 30  
      * WARNING: Do NOT modify this code. The content of this method is
 31  
      * always regenerated by the Form Editor.
 32  
      */
 33  
     @SuppressWarnings("unchecked")
 34  
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
 35  
     private void initComponents() {
 36  
 
 37  0
         controlPanel = new javax.swing.JPanel();
 38  0
         okButton = new javax.swing.JButton();
 39  0
         contentPanel = new javax.swing.JPanel();
 40  0
         tabbedContentPane = new javax.swing.JTabbedPane();
 41  0
         aboutScrollPane = new javax.swing.JScrollPane();
 42  0
         aboutTextArea = new javax.swing.JTextPane();
 43  0
         licenseScrollPane = new javax.swing.JScrollPane();
 44  0
         licenseTextArea = new javax.swing.JTextArea();
 45  0
         usageScrollPane = new javax.swing.JScrollPane();
 46  0
         usageTextArea = new javax.swing.JTextPane();
 47  
 
 48  0
         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
 49  
 
 50  0
         controlPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
 51  
 
 52  0
         okButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gfx/ledgreen.png"))); // NOI18N
 53  0
         okButton.setToolTipText("That is nice!");
 54  0
         okButton.setLabel("Ok");
 55  0
         okButton.addActionListener(new java.awt.event.ActionListener() {
 56  
             public void actionPerformed(java.awt.event.ActionEvent evt) {
 57  0
                 okButtonActionPerformed(evt);
 58  0
             }
 59  
         });
 60  0
         controlPanel.add(okButton);
 61  
 
 62  0
         getContentPane().add(controlPanel, java.awt.BorderLayout.SOUTH);
 63  
 
 64  0
         aboutTextArea.setEditable(false);
 65  0
         aboutTextArea.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
 66  0
         aboutTextArea.setText("DerbyScore by Russell Francis (russell.francis@gmail.com)\n\nDerby Score is a small application which can be used as a scoreboard for Roller Derby bouts. \nThough there are existing applications which aim to do similar things some commercial and \nothers free, we felt that there was room for improvement. One of the areas which we \nwanted to focus on was the visual appeal of the scoreboard making something which was \nflexible enough and pretty enough to satisfy our league, sponsers and fans.\n\nIf you have suggestions or would like to contribute to our effort to build a fantastic \nscoreboard utility for roller derby leagues throughout the world, please feel free to contact \nme.\n\nThanks,\n                               Russell Francis \n                               em: russ@metro-six.com\n                               em: russell.francis@gmail.com");
 67  0
         aboutScrollPane.setViewportView(aboutTextArea);
 68  
 
 69  0
         tabbedContentPane.addTab("About", aboutScrollPane);
 70  
 
 71  0
         licenseScrollPane.setViewportBorder(javax.swing.BorderFactory.createTitledBorder("Simplified BSD License"));
 72  
 
 73  0
         licenseTextArea.setColumns(20);
 74  0
         licenseTextArea.setEditable(false);
 75  0
         licenseTextArea.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
 76  0
         licenseTextArea.setRows(5);
 77  0
         licenseTextArea.setText("Copyright 2009-2010 METRO SIX, INC. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are\npermitted provided that the following conditions are met:\n\n   1. Redistributions of source code must retain the above copyright notice, this list of\n      conditions and the following disclaimer.\n\n   2. Redistributions in binary form must reproduce the above copyright notice, this list\n      of conditions and the following disclaimer in the documentation and/or other materials\n      provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY METRO SIX, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED\nWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METRO SIX, INC. OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\nADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nThe views and conclusions contained in the software and documentation are those of the\nauthors and should not be interpreted as representing official policies, either expressed\nor implied, of METRO SIX, INC.\n");
 78  0
         licenseScrollPane.setViewportView(licenseTextArea);
 79  
 
 80  0
         tabbedContentPane.addTab("License", licenseScrollPane);
 81  0
         licenseTextArea.setSelectionStart(0);  licenseTextArea.setSelectionEnd(0);
 82  
 
 83  0
         usageTextArea.setText("=================  COMMON KEYS =================\n\nCTRL + Up:       Add a point to the the jam tracker for the left team.\nCTRL + Down:  Remove a point from the jam tracker for the left team.\nCTRL + L:         Toggle lead jammer status on the left team.\n\nALT + Up:        Add a point to the the jam tracker for the left team.\nALT + Down:   Remove a point from the jam tracker for the left team.\nALT + L:          Toggle lead jammer status on the left team.\n\n=================  TOOLBAR KEYS =================\n\n[F1] - Start Jam:\n\nThis begins a 2:00 minute jam putting two minutes on the clock and beginning the count down.  This should be done when the starting whistle for the jam is heard.\n\n      - Linup:\n\nThis button will put :30 on the clock and begin counting down, this can be used when waiting for the initial whistle.\n\n[F2] - End Jam:\n\nThis will end the jam, putting :30 on the clock and beginning the countdown until the next jam should begin.\n\n      - Timeout\n\nThis will begin a 1:00 team initiated timeout, when this is executed, you must also manually adjust the timeouts left for a given team depending on who initiated the timeout.\n\n      - Official Timeout\n\nThis will freeze the scoreboard and should be used during an official  timeout.  There are also certain properties which can only be adjusted during an  official timeout such as the time left on the clock or the team logos.\n\n      - Show / Hide Scoreboard\n\nThis button will show / hide the stylized scoreboard respectively.  The stylized scoreboard can be dragged to a separate display which is projected to the audience of the match.\n\n      - Maximize / Restore\n\nThis button will maximize and restore the dimensions of the stylized scoreboard.\n");
 84  0
         usageScrollPane.setViewportView(usageTextArea);
 85  
 
 86  0
         tabbedContentPane.addTab("Usage & Controls", usageScrollPane);
 87  
 
 88  0
         javax.swing.GroupLayout contentPanelLayout = new javax.swing.GroupLayout(contentPanel);
 89  0
         contentPanel.setLayout(contentPanelLayout);
 90  0
         contentPanelLayout.setHorizontalGroup(
 91  
             contentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 92  
             .addComponent(tabbedContentPane, javax.swing.GroupLayout.DEFAULT_SIZE, 697, Short.MAX_VALUE)
 93  
         );
 94  0
         contentPanelLayout.setVerticalGroup(
 95  
             contentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 96  
             .addComponent(tabbedContentPane, javax.swing.GroupLayout.DEFAULT_SIZE, 368, Short.MAX_VALUE)
 97  
         );
 98  
 
 99  0
         aboutTextArea.setSelectionStart(0);
 100  0
         aboutTextArea.setSelectionEnd(0);
 101  0
         licenseTextArea.setSelectionStart(0);  
 102  0
         licenseTextArea.setSelectionEnd(0);
 103  0
         usageTextArea.setSelectionStart(0);
 104  0
         usageTextArea.setSelectionEnd(0);
 105  
 
 106  0
         getContentPane().add(contentPanel, java.awt.BorderLayout.CENTER);
 107  
 
 108  0
         pack();
 109  0
     }// </editor-fold>//GEN-END:initComponents
 110  
 
 111  
     private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
 112  0
         dispose();
 113  0
     }//GEN-LAST:event_okButtonActionPerformed
 114  
 
 115  
     // Variables declaration - do not modify//GEN-BEGIN:variables
 116  
     private javax.swing.JScrollPane aboutScrollPane;
 117  
     private javax.swing.JTextPane aboutTextArea;
 118  
     private javax.swing.JPanel contentPanel;
 119  
     private javax.swing.JPanel controlPanel;
 120  
     private javax.swing.JScrollPane licenseScrollPane;
 121  
     private javax.swing.JTextArea licenseTextArea;
 122  
     private javax.swing.JButton okButton;
 123  
     private javax.swing.JTabbedPane tabbedContentPane;
 124  
     private javax.swing.JScrollPane usageScrollPane;
 125  
     private javax.swing.JTextPane usageTextArea;
 126  
     // End of variables declaration//GEN-END:variables
 127  
 
 128  
 }