AboutBox.java 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. * AboutBox.java
  3. *
  4. * Created on 18. November 2007, 11:28
  5. */
  6. package schemaspygui;
  7. import javax.swing.*;
  8. /**
  9. *
  10. * @author joachim uhl; mailto:admin@joachim-uhl.de; http://www.joachim-uhl.de/projekte/schemaspygui/
  11. */
  12. public class AboutBox extends javax.swing.JDialog {
  13. /** Creates new form AboutBox */
  14. public AboutBox(JFrame gui) {
  15. startup(gui);
  16. }
  17. /** This method is called from within the constructor to
  18. * initialize the form.
  19. * WARNING: Do NOT modify this code. The content of this method is
  20. * always regenerated by the Form Editor.
  21. */
  22. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  23. private void initComponents() {
  24. jDialog1 = new javax.swing.JDialog();
  25. jPanel1 = new javax.swing.JPanel();
  26. button_CLOSE = new javax.swing.JButton();
  27. jLabel1 = new javax.swing.JLabel();
  28. jLabel2 = new javax.swing.JLabel();
  29. jScrollPane1 = new javax.swing.JScrollPane();
  30. jEditorPane1 = new javax.swing.JEditorPane();
  31. FormListener formListener = new FormListener();
  32. org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
  33. jDialog1.getContentPane().setLayout(jDialog1Layout);
  34. jDialog1Layout.setHorizontalGroup(
  35. jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  36. .add(0, 400, Short.MAX_VALUE)
  37. );
  38. jDialog1Layout.setVerticalGroup(
  39. jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  40. .add(0, 300, Short.MAX_VALUE)
  41. );
  42. setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
  43. button_CLOSE.setText("Close"); // NOI18N
  44. button_CLOSE.addActionListener(formListener);
  45. jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18));
  46. java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("schemaspygui/resources/ReleaseText"); // NOI18N
  47. jLabel1.setText(bundle.getString("ProgramName")); // NOI18N
  48. jLabel2.setText(bundle.getString("VersionInfo")); // NOI18N
  49. jEditorPane1.setBorder(null);
  50. jEditorPane1.setContentType("text/html"); // NOI18N
  51. jEditorPane1.setEditable(false);
  52. jEditorPane1.setText(bundle.getString("ReleaseText")); // NOI18N
  53. jScrollPane1.setViewportView(jEditorPane1);
  54. org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
  55. jPanel1.setLayout(jPanel1Layout);
  56. jPanel1Layout.setHorizontalGroup(
  57. jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  58. .add(jPanel1Layout.createSequentialGroup()
  59. .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  60. .add(jPanel1Layout.createSequentialGroup()
  61. .add(127, 127, 127)
  62. .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
  63. .add(jLabel2)
  64. .add(jLabel1)))
  65. .add(jPanel1Layout.createSequentialGroup()
  66. .add(170, 170, 170)
  67. .add(button_CLOSE))
  68. .add(jPanel1Layout.createSequentialGroup()
  69. .addContainerGap()
  70. .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 382, Short.MAX_VALUE)))
  71. .addContainerGap())
  72. );
  73. jPanel1Layout.setVerticalGroup(
  74. jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  75. .add(jPanel1Layout.createSequentialGroup()
  76. .addContainerGap()
  77. .add(jLabel1)
  78. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  79. .add(jLabel2)
  80. .add(18, 18, 18)
  81. .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)
  82. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  83. .add(button_CLOSE)
  84. .addContainerGap())
  85. );
  86. org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
  87. getContentPane().setLayout(layout);
  88. layout.setHorizontalGroup(
  89. layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  90. .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  91. );
  92. layout.setVerticalGroup(
  93. layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  94. .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  95. );
  96. pack();
  97. }
  98. // Code for dispatching events from components to event handlers.
  99. private class FormListener implements java.awt.event.ActionListener {
  100. FormListener() {}
  101. public void actionPerformed(java.awt.event.ActionEvent evt) {
  102. if (evt.getSource() == button_CLOSE) {
  103. AboutBox.this.button_CLOSEActionPerformed(evt);
  104. }
  105. }
  106. }// </editor-fold>//GEN-END:initComponents
  107. private void startup(JFrame gui) {
  108. initComponents();
  109. //setLocation(gui.getLocation().x+210, gui.getLocation().y+40 );
  110. setLocationRelativeTo(gui);
  111. }
  112. private void button_CLOSEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_CLOSEActionPerformed
  113. this.setVisible(false);
  114. }//GEN-LAST:event_button_CLOSEActionPerformed
  115. // Variables declaration - do not modify//GEN-BEGIN:variables
  116. private javax.swing.JButton button_CLOSE;
  117. private javax.swing.JDialog jDialog1;
  118. private javax.swing.JEditorPane jEditorPane1;
  119. private javax.swing.JLabel jLabel1;
  120. private javax.swing.JLabel jLabel2;
  121. private javax.swing.JPanel jPanel1;
  122. private javax.swing.JScrollPane jScrollPane1;
  123. // End of variables declaration//GEN-END:variables
  124. }