home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Software / TemaCD / sharpdevelop / 087cSetup.exe / data / templates / file / JavaDialog.xml < prev    next >
Encoding:
Extensible Markup Language  |  2002-03-20  |  2.0 KB  |  69 lines

  1. <?xml version="1.0"?>
  2. <Template Originator="Gary Gray" Language="JAVA" Created="09/05/2001" LastModified="09/05/2001">
  3.     
  4.     <TemplateConfiguration>
  5.            <Name>Java AWT Dialog</Name>
  6.            <Icon>JAVA.Project.JavaProjectIcon</Icon>
  7.            <Category>Java</Category>
  8.            <LanguageName>JAVA</LanguageName>
  9.            <Description>A Basic Java Dialog</Description>
  10.     </TemplateConfiguration>
  11.     
  12.     <TemplateFiles>
  13.            <File DefaultExtension=".java" DefaultName="Dialog">
  14.  
  15. <![CDATA[
  16. /*
  17.  * dialog.java
  18.  *
  19.  * created on ${Date} at ${Time}
  20.  */
  21.  
  22. public class dialog extends java.awt.Dialog {
  23.  
  24.     /** Creates new form dialog */
  25.     public dialog(java.awt.Frame parent, boolean modal) {
  26.         super(parent, modal);
  27.         initComponents();
  28.     }
  29.  
  30.     /** This method is called from within the constructor to
  31.      * initialize the form.
  32.      * WARNING: Do NOT modify this code. The content of this method is
  33.      * always regenerated by the Form Editor.
  34.      */
  35.     private void initComponents() {//GEN-BEGIN:initComponents
  36.         setLayout(new java.awt.BorderLayout());
  37.         addWindowListener(new java.awt.event.WindowAdapter() {
  38.                               public void windowClosing(java.awt.event.WindowEvent evt) {
  39.                                   closeDialog(evt);
  40.                               }
  41.                           }
  42.                          );
  43.         pack();
  44.     }//GEN-END:initComponents
  45.  
  46.     /** Closes the dialog */
  47.     private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
  48.         setVisible(false);
  49.         dispose();
  50.     }//GEN-LAST:event_closeDialog
  51.  
  52.     /**
  53.     * param args the command line arguments
  54.     */
  55.     public static void main(String args[]) {
  56.         new dialog(new java.awt.Frame(), true).show();
  57.     }
  58.  
  59.     // Variables declaration - do not modify//GEN-BEGIN:variables
  60.     // End of variables declaration//GEN-END:variables
  61.  
  62. }]]>
  63.         </File>        
  64.     </TemplateFiles>
  65.     
  66.     <FileOptions/>
  67.     
  68. </Template>
  69.