package de.unisiegen.gtitool.ui.netbeans;
import javax.swing.JDialog;
import javax.swing.JFrame;
import de.unisiegen.gtitool.ui.logic.ExchangeDialog;
import de.unisiegen.gtitool.ui.netbeans.interfaces.GUIClass;
/**
* The {@link ExchangeDialogForm}.
*
* @author Christian Fehler
* @version $Id$
*/
@SuppressWarnings({ "all" })
public class ExchangeDialogForm extends JDialog implements GUIClass <ExchangeDialog>
{
/**
* The serial version uid.
*/
private static final long serialVersionUID = 4187569542433797162L;
/**
* The {@link ExchangeDialog}.
*/
private ExchangeDialog logic;
/**
* Creates new {@link ExchangeDialogForm}.
*
* @param logic The {@link ExchangeDialog}.
* @param parent The parent {@link JFrame}.
*/
public ExchangeDialogForm ( ExchangeDialog logic, JFrame parent )
{
super ( parent, true );
this.logic = logic;
initComponents ();
}
/**
* {@inheritDoc}
*
* @see GUIClass#getLogic()
*/
public final ExchangeDialog 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;
buttonGroupPreferences = new javax.swing.ButtonGroup();
jGTIScrollPaneStatus = new de.unisiegen.gtitool.ui.swing.JGTIScrollPane();
jGTITextPaneStatus = new de.unisiegen.gtitool.ui.swing.JGTITextPane();
jGTIPanelPreferences = new de.unisiegen.gtitool.ui.swing.JGTIPanel();
jGTILabelPort = new de.unisiegen.gtitool.ui.swing.JGTILabel();
jGTITextFieldPort = new de.unisiegen.gtitool.ui.swing.JGTITextField();
jGTILabelHost = new de.unisiegen.gtitool.ui.swing.JGTILabel();
jGTITextFieldHost = new de.unisiegen.gtitool.ui.swing.JGTITextField();
jGTIPanelDescription = new de.unisiegen.gtitool.ui.swing.JGTIPanel();
jGTILabelHostDescription = new de.unisiegen.gtitool.ui.swing.JGTILabel();
jGTIScrollPaneDescription = new de.unisiegen.gtitool.ui.swing.JGTIScrollPane();
jGTITextAreaDescription = new de.unisiegen.gtitool.ui.swing.JGTITextArea();
jGTIRadioButtonReceive = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();
jGTIRadioButtonSend = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();
jGTIPanelButtons = new de.unisiegen.gtitool.ui.swing.JGTIPanel();
jGTIButtonExecute = new de.unisiegen.gtitool.ui.swing.JGTIButton();
jGTIButtonCancel = new de.unisiegen.gtitool.ui.swing.JGTIButton();
jGTIButtonClose = 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("ExchangeDialog.Title")); // NOI18N
setModal(true);
setResizable(false);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
formWindowClosing(evt);
}
});
jGTITextPaneStatus.setEditable(false);
jGTITextPaneStatus.setFocusable(false);
jGTIScrollPaneStatus.setViewportView(jGTITextPaneStatus);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new java.awt.Insets(16, 16, 5, 16);
getContentPane().add(jGTIScrollPaneStatus, gridBagConstraints);
jGTILabelPort.setText(bundle.getString("ExchangeDialog.Port")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 5);
jGTIPanelPreferences.add(jGTILabelPort, gridBagConstraints);
jGTITextFieldPort.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
jGTITextFieldPortKeyReleased(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 0);
jGTIPanelPreferences.add(jGTITextFieldPort, gridBagConstraints);
jGTILabelHost.setText(bundle.getString("ExchangeDialog.Host")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 5);
jGTIPanelPreferences.add(jGTILabelHost, gridBagConstraints);
jGTITextFieldHost.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
jGTITextFieldHostKeyReleased(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 0);
jGTIPanelPreferences.add(jGTITextFieldHost, gridBagConstraints);
jGTILabelHostDescription.setText(bundle.getString("ExchangeDialog.Description")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridheight = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
jGTIPanelDescription.add(jGTILabelHostDescription, gridBagConstraints);
jGTITextAreaDescription.setColumns(15);
jGTITextAreaDescription.setRows(3);
jGTIScrollPaneDescription.setViewportView(jGTITextAreaDescription);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridheight = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
jGTIPanelDescription.add(jGTIScrollPaneDescription, gridBagConstraints);
buttonGroupPreferences.add(jGTIRadioButtonReceive);
jGTIRadioButtonReceive.setSelected(true);
jGTIRadioButtonReceive.setText(bundle.getString("ExchangeDialog.Receive")); // NOI18N
jGTIRadioButtonReceive.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
jGTIRadioButtonReceiveItemStateChanged(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 0);
jGTIPanelDescription.add(jGTIRadioButtonReceive, gridBagConstraints);
buttonGroupPreferences.add(jGTIRadioButtonSend);
jGTIRadioButtonSend.setText(bundle.getString("ExchangeDialog.Send")); // NOI18N
jGTIRadioButtonSend.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
jGTIRadioButtonSendItemStateChanged(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
jGTIPanelDescription.add(jGTIRadioButtonSend, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
jGTIPanelPreferences.add(jGTIPanelDescription, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);
getContentPane().add(jGTIPanelPreferences, gridBagConstraints);
jGTIButtonExecute.setMnemonic(java.util.ResourceBundle.getBundle("de/unisiegen/gtitool/ui/i18n/messages").getString("ExchangeDialog.ExecuteMnemonic").charAt(0));
jGTIButtonExecute.setText(bundle.getString("ExchangeDialog.Execute")); // NOI18N
jGTIButtonExecute.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jGTIButtonExecuteActionPerformed(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, 5, 0, 5);
jGTIPanelButtons.add(jGTIButtonExecute, gridBagConstraints);
jGTIButtonCancel.setMnemonic(java.util.ResourceBundle.getBundle("de/unisiegen/gtitool/ui/i18n/messages").getString("ExchangeDialog.CancelMnemonic").charAt(0));
jGTIButtonCancel.setText(bundle.getString("ExchangeDialog.Cancel")); // 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, 5);
jGTIPanelButtons.add(jGTIButtonCancel, gridBagConstraints);
jGTIButtonClose.setMnemonic(java.util.ResourceBundle.getBundle("de/unisiegen/gtitool/ui/i18n/messages").getString("ExchangeDialog.Close").charAt(0));
jGTIButtonClose.setText(bundle.getString("ExchangeDialog.Close")); // NOI18N
jGTIButtonClose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jGTIButtonCloseActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
jGTIPanelButtons.add(jGTIButtonClose, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.gridwidth = 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);
setBounds(0, 0, 448, 280);
}// </editor-fold>//GEN-END:initComponents
private void jGTIRadioButtonReceiveItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jGTIRadioButtonReceiveItemStateChanged
this.logic.handleItemStateChanged(evt);
}//GEN-LAST:event_jGTIRadioButtonReceiveItemStateChanged
private void jGTIRadioButtonSendItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jGTIRadioButtonSendItemStateChanged
this.logic.handleItemStateChanged(evt);
}//GEN-LAST:event_jGTIRadioButtonSendItemStateChanged
private void jGTITextFieldHostKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jGTITextFieldHostKeyReleased
this.logic.handleHostChanged();
}//GEN-LAST:event_jGTITextFieldHostKeyReleased
private void jGTITextFieldPortKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jGTITextFieldPortKeyReleased
this.logic.handlePortChanged();
}//GEN-LAST:event_jGTITextFieldPortKeyReleased
private void jGTIButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jGTIButtonCancelActionPerformed
this.logic.handleCancel();
}//GEN-LAST:event_jGTIButtonCancelActionPerformed
private void jGTIButtonExecuteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jGTIButtonExecuteActionPerformed
this.logic.handleExecute();
}//GEN-LAST:event_jGTIButtonExecuteActionPerformed
private void jGTIButtonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jGTIButtonCloseActionPerformed
this.logic.handleClose();
}//GEN-LAST:event_jGTIButtonCloseActionPerformed
private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
this.logic.handleClose();
}//GEN-LAST:event_formWindowClosing
// Variables declaration - do not modify//GEN-BEGIN:variables
public javax.swing.ButtonGroup buttonGroupPreferences;
public de.unisiegen.gtitool.ui.swing.JGTIButton jGTIButtonCancel;
public de.unisiegen.gtitool.ui.swing.JGTIButton jGTIButtonClose;
public de.unisiegen.gtitool.ui.swing.JGTIButton jGTIButtonExecute;
public de.unisiegen.gtitool.ui.swing.JGTILabel jGTILabelHost;
public de.unisiegen.gtitool.ui.swing.JGTILabel jGTILabelHostDescription;
public de.unisiegen.gtitool.ui.swing.JGTILabel jGTILabelPort;
public de.unisiegen.gtitool.ui.swing.JGTIPanel jGTIPanelButtons;
public de.unisiegen.gtitool.ui.swing.JGTIPanel jGTIPanelDescription;
public de.unisiegen.gtitool.ui.swing.JGTIPanel jGTIPanelPreferences;
public de.unisiegen.gtitool.ui.swing.JGTIRadioButton jGTIRadioButtonReceive;
public de.unisiegen.gtitool.ui.swing.JGTIRadioButton jGTIRadioButtonSend;
public de.unisiegen.gtitool.ui.swing.JGTIScrollPane jGTIScrollPaneDescription;
public de.unisiegen.gtitool.ui.swing.JGTIScrollPane jGTIScrollPaneStatus;
public de.unisiegen.gtitool.ui.swing.JGTITextArea jGTITextAreaDescription;
public de.unisiegen.gtitool.ui.swing.JGTITextField jGTITextFieldHost;
public de.unisiegen.gtitool.ui.swing.JGTITextField jGTITextFieldPort;
public de.unisiegen.gtitool.ui.swing.JGTITextPane jGTITextPaneStatus;
// End of variables declaration//GEN-END:variables
}