Project

General

Profile

« Previous | Next » 

Revision 3e02c1a5

Added by Katja Luther almost 7 years ago

minor changes in admin name details view configuration

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/NameDetailsViewComposite.java
12 12
import org.eclipse.swt.SWT;
13 13
import org.eclipse.swt.events.SelectionAdapter;
14 14
import org.eclipse.swt.events.SelectionEvent;
15
import org.eclipse.swt.layout.GridData;
15 16
import org.eclipse.swt.layout.GridLayout;
16 17
import org.eclipse.swt.widgets.Button;
17 18
import org.eclipse.swt.widgets.Composite;
......
43 44
    boolean isShowProtologue;
44 45
    boolean isShowTypeDesignation;
45 46
    boolean isShowNameRelationship;
47
    boolean isShowHybrid;
46 48
    Composite child;
47 49

  
48 50
    public NameDetailsViewComposite(Composite parent, int style, NameDetailsConfigurator config){
49 51

  
50
        super(parent, style);
52
        super(parent, SWT.NONE);
51 53
//        TabItem tbtmNameDetailsConfiguration = new TabItem(tabFolder, SWT.NONE);
52 54
//        Composite c2 = new Composite(tabFolder, SWT.BORDER);
53 55
//        c2.setLayout(new GridLayout(1, true));
......
56 58
       this.config = config;
57 59

  
58 60
      // Composite composite = new Composite(parent, SWT.NULL);
61
       
59 62
       this.setLayout(new GridLayout());
60

  
61 63
       isSimpleDetailsViewActivated= PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
62 64
       final Button activateCheckButton = new Button(this, SWT.CHECK);
65
       activateCheckButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
63 66
       activateCheckButton.setText("Show only a simple name details view");
64 67
       activateCheckButton.setSelection(isSimpleDetailsViewActivated);
65 68
       activateCheckButton.addSelectionListener(new SelectionAdapter(){
......
78 81
        });
79 82

  
80 83
       child = new Composite(this, SWT.NULL);
84
      
81 85
       child.setLayout(new GridLayout());
82 86
       child.setVisible(isSimpleDetailsViewActivated);
83 87

  
......
246 250

  
247 251
             }
248 252
        });
253
       
254
       final Button showHybrid = new Button(child, SWT.CHECK);
255
       isShowHybrid = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID);
256
       showHybrid.setText("Show hybrid section");
257
       showHybrid.setSelection(isShowHybrid);
258
       showHybrid.addSelectionListener(new SelectionAdapter(){
259
            @Override
260
            public void widgetSelected(SelectionEvent e) {
261
                isShowHybrid = showHybrid.getSelection();
262

  
263
             }
264
        });
265
       this.redraw();
249 266

  
250 267
       if(isSimpleDetailsViewActivated){
251 268
           child.setEnabled(true);
......
276 293
      config.setSimpleDetailsViewActivated(doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION));
277 294
      config.setTaxonSectionActivated(doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON));
278 295
      config.setTypeDesignationSectionActivated(doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION));
296
      config.setHybridActivated(doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID));
279 297
      return config;
280 298
   }
281 299

  
......
310 328
                isShowTypeDesignation);
311 329
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP,
312 330
                isShowNameRelationship);
331
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID,
332
                isShowHybrid);
313 333

  
314 334
    }
315 335

  

Also available in: Unified diff