001package jmri.jmrit.ctc.editor.gui; 002 003import jmri.jmrit.ctc.editor.code.AwtWindowProperties; 004import jmri.jmrit.ctc.ctcserialdata.OtherData; 005 006/** 007 * 008 * @author Gregory J. Bedlek Copyright (C) 2018, 2019 009 */ 010public class FrmAbout extends javax.swing.JFrame { 011 012 private static final String FORM_PROPERTIES = "dlgAbout"; 013 private final AwtWindowProperties _mAwtWindowProperties; 014 015 /** 016 * Creates new form dlgAbout. 017 * @param awtWindowProperties window properties. 018 */ 019 public FrmAbout(AwtWindowProperties awtWindowProperties) { 020 super(); 021 initComponents(); 022 _mHelpTitle.setText(_mHelpTitle.getText() + OtherData.CTC_VERSION); 023 _mAwtWindowProperties = awtWindowProperties; 024 _mAwtWindowProperties.setWindowState(this, FORM_PROPERTIES); 025 this.getRootPane().setDefaultButton(_mOK); 026 } 027 028 /** 029 * This method is called from within the constructor to initialize the form. 030 * WARNING: Do NOT modify this code. The content of this method is always 031 * regenerated by the Form Editor. 032 */ 033 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 034 private void initComponents() { 035 036 _mHelpTitle = new javax.swing.JLabel(); 037 _mOK = new javax.swing.JButton(); 038 jLabel2 = new javax.swing.JLabel(); 039 jLabel3 = new javax.swing.JLabel(); 040 jLabel4 = new javax.swing.JLabel(); 041 jLabel5 = new javax.swing.JLabel(); 042 jLabel6 = new javax.swing.JLabel(); 043 jLabel1 = new javax.swing.JLabel(); 044 045 setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); 046 setTitle("About"); 047 addWindowListener(new java.awt.event.WindowAdapter() { 048 @Override 049 public void windowClosing(java.awt.event.WindowEvent evt) { 050 formWindowClosing(evt); 051 } 052 }); 053 054 _mHelpTitle.setText("CTCEditor - CTC Editor "); 055 056 _mOK.setText(Bundle.getMessage("ButtonOK")); 057 _mOK.addActionListener(new java.awt.event.ActionListener() { 058 @Override 059 public void actionPerformed(java.awt.event.ActionEvent evt) { 060 _mOKActionPerformed(evt); 061 } 062 }); 063 064 jLabel2.setText("Developed by Gregory Bedlek"); 065 066 jLabel3.setText("With MAJOR input from the following person:"); 067 068 jLabel4.setText("Dave Sand - Really BIG help"); 069 070 jLabel5.setText("Helped me learn CTC concepts:"); 071 072 jLabel6.setText("Bob Perrin"); 073 074 jLabel1.setText("Rick Moser"); 075 076 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 077 getContentPane().setLayout(layout); 078 layout.setHorizontalGroup( 079 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 080 .addGroup(layout.createSequentialGroup() 081 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 082 .addGroup(layout.createSequentialGroup() 083 .addGap(54, 54, 54) 084 .addComponent(_mHelpTitle)) 085 .addGroup(layout.createSequentialGroup() 086 .addContainerGap() 087 .addComponent(jLabel2)) 088 .addGroup(layout.createSequentialGroup() 089 .addContainerGap() 090 .addComponent(jLabel3)) 091 .addGroup(layout.createSequentialGroup() 092 .addContainerGap() 093 .addComponent(jLabel5)) 094 .addGroup(layout.createSequentialGroup() 095 .addGap(45, 45, 45) 096 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 097 .addComponent(jLabel4) 098 .addGroup(layout.createSequentialGroup() 099 .addGap(1, 1, 1) 100 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 101 .addComponent(_mOK) 102 .addComponent(jLabel6) 103 .addComponent(jLabel1)))))) 104 .addContainerGap(27, Short.MAX_VALUE)) 105 ); 106 layout.setVerticalGroup( 107 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 108 .addGroup(layout.createSequentialGroup() 109 .addContainerGap() 110 .addComponent(_mHelpTitle) 111 .addGap(17, 17, 17) 112 .addComponent(jLabel2) 113 .addGap(18, 18, 18) 114 .addComponent(jLabel3) 115 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 116 .addComponent(jLabel4) 117 .addGap(18, 18, 18) 118 .addComponent(jLabel5) 119 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 120 .addComponent(jLabel1) 121 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 122 .addComponent(jLabel6) 123 .addGap(27, 27, 27) 124 .addComponent(_mOK) 125 .addContainerGap(36, Short.MAX_VALUE)) 126 ); 127 128 pack(); 129 }// </editor-fold>//GEN-END:initComponents 130 131 private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing 132 _mAwtWindowProperties.saveWindowState(this, FORM_PROPERTIES); 133 dispose(); 134 }//GEN-LAST:event_formWindowClosing 135 136 private void _mOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__mOKActionPerformed 137 _mAwtWindowProperties.saveWindowState(this, FORM_PROPERTIES); 138 dispose(); 139 }//GEN-LAST:event__mOKActionPerformed 140 141 // Variables declaration - do not modify//GEN-BEGIN:variables 142 private javax.swing.JLabel _mHelpTitle; 143 private javax.swing.JButton _mOK; 144 private javax.swing.JLabel jLabel1; 145 private javax.swing.JLabel jLabel2; 146 private javax.swing.JLabel jLabel3; 147 private javax.swing.JLabel jLabel4; 148 private javax.swing.JLabel jLabel5; 149 private javax.swing.JLabel jLabel6; 150 // End of variables declaration//GEN-END:variables 151}