merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / MobotOpenUrlPreferences.java
index 77b9350029918ba51182478437cd979dc001917f..8679d677e2085a5b284a3badd90519dfa28ab269 100644 (file)
@@ -1,12 +1,12 @@
 // $Id$
 /**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy 
+ * http://www.e-taxonomy.eu
+ 
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 
 package eu.etaxonomy.taxeditor.preference;
 
@@ -31,69 +31,77 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
 public class MobotOpenUrlPreferences extends PreferencePage implements
                IWorkbenchPreferencePage {
 
-
        private String openUrlServiceAccessPoint;
        private String openUrlImageMaxWidth;
        private String openUrlImageMaxHeight;
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
         */
        @Override
        public void init(IWorkbench workbench) {
                setPreferenceStore(PreferencesUtil.getPreferenceStore());
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse
+        * .swt.widgets.Composite)
         */
        @Override
        protected Control createContents(Composite parent) {
                Composite container = new Composite(parent, SWT.NULL);
                final GridLayout gridLayout = new GridLayout();
                container.setLayout(gridLayout);
-               
+
                creatOpenUrlServiceAccessPoint(container);
-               
+
                createOpenUrlImageSize(container);
-               
+
                return container;
        }
-       
+
        /**
         * @param container
         */
        private void createOpenUrlImageSize(Composite container) {
-               openUrlImageMaxWidth = getPreferenceStore().getString(IPreferenceKeys.OPENURL_IMAGE_MAX_WIDTH);
-               openUrlImageMaxHeight = getPreferenceStore().getString(IPreferenceKeys.OPENURL_IMAGE_MAX_HEIGHT);
-               
+               openUrlImageMaxWidth = getPreferenceStore().getString(
+                               IPreferenceKeys.OPENURL_IMAGE_MAX_WIDTH);
+               openUrlImageMaxHeight = getPreferenceStore().getString(
+                               IPreferenceKeys.OPENURL_IMAGE_MAX_HEIGHT);
+
                Composite composite = new Composite(container, SWT.NULL);
                final GridLayout gridLayout = new GridLayout(2, false);
                composite.setLayout(gridLayout);
-               
+
                final CLabel labelWidth = new CLabel(composite, SWT.NULL);
                labelWidth.setText("Image Maximum Width: ");
-               
+
                final Text textWidth = new Text(composite, SWT.BORDER);
                textWidth.setText(openUrlImageMaxWidth);
                textWidth.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-               
+
                textWidth.addModifyListener(new ModifyListener() {
-                       
+
                        public void modifyText(ModifyEvent e) {
                                openUrlImageMaxWidth = textWidth.getText();
                        }
                });
-               
+
                final CLabel labelHeight = new CLabel(composite, SWT.NULL);
                labelHeight.setText("Image Maximum Height: ");
-               
+
                final Text textHeight = new Text(composite, SWT.BORDER);
                textHeight.setText(openUrlImageMaxHeight);
                textHeight.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-               
+
                textHeight.addModifyListener(new ModifyListener() {
-                       
+
                        public void modifyText(ModifyEvent e) {
                                openUrlImageMaxHeight = textHeight.getText();
                        }
@@ -101,32 +109,38 @@ public class MobotOpenUrlPreferences extends PreferencePage implements
        }
 
        private void creatOpenUrlServiceAccessPoint(Composite composite) {
-               openUrlServiceAccessPoint = getPreferenceStore().getString(IPreferenceKeys.OPENURL_ACCESS_POINT);
-               
+               openUrlServiceAccessPoint = getPreferenceStore().getString(
+                               IPreferenceKeys.OPENURL_ACCESS_POINT);
+
                final CLabel label = new CLabel(composite, SWT.NULL);
                label.setText("Mobot Open Url Service Access Point:");
-               
+
                final Text text = new Text(composite, SWT.BORDER);
                text.setText(openUrlServiceAccessPoint);
                text.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-               
+
                text.addModifyListener(new ModifyListener() {
-                       
+
                        public void modifyText(ModifyEvent e) {
                                openUrlServiceAccessPoint = text.getText();
                        }
                });
        }
-       
-       /* (non-Javadoc)
+
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.jface.preference.PreferencePage#performOk()
         */
        @Override
        public boolean performOk() {
-               getPreferenceStore().setValue(IPreferenceKeys.OPENURL_ACCESS_POINT, openUrlServiceAccessPoint);
-               getPreferenceStore().setValue(IPreferenceKeys.OPENURL_IMAGE_MAX_WIDTH, openUrlImageMaxWidth);
-               getPreferenceStore().setValue(IPreferenceKeys.OPENURL_IMAGE_MAX_HEIGHT, openUrlImageMaxHeight);
-               
+               getPreferenceStore().setValue(IPreferenceKeys.OPENURL_ACCESS_POINT,
+                               openUrlServiceAccessPoint);
+               getPreferenceStore().setValue(IPreferenceKeys.OPENURL_IMAGE_MAX_WIDTH,
+                               openUrlImageMaxWidth);
+               getPreferenceStore().setValue(IPreferenceKeys.OPENURL_IMAGE_MAX_HEIGHT,
+                               openUrlImageMaxHeight);
+
                return super.performOk();
        }