Project

General

Profile

Revision 39a72cef

ID39a72cef9ed10a7657a63be3671901675c807f21
Parent 89cdb669
Child bdab9dc8

Added by Patrick Plitzner over 1 year ago

ref #7849 Always show override checkbox in name details admin prefs

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NameDetailsViewConfiguration.java
28 28

  
29 29
    boolean isSimpleDetailsViewActivated;
30 30

  
31
    Composite dbSettings ;
32 31
    boolean isAllowOverride;
33 32
    boolean isShowTaxon;
34 33
    boolean isSecDetailsActivated;
......
48 47
    boolean isShowNameRelationship;
49 48
    boolean isShowHybrid;
50 49
    boolean isShowNameApprobiation;
51
    NameDetailsConfigurator nameDetailsConfig = null;
50
    private NameDetailsConfigurator nameDetailsConfig = null;
52 51

  
53 52
    @Override
54 53
    protected Control createContents(Composite parent) {
......
58 57
        if (nameDetailsConfig == null){
59 58
            nameDetailsConfig = new NameDetailsConfigurator(false);
60 59
        }
60

  
61 61
        final Button activateCheckButton = new Button(parent, SWT.CHECK);
62
        final Button allowLocalPreference = new Button(parent, SWT.CHECK);
63
        Composite dbSettings  = new Composite(parent, SWT.NONE);
64

  
62 65
        activateCheckButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
63 66
        activateCheckButton.setText(Messages.NameDetailsViewConfiguration_activateSimpleDetailsView);
64 67
        isSimpleDetailsViewActivated = nameDetailsConfig.isSimpleDetailsViewActivated();
......
79 82
         });
80 83

  
81 84

  
85
//      boolean isUseLocalPreference = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NAME_DETAILS);
86
        allowLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
87
        isAllowOverride = nameDetailsConfig.isAllowOverride();
88
        allowLocalPreference.setSelection(isAllowOverride);
89
        allowLocalPreference.addSelectionListener(new SelectionAdapter(){
90
            @Override
91
            public void widgetSelected(SelectionEvent e) {
92
                isAllowOverride = allowLocalPreference.getSelection();
93

  
94
            }
95
        });
82 96

  
83
        dbSettings  = new Composite(parent, SWT.NONE);
84 97
        dbSettings.setLayout(new GridLayout());
85 98
        dbSettings.setVisible(isSimpleDetailsViewActivated);
86 99
//       Table table = new Table(dbSettings,SWT.BORDER | SWT.CHECK);
......
89 102
//       TableColumn tableColumnAllowOverride = new TableColumn(table, SWT.CENTER);
90 103

  
91 104

  
92

  
93
        final Button allowLocalPreference = new Button(dbSettings, SWT.CHECK);
94
//      boolean isUseLocalPreference = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NAME_DETAILS);
95
        allowLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
96
        isAllowOverride = nameDetailsConfig.isAllowOverride();
97
        allowLocalPreference.setSelection(isAllowOverride);
98
        allowLocalPreference.addSelectionListener(new SelectionAdapter(){
99
           @Override
100
           public void widgetSelected(SelectionEvent e) {
101
               isAllowOverride = allowLocalPreference.getSelection();
102

  
103
            }
104
        });
105 105
        Label separator= new Label(dbSettings, SWT.HORIZONTAL | SWT.SEPARATOR);
106 106
        separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
107 107
        final Button showTaxon = new Button(dbSettings, SWT.CHECK);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)