Takuya Ono
takuy****@users*****
2007年 8月 21日 (火) 00:13:26 JST
Index: BetaProject/src/org/jent/checksmtp/ApplicationUI.form diff -u BetaProject/src/org/jent/checksmtp/ApplicationUI.form:1.6 BetaProject/src/org/jent/checksmtp/ApplicationUI.form:1.7 --- BetaProject/src/org/jent/checksmtp/ApplicationUI.form:1.6 Sat Aug 18 04:12:21 2007 +++ BetaProject/src/org/jent/checksmtp/ApplicationUI.form Tue Aug 21 00:13:26 2007 @@ -33,7 +33,7 @@ <Group type="102" alignment="1" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Component id="jButtonQuit" linkSize="1" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="145" max="32767" attributes="0"/> + <EmptySpace pref="190" max="32767" attributes="0"/> <Component id="jButtonOK" linkSize="1" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="jButtonCancel" linkSize="1" min="-2" max="-2" attributes="0"/> @@ -64,10 +64,13 @@ <Container class="javax.swing.JPanel" name="jPanelMail"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> - <JTabbedPaneConstraints tabName="Mail"> + <JTabbedPaneConstraints tabName="メール" toolTip="メール関係の設定"> <Property name="tabTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jPanelMail.TabConstraints.tabTitle" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> </Property> + <Property name="tabToolTip" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jPanelMail.TabConstraints tabToolTip" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> + </Property> </JTabbedPaneConstraints> </Constraint> </Constraints> @@ -76,26 +79,31 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <Component id="jLabel1" linkSize="2" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="jTextFieldReceiverPort" pref="112" max="32767" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <Component id="jTextFieldReceiverPort" min="-2" pref="112" max="-2" attributes="0"/> + <EmptySpace pref="45" max="32767" attributes="1"/> <Component id="jCheckBoxEnableRemoteConnect" min="-2" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> <Component id="jLabel2" linkSize="2" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="jTextFieldServerHost" pref="170" max="32767" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jTextFieldServerHost" pref="150" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Component id="jLabel3" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jTextFieldServerPort" pref="36" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel7" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="jTextFieldServerPort" min="-2" pref="54" max="-2" attributes="0"/> + <Component id="jTextFieldConfirmTimeout" pref="213" max="32767" attributes="0"/> </Group> </Group> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -115,7 +123,12 @@ <Component id="jTextFieldServerHost" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="jTextFieldServerPort" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace pref="58" max="32767" attributes="0"/> + <EmptySpace pref="27" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextFieldConfirmTimeout" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -153,6 +166,9 @@ <Property name="inputVerifier" type="javax.swing.InputVerifier" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="new PortNumberInputVerifier()" type="code"/> </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1, 19]"/> + </Property> </Properties> </Component> <Component class="javax.swing.JTextField" name="jTextFieldServerHost"> @@ -163,6 +179,9 @@ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jTextFieldServerHost.toolTipText" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1, 19]"/> + </Property> </Properties> </Component> <Component class="javax.swing.JTextField" name="jTextFieldServerPort"> @@ -196,15 +215,41 @@ </Property> </Properties> </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jLabel7.text" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldConfirmTimeout"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jTextFieldConfirmTimeout.text" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jTextFieldConfirmTimeout.toolTipText" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> + </Property> + <Property name="inputVerifier" type="javax.swing.InputVerifier" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <Connection code="new TimeoutNumberInputVerifier()
" type="code"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1, 19]"/> + </Property> + </Properties> + </Component> </SubComponents> </Container> <Container class="javax.swing.JPanel" name="jPanelLDAP"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> - <JTabbedPaneConstraints tabName="LDAP"> + <JTabbedPaneConstraints tabName="LDAP" toolTip="LDAP関係の設定"> <Property name="tabTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jPanelLDAP.TabConstraints.tabTitle" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> </Property> + <Property name="tabToolTip" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jPanelLDAP.TabConstraints tabToolTip" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> + </Property> </JTabbedPaneConstraints> </Constraint> </Constraints> @@ -223,10 +268,10 @@ </Group> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jTextFieldAttribute" alignment="0" pref="300" max="32767" attributes="0"/> - <Component id="jTextFieldBaseDn" pref="300" max="32767" attributes="0"/> + <Component id="jTextFieldAttribute" alignment="0" pref="297" max="32767" attributes="0"/> + <Component id="jTextFieldBaseDn" pref="297" max="32767" attributes="0"/> <Group type="102" alignment="0" attributes="0"> - <Component id="jTextFieldProviderUrl" pref="217" max="32767" attributes="0"/> + <Component id="jTextFieldProviderUrl" pref="212" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="jCheckBoxIsSjis" min="-2" max="-2" attributes="0"/> </Group> @@ -367,10 +412,13 @@ <Container class="javax.swing.JPanel" name="jPanelAbout"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> - <JTabbedPaneConstraints tabName="About"> + <JTabbedPaneConstraints tabName="情報" toolTip="このプログラムについて"> <Property name="tabTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jPanelAbout.TabConstraints.tabTitle" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> </Property> + <Property name="tabToolTip" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jPanelAbout.TabConstraints tabToolTip" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> + </Property> </JTabbedPaneConstraints> </Constraint> </Constraints> Index: BetaProject/src/org/jent/checksmtp/ApplicationUI.java diff -u BetaProject/src/org/jent/checksmtp/ApplicationUI.java:1.7 BetaProject/src/org/jent/checksmtp/ApplicationUI.java:1.8 --- BetaProject/src/org/jent/checksmtp/ApplicationUI.java:1.7 Sat Aug 18 04:12:21 2007 +++ BetaProject/src/org/jent/checksmtp/ApplicationUI.java Tue Aug 21 00:13:26 2007 @@ -41,6 +41,7 @@ jTextFieldServerHost.setText(ApplicationProperties.getSmtpServerHost()); jTextFieldServerPort.setText(Integer.toString(ApplicationProperties.getSmtpServerPort())); jCheckBoxEnableRemoteConnect.setSelected(ApplicationProperties.getSmtpEnebleRemoteConnect()); + jTextFieldConfirmTimeout.setText(Integer.toString(ApplicationProperties.getConfirmTimeout())); jCheckBoxLdap.setSelected(ApplicationProperties.getLdap()); jTextFieldProviderUrl.setText(ApplicationProperties.getLdapProviderURL()); @@ -67,7 +68,7 @@ if ( !ret ) { jTextField.setBackground(Color.PINK); if ( portNumberOutOfRangeErrorDialog == null ) { - portNumberOutOfRangeErrorDialog = + portNumberOutOfRangeErrorDialog = new MessageDialogUI(java.util.ResourceBundle.getBundle("org/jent/checksmtp/Bundle").getString("ApplicationUI.Port_number_is_integer_from_1_to_65535."), null, MessageDialogUI.WARNING_MODE); } else { @@ -81,6 +82,38 @@ } } + static private MessageDialogUI timeoutRangeErrorDialog = null; + class TimeoutNumberInputVerifier extends InputVerifier { + public boolean verify(JComponent jComponent) { + JTextField jTextField = (JTextField) jComponent; + boolean ret = true; + String input = jTextField.getText(); + + try { + int timeout = Integer.parseInt(input); + checkTimeoutRange(timeout); + } catch (Exception e) { + ret = false; + } + + if ( !ret ) { + jTextField.setBackground(Color.PINK); + if ( timeoutRangeErrorDialog == null ) { + timeoutRangeErrorDialog = + new MessageDialogUI(java.util.ResourceBundle.getBundle("org/jent/checksmtp/Bundle").getString("ApplicationUI.exception.Timeout_need_to_a_positive_number"), + null, MessageDialogUI.WARNING_MODE); + } else { + timeoutRangeErrorDialog.setVisible(true); + } + } else { + jTextField.setBackground(Color.WHITE); + } + + return ret; + } + } + + /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is @@ -97,6 +130,8 @@ jTextFieldServerHost = new javax.swing.JTextField(); jTextFieldServerPort = new javax.swing.JTextField(); jCheckBoxEnableRemoteConnect = new javax.swing.JCheckBox(); + jLabel7 = new javax.swing.JLabel(); + jTextFieldConfirmTimeout = new javax.swing.JTextField(); jPanelLDAP = new javax.swing.JPanel(); jCheckBoxLdap = new javax.swing.JCheckBox(); jLabel4 = new javax.swing.JLabel(); @@ -136,9 +171,11 @@ jTextFieldReceiverPort.setText(bundle.getString("ApplicationUI.jTextFieldReceiverPort.text")); // NOI18N jTextFieldReceiverPort.setToolTipText(bundle.getString("ApplicationUI.jTextFieldReceiverPort.toolTipText")); // NOI18N jTextFieldReceiverPort.setInputVerifier(new PortNumberInputVerifier()); + jTextFieldReceiverPort.setMinimumSize(new java.awt.Dimension(1, 19)); jTextFieldServerHost.setText(bundle.getString("ApplicationUI.jTextFieldServerHost.text")); // NOI18N jTextFieldServerHost.setToolTipText(bundle.getString("ApplicationUI.jTextFieldServerHost.toolTipText")); // NOI18N + jTextFieldServerHost.setMinimumSize(new java.awt.Dimension(1, 19)); jTextFieldServerPort.setText(bundle.getString("ApplicationUI.jTextFieldServerPort.text")); // NOI18N jTextFieldServerPort.setToolTipText(bundle.getString("ApplicationUI.jTextFieldServerPort.toolTipText")); // NOI18N @@ -149,6 +186,14 @@ jCheckBoxEnableRemoteConnect.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); jCheckBoxEnableRemoteConnect.setMargin(new java.awt.Insets(0, 0, 0, 0)); + jLabel7.setText(bundle.getString("ApplicationUI.jLabel7.text")); // NOI18N + + jTextFieldConfirmTimeout.setText(bundle.getString("ApplicationUI.jTextFieldConfirmTimeout.text")); // NOI18N + jTextFieldConfirmTimeout.setToolTipText(bundle.getString("ApplicationUI.jTextFieldConfirmTimeout.toolTipText")); // NOI18N + jTextFieldConfirmTimeout.setInputVerifier(new TimeoutNumberInputVerifier() + ); + jTextFieldConfirmTimeout.setMinimumSize(new java.awt.Dimension(1, 19)); + org.jdesktop.layout.GroupLayout jPanelMailLayout = new org.jdesktop.layout.GroupLayout(jPanelMail); jPanelMail.setLayout(jPanelMailLayout); jPanelMailLayout.setHorizontalGroup( @@ -159,17 +204,21 @@ .add(jPanelMailLayout.createSequentialGroup() .add(jLabel1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jTextFieldReceiverPort, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jTextFieldReceiverPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 112, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 45, Short.MAX_VALUE) .add(jCheckBoxEnableRemoteConnect)) .add(jPanelMailLayout.createSequentialGroup() .add(jLabel2) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jTextFieldServerHost, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE) + .add(jTextFieldServerHost, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jLabel3) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jTextFieldServerPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) + .add(jTextFieldServerPort, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)) + .add(jPanelMailLayout.createSequentialGroup() + .add(jLabel7) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jTextFieldConfirmTimeout, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE))) .addContainerGap()) ); @@ -189,7 +238,11 @@ .add(jLabel3) .add(jTextFieldServerHost, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jTextFieldServerPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(58, Short.MAX_VALUE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 27, Short.MAX_VALUE) + .add(jPanelMailLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(jLabel7) + .add(jTextFieldConfirmTimeout, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) ); jTabbedPane.addTab(bundle.getString("ApplicationUI.jPanelMail.TabConstraints.tabTitle"), jPanelMail); // NOI18N @@ -241,10 +294,10 @@ .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel4)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanelLDAPLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jTextFieldAttribute, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) - .add(jTextFieldBaseDn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) + .add(jTextFieldAttribute, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE) + .add(jTextFieldBaseDn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE) .add(jPanelLDAPLayout.createSequentialGroup() - .add(jTextFieldProviderUrl, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE) + .add(jTextFieldProviderUrl, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jCheckBoxIsSjis)))) .add(jPanelLDAPLayout.createSequentialGroup() @@ -347,7 +400,7 @@ .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(jButtonQuit) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 145, Short.MAX_VALUE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 190, Short.MAX_VALUE) .add(jButtonOK) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jButtonCancel) @@ -398,7 +451,15 @@ throw ex; } boolean enableRemoteConnect = jCheckBoxEnableRemoteConnect.isSelected(); - + int confirmTimeout; + try { + confirmTimeout = Integer.parseInt(jTextFieldConfirmTimeout.getText()); + checkTimeoutRange(confirmTimeout); + } catch (NumberFormatException nfEx) { + jTextFieldConfirmTimeout.setBackground(Color.PINK); + throw nfEx; + } + boolean enableLdap = jCheckBoxLdap.isSelected(); String ldapUrl = jTextFieldProviderUrl.getText(); String rootDn = jTextFieldBaseDn.getText(); @@ -409,7 +470,8 @@ || !serverHost.equals(ApplicationProperties.getSmtpServerHost()) || serverPort != ApplicationProperties.getSmtpServerPort() || enableRemoteConnect != ApplicationProperties.getSmtpEnebleRemoteConnect() - + || confirmTimeout != ApplicationProperties.getConfirmTimeout() + || enableLdap != ApplicationProperties.getLdap() || !ldapUrl.equals(ApplicationProperties.getLdapProviderURL()) || !rootDn.equals(ApplicationProperties.getLdapRoot()) @@ -422,6 +484,7 @@ ApplicationProperties.setSmtpServerHost(serverHost); ApplicationProperties.setSmtpServerPort(serverPort); ApplicationProperties.setSmtpEnableRemoteConnect(enableRemoteConnect); + ApplicationProperties.setConfirmTimeout(confirmTimeout); ApplicationProperties.setLdap(enableLdap); ApplicationProperties.setLdapProviderURL(ldapUrl); @@ -432,7 +495,7 @@ smtpClient.configChangeNotify(); if ( !ApplicationProperties.save() ) { new MessageDialogUI(java.util.ResourceBundle.getBundle("org/jent/checksmtp/Bundle").getString("ApplicationUI.error.Fail_the_properties_file_save."), null, - MessageDialogUI.ERROR_MODE); + MessageDialogUI.ERROR_MODE); } else { iconified(); } @@ -442,6 +505,15 @@ }//GEN-LAST:event_jButtonOKActionPerformed /** + * Time out second is need to positive number + */ + private void checkTimeoutRange(final int confirmTimeout) throws NumberFormatException { + if ( confirmTimeout < 0 ) { + throw new NumberFormatException(java.util.ResourceBundle.getBundle("org/jent/checksmtp/Bundle").getString("ApplicationUI.exception.Timeout_need_to_a_positive_number")); + } + } + + /** * Check port number range. It is unsigned short number. * Argument is port number. **/ @@ -514,7 +586,7 @@ TrayIcon trayIcon = new TrayIcon(loadIconImage(), "mdc", popup); trayIcon.setImageAutoSize(true); - + MenuItem menuItemOpen = new MenuItem("Properties..."); menuItemOpen.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -634,6 +706,7 @@ private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabelProgramName; private javax.swing.JLabel jLabelProgramVersion; private javax.swing.JLabel jLabelSfURL; @@ -643,6 +716,7 @@ private javax.swing.JTabbedPane jTabbedPane; private javax.swing.JTextField jTextFieldAttribute; private javax.swing.JTextField jTextFieldBaseDn; + private javax.swing.JTextField jTextFieldConfirmTimeout; private javax.swing.JTextField jTextFieldProviderUrl; private javax.swing.JTextField jTextFieldReceiverPort; private javax.swing.JTextField jTextFieldServerHost;