ref #10287 change cdmlib label to lower case
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 12 Apr 2023 07:59:14 +0000 (09:59 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 12 Apr 2023 07:59:14 +0000 (09:59 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/remoteserver/wizard/CdmRemoteServerWizardPage.java

index dc142d117aa7ce57449242d2db38b1189c22fb5c..ae456031bcc2429a564fad22c1c4d7d57fc13b9b 100644 (file)
@@ -9,8 +9,6 @@
 
 package eu.etaxonomy.taxeditor.view.remoteserver.wizard;
 
-import java.awt.Color;
-
 import org.apache.commons.lang3.StringUtils;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.WizardPage;
@@ -29,7 +27,6 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
 
 import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfoConfig;
-import eu.etaxonomy.taxeditor.view.remoteserver.common.CdmRemoteServerRepository;
 
 /**
  * <p>Abstract CdmDataSourceCredentialsWizardPage class.</p>
@@ -44,7 +41,7 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
        protected Text text_server;
        protected Text text_port;
        protected Text text_prefix;
-       
+
        protected Button checkIgnoreCdmLibVersion;
 
        protected Composite composite;
@@ -119,18 +116,18 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
                remoteServerLabel.setText("Server:");
                text_server = new Text(editRemoteServerComposite, SWT.BORDER);
                text_server.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-               
+
                Label remotePortLabel = new Label(editRemoteServerComposite, SWT.NONE);
                remotePortLabel.setText("Port:");
                text_port = new Text(editRemoteServerComposite, SWT.BORDER);
                text_port.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-               
+
                Label remotePrefixLabel = new Label(editRemoteServerComposite, SWT.NONE);
                remotePrefixLabel.setText("Prefix:");
                text_prefix = new Text(editRemoteServerComposite, SWT.BORDER);
                text_prefix.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-               
-               
+
+
                Composite checkCdmlibVersionComposite = new Composite(editRemoteServerComposite, SWT.NONE);
                GridData checkCdmlibVersionGridData = new GridData(SWT.FILL, SWT.TOP, true, true,2,1);
                checkCdmlibVersionComposite.setLayoutData(checkCdmlibVersionGridData);
@@ -138,7 +135,7 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
                checkCdmlibVersionLayout.numColumns = 3;
                checkCdmlibVersionComposite.setLayout(checkCdmlibVersionLayout);
                Label remoteCheckCdmLibVersionLabel = new Label(checkCdmlibVersionComposite, SWT.NONE);
-               remoteCheckCdmLibVersionLabel.setText("Check Cdmlib Version:");
+               remoteCheckCdmLibVersionLabel.setText("Check cdmlib Version:");
                checkIgnoreCdmLibVersion = new Button(checkCdmlibVersionComposite, SWT.CHECK);
                checkIgnoreCdmLibVersion.addSelectionListener(this);
                Label remoteCheckCdmLibVersionWarning = new Label(checkCdmlibVersionComposite, SWT.NONE);
@@ -168,7 +165,7 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
                init();
        }
 
-       
+
 
        /**
         * Initialize text fields
@@ -201,7 +198,7 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
                text_server.addModifyListener(this);
                text_port.addModifyListener(this);
                text_prefix.addModifyListener(this);
-               
+
        }
 
        private void removeListeners() {
@@ -209,29 +206,29 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
                text_server.removeModifyListener(this);
                text_port.removeModifyListener(this);
                text_prefix.removeModifyListener(this);
-               
+
        }
 
        private boolean testServerConfiguration() {
                //TODO
                return true;
        }
-       
+
 
        /**
         * <p>checkPageComplete</p>
         */
        public void checkPageComplete(){
                boolean complete = true;
-               
+
                complete &=StringUtils.isNotBlank(text_name.getText());
                complete &=StringUtils.isNotBlank(text_server.getText());
                complete &=this.remoteServer.getPort() != null;
-                               
+
                this.setPageComplete(complete);
        }
 
-       
+
 
        @Override
        public IWizardPage getNextPage() {
@@ -260,7 +257,7 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
                this.remoteServer.setIgnoreCdmLibVersion(!this.checkIgnoreCdmLibVersion.getSelection());
                this.remoteServer.setServer(server!= null? server:null);
                this.remoteServer.setPrefix(prefix != null?prefix:null);
-               
+
                text_port.setBackground(text_prefix.getBackground());
                Integer intPort = checkAndConvertPort();
                if (intPort == null){
@@ -272,7 +269,7 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
 
        private Integer checkAndConvertPort() {
                Integer portInt = null;
-       
+
                try {
                        portInt = StringUtils.isNotBlank(port)?Integer.parseInt(port):0;
                }catch(NumberFormatException e) {
@@ -281,7 +278,7 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
                if (portInt > 65535) {
                        return null;
                }
-               
+
                return portInt;
        }
 
@@ -289,15 +286,15 @@ public class CdmRemoteServerWizardPage extends WizardPage implements ModifyListe
        public void widgetSelected(SelectionEvent e) {
                this.remoteServer.setIgnoreCdmLibVersion(!checkIgnoreCdmLibVersion.getSelection());
                checkPageComplete();
-               
+
        }
 
        @Override
        public void widgetDefaultSelected(SelectionEvent e) {
                // TODO Auto-generated method stub
-               
+
        }
 
-       
-       
+
+
 }
\ No newline at end of file