001/*****************************************************************************
002 * Copyright by The HDF Group.                                               *
003 * Copyright by the Board of Trustees of the University of Illinois.         *
004 * All rights reserved.                                                      *
005 *                                                                           *
006 * This file is part of the HDF Java Products distribution.                  *
007 * The full copyright notice, including terms governing use, modification,   *
008 * and redistribution, is contained in the files COPYING and Copyright.html. *
009 * COPYING can be found at the root of the source code distribution tree.    *
010 * Or, see https://support.hdfgroup.org/products/licenses.html               *
011 * If you do not have access to either file, you may request a copy from     *
012 * help@hdfgroup.org.                                                        *
013 ****************************************************************************/
014
015package hdf.view.dialog;
016
017import java.awt.GraphicsEnvironment;
018import java.io.File;
019
020import org.eclipse.swt.SWT;
021import org.eclipse.swt.events.SelectionAdapter;
022import org.eclipse.swt.events.SelectionEvent;
023import org.eclipse.swt.graphics.Font;
024import org.eclipse.swt.layout.GridData;
025import org.eclipse.swt.layout.GridLayout;
026import org.eclipse.swt.widgets.Button;
027import org.eclipse.swt.widgets.Combo;
028import org.eclipse.swt.widgets.Composite;
029import org.eclipse.swt.widgets.Control;
030import org.eclipse.swt.widgets.DirectoryDialog;
031import org.eclipse.swt.widgets.Display;
032import org.eclipse.swt.widgets.FileDialog;
033import org.eclipse.swt.widgets.Label;
034import org.eclipse.swt.widgets.Text;
035
036import hdf.view.Tools;
037import hdf.view.ViewProperties;
038
039/**
040 * UserOptionsGeneralPage.java - Configuration page for general application settings.
041 */
042public class UserOptionsGeneralPage extends UserOptionsDefaultPage {
043    private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(UserOptionsGeneralPage.class);
044
045    private Text UGField, workField, maxMemberField, startMemberField;
046
047    private Combo fontSizeChoice, fontTypeChoice, delimiterChoice, imageOriginChoice, indexBaseChoice;
048
049    private Button checkCurrentUserDir, checkUserHomeDir, checkAutoContrast, checkShowValues;
050    private Button currentDirButton, userHomeButton, rwButton, helpButton;
051    private Button checkReadOnly, checkReadAll;
052
053    private boolean isFontChanged;
054    private boolean isUserGuideChanged;
055    private boolean isWorkDirChanged;
056
057    private String workDir;
058
059    private static String fontname;
060
061    public UserOptionsGeneralPage() {
062        super("General Settings");
063        isFontChanged = false;
064        isUserGuideChanged = false;
065        isWorkDirChanged = false;
066    }
067
068    /**
069     * Performs special processing when this page's Defaults button has been pressed.
070     */
071    @Override
072    public void performDefaults() {
073        super.performDefaults();
074    }
075
076    /**
077     * Notifies that the OK button of this page's container has been pressed.
078     *
079     * @return <code>false</code> to abort the container's OK processing and
080     * <code>true</code> to allow the OK to happen
081     */
082    @Override
083    public boolean performOk() {
084        getPreferenceStore();
085
086        if (UGField != null) {
087            String UGPath = UGField.getText();
088            if ((UGPath != null) && (UGPath.length() > 0)) {
089                UGPath = UGPath.trim();
090                isUserGuideChanged = !UGPath.equals(ViewProperties.getUsersGuide());
091                ViewProperties.setUsersGuide(UGPath);
092            }
093        }
094
095        if (workField != null) {
096            String workPath = workField.getText();
097            if (checkCurrentUserDir.getSelection())
098                workPath = System.getProperty("user.dir");
099            else if (checkUserHomeDir.getSelection())
100                workPath = System.getProperty("user.home");
101
102            if ((workPath != null) && (workPath.length() > 0)) {
103                workPath = workPath.trim();
104                isWorkDirChanged = !workPath.equals(ViewProperties.getWorkDir());
105                ViewProperties.setWorkDir(workPath);
106            }
107        }
108
109        // set font size and type
110        try {
111            if (fontTypeChoice != null) {
112                String ftype = fontTypeChoice.getItem(fontTypeChoice.getSelectionIndex());
113                int fsize = Integer.parseInt(fontSizeChoice.getItem(fontSizeChoice.getSelectionIndex()));
114                log.trace("performOk: save font options {} - {}", ftype, fsize);
115
116                if (ViewProperties.getFontSize() != fsize) {
117                    ViewProperties.setFontSize(fsize);
118                    isFontChanged = true;
119                    log.trace("performOk: props font size {}", ViewProperties.getFontSize());
120                }
121
122                if (!ftype.equalsIgnoreCase(ViewProperties.getFontType())) {
123                    ViewProperties.setFontType(ftype);
124                    isFontChanged = true;
125                    log.trace("performOk: props font {}", ViewProperties.getFontType());
126                }
127            }
128        }
129        catch (Exception ex) {
130            isFontChanged = false;
131        }
132
133        // set file access
134        if (checkReadOnly != null) {
135            if (checkReadOnly.getSelection())
136                ViewProperties.setReadOnly(true);
137            else
138                ViewProperties.setReadOnly(false);
139        }
140
141        // set data delimiter
142        if (delimiterChoice != null)
143            ViewProperties.setDataDelimiter(delimiterChoice.getItem(delimiterChoice.getSelectionIndex()));
144        if (imageOriginChoice != null)
145            ViewProperties.setImageOrigin(imageOriginChoice.getItem(imageOriginChoice.getSelectionIndex()));
146
147        if (checkReadAll != null) {
148            if (checkReadAll.getSelection()) {
149                ViewProperties.setStartMembers(0);
150                ViewProperties.setMaxMembers(-1);
151            }
152            else {
153                try {
154                    int maxsize = Integer.parseInt(maxMemberField.getText());
155                    ViewProperties.setMaxMembers(maxsize);
156                }
157                catch (Exception ex) {
158                }
159
160                try {
161                    int startsize = Integer.parseInt(startMemberField.getText());
162                    ViewProperties.setStartMembers(startsize);
163                }
164                catch (Exception ex) {
165                }
166            }
167        }
168
169        if (checkAutoContrast != null)
170            ViewProperties.setAutoContrast(checkAutoContrast.getSelection());
171        if (checkShowValues != null)
172            ViewProperties.setShowImageValue(checkShowValues.getSelection());
173
174        if (indexBaseChoice != null) {
175            if (indexBaseChoice.getSelectionIndex() == 0)
176                ViewProperties.setIndexBase1(false);
177            else
178                ViewProperties.setIndexBase1(true);
179        }
180
181        return true;
182    }
183
184    public boolean isFontChanged() {
185        return isFontChanged;
186    }
187
188    public boolean isUserGuideChanged() {
189        return isUserGuideChanged;
190    }
191
192    public boolean isWorkDirChanged() {
193        return isWorkDirChanged;
194    }
195
196    /**
197     * Loads all stored values in the <code>FieldEditor</code>s.
198     */
199    protected void load() {
200        getPreferenceStore();
201
202        try {
203            curFont = new Font(
204                    Display.getCurrent(),
205                    ViewProperties.getFontType(),
206                    ViewProperties.getFontSize(),
207                    SWT.NORMAL);
208        }
209        catch (Exception ex) {
210            curFont = null;
211        }
212
213        workDir = ViewProperties.getWorkDir();
214        if (workDir == null)
215            workDir = rootDir;
216
217        workField.setText(workDir);
218
219        if (workDir.equals(System.getProperty("user.dir"))) {
220            checkCurrentUserDir.setSelection(true);
221            checkUserHomeDir.setSelection(false);
222            workField.setEnabled(false);
223        }
224        else if (workDir.equals(System.getProperty("user.home"))) {
225            checkCurrentUserDir.setSelection(false);
226            checkUserHomeDir.setSelection(true);
227            workField.setEnabled(false);
228        }
229        else {
230            checkCurrentUserDir.setSelection(false);
231            checkUserHomeDir.setSelection(false);
232            workField.setEnabled(true);
233        }
234
235        log.trace("UserOptionsGeneralPage: workDir={}", workDir);
236
237        UGField.setText(ViewProperties.getUsersGuide());
238
239        checkReadOnly.setSelection(ViewProperties.isReadOnly());
240
241        rwButton.setSelection(!ViewProperties.isReadOnly());
242
243        String fontsize = String.valueOf(ViewProperties.getFontSize());
244        log.trace("performOk: load General options fontsize={}", fontsize);
245        try {
246            int selectionIndex = fontSizeChoice.indexOf(fontsize);
247            fontSizeChoice.select(selectionIndex);
248        }
249        catch (Exception ex) {
250            fontSizeChoice.select(0);
251        }
252
253        fontname = ViewProperties.getFontType();
254        log.trace("performOk: load General options fontname={}", fontname);
255        try {
256            int selectionIndex = fontTypeChoice.indexOf(fontname);
257            fontTypeChoice.select(selectionIndex);
258        }
259        catch (Exception ex) {
260            String sysFontName = Display.getDefault().getSystemFont().getFontData()[0].getName();
261
262            try {
263                int selectionIndex = fontTypeChoice.indexOf(sysFontName);
264                fontTypeChoice.select(selectionIndex);
265            }
266            catch (Exception ex2) {
267                fontTypeChoice.select(0);
268            }
269        }
270
271        checkAutoContrast.setSelection(ViewProperties.isAutoContrast());
272
273        checkShowValues.setSelection(ViewProperties.showImageValues());
274
275        String[] imageOriginChoices = { ViewProperties.ORIGIN_UL, ViewProperties.ORIGIN_LL, ViewProperties.ORIGIN_UR,
276                ViewProperties.ORIGIN_LR };
277        imageOriginChoice.setItems(imageOriginChoices);
278
279        try {
280            int selectionIndex = imageOriginChoice.indexOf(ViewProperties.getImageOrigin());
281            imageOriginChoice.select(selectionIndex);
282        }
283        catch (Exception ex) {
284            imageOriginChoice.select(0);
285        }
286
287        //        helpButton.setImage(ViewProperties.getHelpIcon());
288
289        if (ViewProperties.isIndexBase1())
290            indexBaseChoice.select(1);
291        else
292            indexBaseChoice.select(0);
293
294        String[] delimiterChoices = { ViewProperties.DELIMITER_TAB, ViewProperties.DELIMITER_COMMA,
295                ViewProperties.DELIMITER_SPACE, ViewProperties.DELIMITER_COLON, ViewProperties.DELIMITER_SEMI_COLON };
296        delimiterChoice.setItems(delimiterChoices);
297
298        try {
299            int selectionIndex = delimiterChoice.indexOf(ViewProperties.getDataDelimiter());
300            delimiterChoice.select(selectionIndex);
301        }
302        catch (Exception ex) {
303            delimiterChoice.select(0);
304        }
305
306        int nMax = ViewProperties.getMaxMembers();
307        checkReadAll.setSelection((nMax<=0) || (nMax==Integer.MAX_VALUE));
308
309        startMemberField.setText(String.valueOf(ViewProperties.getStartMembers()));
310
311        maxMemberField.setText(String.valueOf(ViewProperties.getMaxMembers()));
312    }
313
314    /**
315     * Creates and returns the SWT control for the customized body of this
316     * preference page under the given parent composite.
317     *
318     * @param parent the parent composite
319     * @return the new control
320     */
321    @Override
322    protected Control createContents(Composite parent) {
323        shell = parent.getShell();
324        Composite composite = new Composite(parent, SWT.NONE);
325        composite.setLayout(new GridLayout());
326
327        org.eclipse.swt.widgets.Group workingDirectoryGroup = new org.eclipse.swt.widgets.Group(composite, SWT.NONE);
328        workingDirectoryGroup.setLayout(new GridLayout(3, false));
329        workingDirectoryGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
330        workingDirectoryGroup.setFont(curFont);
331        workingDirectoryGroup.setText("Default Working Directory");
332
333        checkCurrentUserDir = new Button(workingDirectoryGroup, SWT.CHECK);
334        checkCurrentUserDir.setFont(curFont);
335        checkCurrentUserDir.setText("\"User Work\" or");
336        checkCurrentUserDir.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
337        checkCurrentUserDir.addSelectionListener(new SelectionAdapter() {
338            @Override
339            public void widgetSelected(SelectionEvent e) {
340                boolean isCheckCurrentUserDirSelected = checkCurrentUserDir.getSelection();
341                if (isCheckCurrentUserDirSelected)
342                    checkUserHomeDir.setSelection(false);
343                workField.setEnabled(!isCheckCurrentUserDirSelected);
344                currentDirButton.setEnabled(!isCheckCurrentUserDirSelected);
345            }
346        });
347
348        checkUserHomeDir = new Button(workingDirectoryGroup, SWT.CHECK);
349        checkUserHomeDir.setFont(curFont);
350        checkUserHomeDir.setText("\"User Home\" or");
351        checkUserHomeDir.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
352        checkUserHomeDir.addSelectionListener(new SelectionAdapter() {
353            @Override
354            public void widgetSelected(SelectionEvent e) {
355                boolean isCheckUserHomeDirSelected = checkUserHomeDir.getSelection();
356                if (isCheckUserHomeDirSelected)
357                    checkCurrentUserDir.setSelection(false);
358                workField.setEnabled(!isCheckUserHomeDirSelected);
359                currentDirButton.setEnabled(!isCheckUserHomeDirSelected);
360            }
361        });
362
363        workField = new Text(workingDirectoryGroup, SWT.SINGLE | SWT.BORDER);
364        workField.setFont(curFont);
365        workField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
366
367        currentDirButton = new Button(workingDirectoryGroup, SWT.PUSH);
368        currentDirButton.setFont(curFont);
369        currentDirButton.setText("Browse...");
370        currentDirButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
371        currentDirButton.addSelectionListener(new SelectionAdapter() {
372            @Override
373            public void widgetSelected(SelectionEvent e) {
374                final DirectoryDialog dChooser = new DirectoryDialog(shell);
375                dChooser.setFilterPath(workDir);
376                dChooser.setText("Select a Directory");
377
378                String dir = dChooser.open();
379
380                if(dir == null) return;
381
382                workField.setText(dir);
383            }
384        });
385
386        org.eclipse.swt.widgets.Group helpDocumentGroup = new org.eclipse.swt.widgets.Group(composite, SWT.NONE);
387        helpDocumentGroup.setLayout(new GridLayout(3, false));
388        helpDocumentGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
389        helpDocumentGroup.setFont(curFont);
390        helpDocumentGroup.setText("Help Document");
391
392        Label label = new Label(helpDocumentGroup, SWT.RIGHT);
393        label.setFont(curFont);
394        label.setText("User's Guide:  ");
395
396        UGField = new Text(helpDocumentGroup, SWT.SINGLE | SWT.BORDER);
397        UGField.setFont(curFont);
398        UGField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
399
400        Button browseButton = new Button(helpDocumentGroup, SWT.PUSH);
401        browseButton.setFont(curFont);
402        browseButton.setText("Browse...");
403        browseButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
404        browseButton.addSelectionListener(new SelectionAdapter() {
405            @Override
406            public void widgetSelected(SelectionEvent e) {
407                final FileDialog fChooser = new FileDialog(shell, SWT.OPEN);
408                fChooser.setFilterPath(rootDir);
409                fChooser.setFilterExtensions(new String[] {"*"});
410                fChooser.setFilterNames(new String[] {"All Files"});
411                fChooser.setFilterIndex(0);
412
413                if(fChooser.open() == null) {
414                    return;
415                }
416
417                File chosenFile = new File(fChooser.getFilterPath() + File.separator + fChooser.getFileName());
418
419                if(!chosenFile.exists()) {
420                    // Give an error
421                    return;
422                }
423
424                UGField.setText(chosenFile.getAbsolutePath());
425            }
426        });
427
428        org.eclipse.swt.widgets.Group fileAccessModeGroup = new org.eclipse.swt.widgets.Group(composite, SWT.NONE);
429        fileAccessModeGroup.setLayout(new GridLayout(2, true));
430        fileAccessModeGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
431        fileAccessModeGroup.setFont(curFont);
432        fileAccessModeGroup.setText("Default File Access Mode");
433
434        checkReadOnly = new Button(fileAccessModeGroup, SWT.RADIO);
435        checkReadOnly.setFont(curFont);
436        checkReadOnly.setText("Read Only");
437        checkReadOnly.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, false, false));
438
439        rwButton = new Button(fileAccessModeGroup, SWT.RADIO);
440        rwButton.setFont(curFont);
441        rwButton.setText("Read/Write");
442        rwButton.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, false, false));
443
444        org.eclipse.swt.widgets.Group textFontGroup = new org.eclipse.swt.widgets.Group(composite, SWT.NONE);
445        textFontGroup.setLayout(new GridLayout(4, false));
446        textFontGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
447        textFontGroup.setFont(curFont);
448        textFontGroup.setText("Text Font");
449
450        label = new Label(textFontGroup, SWT.RIGHT);
451        label.setFont(curFont);
452        label.setText("Font Size: ");
453
454        String[] fontSizeChoices = { "8", "10", "12", "14", "16", "18", "20", "22", "24", "26", "28", "30", "32", "34", "36", "48" };
455        fontSizeChoice = new Combo(textFontGroup, SWT.SINGLE | SWT.READ_ONLY);
456        fontSizeChoice.setFont(curFont);
457        fontSizeChoice.setItems(fontSizeChoices);
458        fontSizeChoice.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
459
460        label = new Label(textFontGroup, SWT.RIGHT);
461        label.setFont(curFont);
462        label.setText("Font Type: ");
463
464        String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
465
466        fontTypeChoice = new Combo(textFontGroup, SWT.SINGLE | SWT.READ_ONLY);
467        fontTypeChoice.setFont(curFont);
468        fontTypeChoice.setItems(fontNames);
469        fontTypeChoice.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
470
471        org.eclipse.swt.widgets.Group imageGroup = new org.eclipse.swt.widgets.Group(composite, SWT.NONE);
472        imageGroup.setLayout(new GridLayout(5, false));
473        imageGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
474        imageGroup.setFont(curFont);
475        imageGroup.setText("Image");
476
477        helpButton = new Button(imageGroup, SWT.PUSH);
478        helpButton.setImage(ViewProperties.getHelpIcon());
479        helpButton.setToolTipText("Help on Auto Contrast");
480        helpButton.addSelectionListener(new SelectionAdapter() {
481            @Override
482            public void widgetSelected(SelectionEvent e) {
483                final String msg = "Auto Contrast does the following to compute a gain/bias \n"
484                        + "that will stretch the pixels in the image to fit the pixel \n"
485                        + "values of the graphics system. For example, it stretches unsigned\n"
486                        + "short data to fit the full range of an unsigned short. Later \n"
487                        + "code simply takes the high order byte and passes it to the graphics\n"
488                        + "system (which expects 0-255). It uses some statistics on the pixels \n"
489                        + "to prevent outliers from throwing off the gain/bias calculations much.\n\n"
490                        + "To compute the gain/bias we... \n"
491                        + "Find the mean and std. deviation of the pixels in the image \n" + "min = mean - 3 * std.dev. \n"
492                        + "max = mean + 3 * std.dev. \n" + "small fudge factor because this tends to overshoot a bit \n"
493                        + "Stretch to 0-USHRT_MAX \n" + "        gain = USHRT_MAX / (max-min) \n"
494                        + "        bias = -min \n" + "\n" + "To apply the gain/bias to a pixel, use the formula \n"
495                        + "data[i] = (data[i] + bias) * gain \n" + "\n"
496                        // +
497                        // "Finally, for auto-ranging the sliders for gain/bias, we do the following \n"
498                        // + "gain_min = 0 \n"
499                        // + "gain_max = gain * 3.0 \n"
500                        // + "bias_min = -fabs(bias) * 3.0 \n"
501                        // + "bias_max = fabs(bias) * 3.0 \n"
502                        + "\n\n";
503
504                Tools.showInformation(getShell(), "Help", msg);
505            }
506        });
507
508        checkAutoContrast = new Button(imageGroup, SWT.CHECK);
509        checkAutoContrast.setFont(curFont);
510        checkAutoContrast.setText("Autogain Image Contrast");
511        checkAutoContrast.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
512
513        checkShowValues = new Button(imageGroup, SWT.CHECK);
514        checkShowValues.setFont(curFont);
515        checkShowValues.setText("Show Values");
516        checkShowValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
517
518        label = new Label(imageGroup, SWT.RIGHT);
519        label.setFont(curFont);
520        label.setText("Image Origin: ");
521
522        imageOriginChoice = new Combo(imageGroup, SWT.SINGLE | SWT.READ_ONLY);
523        imageOriginChoice.setFont(curFont);
524        imageOriginChoice.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
525
526        org.eclipse.swt.widgets.Group dataGroup = new org.eclipse.swt.widgets.Group(composite, SWT.NONE);
527        dataGroup.setLayout(new GridLayout(4, false));
528        dataGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
529        dataGroup.setFont(curFont);
530        dataGroup.setText("Data");
531
532        label = new Label(dataGroup, SWT.RIGHT);
533        label.setFont(curFont);
534        label.setText("Index Base: ");
535
536        String[] indexBaseChoices = { "0-based", "1-based" };
537        indexBaseChoice = new Combo(dataGroup, SWT.SINGLE | SWT.READ_ONLY);
538        indexBaseChoice.setFont(curFont);
539        indexBaseChoice.setItems(indexBaseChoices);
540        indexBaseChoice.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
541
542        Label delimLabel = new Label(dataGroup, SWT.RIGHT);
543        delimLabel.setFont(curFont);
544        delimLabel.setText("Data Delimiter: ");
545        delimLabel.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
546
547        delimiterChoice = new Combo(dataGroup, SWT.SINGLE | SWT.READ_ONLY);
548        delimiterChoice.setFont(curFont);
549        delimiterChoice.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
550
551        org.eclipse.swt.widgets.Group objectsGroup = new org.eclipse.swt.widgets.Group(composite, SWT.NONE);
552        objectsGroup.setLayout(new GridLayout(5, true));
553        objectsGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
554        objectsGroup.setFont(curFont);
555        objectsGroup.setText("Objects to Open");
556
557        checkReadAll = new Button(objectsGroup, SWT.CHECK);
558        checkReadAll.setFont(curFont);
559        checkReadAll.setText("Open All");
560        checkReadAll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
561        checkReadAll.addSelectionListener(new SelectionAdapter() {
562            @Override
563            public void widgetSelected(SelectionEvent e) {
564                startMemberField.setEnabled(!checkReadAll.getSelection());
565                maxMemberField.setEnabled(!checkReadAll.getSelection());
566            }
567        });
568
569        label = new Label(objectsGroup, SWT.RIGHT);
570        label.setFont(curFont);
571        label.setText("Start Member: ");
572
573        startMemberField = new Text(objectsGroup, SWT.SINGLE | SWT.BORDER);
574        startMemberField.setFont(curFont);
575        startMemberField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
576
577        label = new Label(objectsGroup, SWT.RIGHT);
578        label.setFont(curFont);
579        label.setText("Member Count: ");
580
581        maxMemberField = new Text(objectsGroup, SWT.SINGLE | SWT.BORDER);
582        maxMemberField.setFont(curFont);
583        maxMemberField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
584
585        startMemberField.setEnabled(!checkReadAll.getSelection());
586        maxMemberField.setEnabled(!checkReadAll.getSelection());
587
588        load();
589        // return scroller;
590        return composite;
591    }
592}