Project

General

Profile

« Previous | Next » 

Revision f561b00c

Added by Niels Hoffmann about 13 years ago

Refactoring selection elements so they can be configured

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureSelectionElement.java
1 1
// $Id$
2 2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
3
 * Copyright (C) 2007 EDIT
4
 * European Distributed Institute of Taxonomy 
5
 * http://www.e-taxonomy.eu
6
 * 
7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8
 * See LICENSE.TXT at the top of this package for the full license terms.
9
 */
10 10

  
11 11
package eu.etaxonomy.taxeditor.ui.selection;
12 12

  
......
25 25
 */
26 26
public class FeatureSelectionElement extends AbstractSelectionElement<Feature> {
27 27

  
28
	public static final int DEFAULT = EDITABLE | DELETABLE;
29

  
28 30
	/**
29 31
	 * 
30 32
	 * @param formFactory
......
36 38
	 */
37 39
	public FeatureSelectionElement(CdmFormFactory formFactory,
38 40
			ConversationHolder conversation, ICdmFormElement parentElement,
39
			String labelString, Feature entity, int style) {
41
			String labelString, Feature entity, int mode, int style) {
40 42
		super(formFactory, conversation, parentElement, labelString, entity,
41
				true, false, true, style);
43
				mode, style);
42 44
	}
43 45

  
44
	/* (non-Javadoc)
45
	 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
46
	/*
47
	 * (non-Javadoc)
48
	 * 
49
	 * @see
50
	 * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
51
	 * .events.SelectionEvent)
46 52
	 */
47 53
	@Override
48 54
	public void widgetSelected(SelectionEvent e) {
49
		Feature newSelection = FeatureSelectionDialog.select(getShell(), getConversationHolder(), entity);
55
		Feature newSelection = FeatureSelectionDialog.select(getShell(),
56
				getConversationHolder(), entity);
50 57
		setSelectionInternal(newSelection);
51 58
	}
52 59

  

Also available in: Unified diff