Project

General

Profile

Revision a6c5a604

IDa6c5a604d6cb798cc9a03096c2492428ee3f28e5
Parent 326dab64
Child ef85d9e0

Added by Katja Luther almost 3 years ago

better structure for external services pref page

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ExternalServicesPreferences.java
10 10

  
11 11
import org.eclipse.jface.preference.IntegerFieldEditor;
12 12
import org.eclipse.jface.preference.StringFieldEditor;
13
import org.eclipse.swt.SWT;
14
import org.eclipse.swt.layout.GridData;
15
import org.eclipse.swt.widgets.Composite;
16
import org.eclipse.swt.widgets.Control;
17
import org.eclipse.swt.widgets.Label;
13 18

  
14 19
import eu.etaxonomy.taxeditor.databaseAdmin.wizard.SpacerFieldEditor;
15 20
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
......
21 26
 */
22 27
public class ExternalServicesPreferences extends FieldEditorPreferencePageE4 {
23 28

  
29
    StringFieldEditor openUrl;
30
    IntegerFieldEditor maxWidth;
31
    IntegerFieldEditor maxHeight;
32

  
33
    StringFieldEditor mapService;
34

  
35

  
24 36
    /**
25 37
     * {@inheritDoc}
26 38
     */
......
46 58

  
47 59
    }
48 60

  
61

  
62

  
63

  
64
    @Override
65
    protected Control createContents(Composite parent) {
66
       Composite top = new Composite(parent, SWT.LEFT);
67
       GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
68

  
69
       top.setLayoutData(gridData);
70
       Label mobot = new Label(top, SWT.NULL);
71
       mobot.setText("Mobot Open Url Service");
72
       GridData gridDataLabel = new GridData(GridData.FILL_HORIZONTAL);
73
       gridDataLabel.horizontalSpan=2;
74
       mobot.setLayoutData(gridDataLabel);
75
       openUrl = new StringFieldEditor(PreferencesUtil.createPreferenceString(IPreferenceKeys.OPENURL_ACCESS_POINT),
76
               "Access Point:", top);
77
       openUrl.setPreferenceStore(getPreferenceStore());
78
       openUrl.load();
79
       Label reference = new Label(top, SWT.NULL);
80
       reference.setText("BHL Reference Image");
81

  
82
       reference.setLayoutData(gridDataLabel);
83
       maxWidth = new IntegerFieldEditor(
84
               PreferencesUtil.createPreferenceString(IPreferenceKeys.OPENURL_IMAGE_MAX_WIDTH),
85
               "Maximum Width",
86
               top);
87
       maxWidth.setPreferenceStore(getPreferenceStore());
88
       maxWidth.load();
89

  
90
       maxHeight = new IntegerFieldEditor(
91
               PreferencesUtil.createPreferenceString(IPreferenceKeys.OPENURL_IMAGE_MAX_HEIGHT),
92
               "Maximum Height",
93
               top);
94
       maxHeight.setPreferenceStore(getPreferenceStore());
95
       maxHeight.load();
96
       Label mapServiceLabel = new Label(top, SWT.NULL);
97
       mapServiceLabel.setText("EDIT Map Service:");
98
       mapServiceLabel.setLayoutData(gridDataLabel);
99
       mapService = new StringFieldEditor(PreferencesUtil.createPreferenceString(
100
               IPreferenceKeys.EDIT_MAP_SERVICE_ACCES_POINT),
101
               "Access Point", top);
102
       mapService.setPreferenceStore(getPreferenceStore());
103
       mapService.load();
104
       return top;
105

  
106
    }
107

  
108

  
49 109
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)