package de.unisiegen.gtitool.ui.netbeans; import javax.swing.JDialog; import javax.swing.JFrame; import de.unisiegen.gtitool.ui.logic.AlphabetDialog; import de.unisiegen.gtitool.ui.netbeans.interfaces.GUIClass; /** * The alphabet dialog. * * @author Christian Fehler * @version $Id$ */ @SuppressWarnings({ "all" }) public class AlphabetDialogForm extends JDialog implements GUIClass <AlphabetDialog> { /** * The serial version uid. */ private static final long serialVersionUID = 2561838968856553690L; /** * The {@link AlphabetDialog}. */ private AlphabetDialog logic; /** * Allocates a new {@link AlphabetDialogForm}. * * @param logic The {@link AlphabetDialog}. * @param parent The parent {@link JFrame}. */ public AlphabetDialogForm(AlphabetDialog logic, JFrame parent) { super(parent, true); this.logic = logic; initComponents(); } /** * {@inheritDoc} * * @see GUIClass#getLogic() */ public final AlphabetDialog getLogic () { return this.logic; } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; jGTILabelHeadline = new de.unisiegen.gtitool.ui.swing.JGTILabel(); alphabetPanelForm = new de.unisiegen.gtitool.ui.netbeans.AlphabetPanelForm(); jGTIPanelButtons = new de.unisiegen.gtitool.ui.swing.JGTIPanel(); jGTIButtonOk = new de.unisiegen.gtitool.ui.swing.JGTIButton(); jGTIButtonCancel = new de.unisiegen.gtitool.ui.swing.JGTIButton(); getContentPane().setLayout(new java.awt.GridBagLayout()); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("de/unisiegen/gtitool/ui/i18n/messages"); // NOI18N setTitle(bundle.getString("AlphabetDialog.Title")); // NOI18N setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); jGTILabelHeadline.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jGTILabelHeadline.setText(bundle.getString("AlphabetDialog.Edit")); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(16, 16, 5, 16); getContentPane().add(jGTILabelHeadline, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 16); getContentPane().add(alphabetPanelForm, gridBagConstraints); jGTIButtonOk.setMnemonic(java.util.ResourceBundle.getBundle("de/unisiegen/gtitool/ui/i18n/messages").getString("AlphabetDialog.OkMnemonic").charAt(0)); jGTIButtonOk.setText(bundle.getString("AlphabetDialog.Ok")); // NOI18N jGTIButtonOk.setToolTipText(bundle.getString("AlphabetDialog.OkToolTip")); // NOI18N jGTIButtonOk.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jGTIButtonOkActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5); jGTIPanelButtons.add(jGTIButtonOk, gridBagConstraints); jGTIButtonCancel.setMnemonic(java.util.ResourceBundle.getBundle("de/unisiegen/gtitool/ui/i18n/messages").getString("AlphabetDialog.CancelMnemonic").charAt(0)); jGTIButtonCancel.setText(bundle.getString("AlphabetDialog.Cancel")); // NOI18N jGTIButtonCancel.setToolTipText(bundle.getString("AlphabetDialog.CancelToolTip")); // NOI18N jGTIButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jGTIButtonCancelActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0); jGTIPanelButtons.add(jGTIButtonCancel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 16, 16, 16); getContentPane().add(jGTIPanelButtons, gridBagConstraints); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width-480)/2, (screenSize.height-300)/2, 480, 300); }// </editor-fold>//GEN-END:initComponents private void jGTIButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jGTIButtonCancelActionPerformed this.logic.handleCancel(); }//GEN-LAST:event_jGTIButtonCancelActionPerformed private void jGTIButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jGTIButtonOkActionPerformed this.logic.handleOk(); }//GEN-LAST:event_jGTIButtonOkActionPerformed private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing this.logic.handleCancel(); }//GEN-LAST:event_formWindowClosing // Variables declaration - do not modify//GEN-BEGIN:variables public de.unisiegen.gtitool.ui.netbeans.AlphabetPanelForm alphabetPanelForm; public de.unisiegen.gtitool.ui.swing.JGTIButton jGTIButtonCancel; public de.unisiegen.gtitool.ui.swing.JGTIButton jGTIButtonOk; public de.unisiegen.gtitool.ui.swing.JGTILabel jGTILabelHeadline; public de.unisiegen.gtitool.ui.swing.JGTIPanel jGTIPanelButtons; // End of variables declaration//GEN-END:variables }