View Javadoc
1 /* 2 * AboutDialog.java 3 * 4 * Copyright (c) 2002 Raben Systems, Inc. All Rights Reserved. 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * 11 * Redistributions in binary form must reproduce the above copyright notice, 12 * this list of conditions and the following disclaimer in the documentation 13 * and/or other materials provided with the distribution. 14 * 15 * Neither the name of Raben Systems, Inc. nor the names of its contributors 16 * may be used to endorse or promote products derived from this software 17 * without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 * 31 * Created on January 9, 2002, 5:19 PM 32 */ 33 34 package com.raben.tools.xslteditor; 35 36 /*** 37 * 38 * @author Vern Raben 39 */ 40 public class AboutDialog extends javax.swing.JDialog { 41 42 /*** Creates new form AboutDialog */ 43 public AboutDialog(java.awt.Frame parent, boolean modal) { 44 super(parent, modal); 45 initComponents(); 46 } 47 48 /*** This method is called from within the constructor to 49 * initialize the form. 50 * WARNING: Do NOT modify this code. The content of this method is 51 * always regenerated by the Form Editor. 52 */ 53 private void initComponents() {//GEN-BEGIN:initComponents 54 jPanel1 = new javax.swing.JPanel(); 55 textArea = new javax.swing.JTextArea(); 56 jPanel2 = new javax.swing.JPanel(); 57 cancelButton = new javax.swing.JButton(); 58 59 getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.Y_AXIS)); 60 61 setTitle("About"); 62 addWindowListener(new java.awt.event.WindowAdapter() { 63 public void windowClosing(java.awt.event.WindowEvent evt) { 64 closeDialog(evt); 65 } 66 }); 67 68 textArea.setLineWrap(true); 69 textArea.setEditable(false); 70 textArea.setColumns(40); 71 textArea.setRows(20); 72 jPanel1.add(textArea); 73 74 getContentPane().add(jPanel1); 75 76 jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); 77 78 cancelButton.setToolTipText("Close the about dialog"); 79 cancelButton.setText("Cancel"); 80 cancelButton.addActionListener(new java.awt.event.ActionListener() { 81 public void actionPerformed(java.awt.event.ActionEvent evt) { 82 cancelButtonActionPerformed(evt); 83 } 84 }); 85 86 jPanel2.add(cancelButton); 87 88 getContentPane().add(jPanel2); 89 90 pack(); 91 }//GEN-END:initComponents 92 93 private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed 94 closeDialog(null); 95 }//GEN-LAST:event_cancelButtonActionPerformed 96 97 /*** Closes the dialog */ 98 private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog 99 setVisible(false); 100 dispose(); 101 }//GEN-LAST:event_closeDialog 102 103 /*** 104 * @param args the command line arguments 105 */ 106 public static void main(String args[]) { 107 new AboutDialog(new javax.swing.JFrame(), true).show(); 108 } 109 110 /*** Setter for property aboutText. 111 * @param aboutText New value of property aboutText. 112 */ 113 public void setAboutText(String aboutText) { 114 this.textArea.setText(aboutText); 115 } 116 117 // Variables declaration - do not modify//GEN-BEGIN:variables 118 private javax.swing.JButton cancelButton; 119 private javax.swing.JTextArea textArea; 120 private javax.swing.JPanel jPanel2; 121 private javax.swing.JPanel jPanel1; 122 // End of variables declaration//GEN-END:variables 123 124 }

This page was automatically generated by Maven