Project

General

Profile

Download (1.31 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2014 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
package eu.etaxonomy.taxeditor.editor.view.derivate;
11

    
12
import org.eclipse.jface.viewers.ISelection;
13

    
14
/**
15
 * Wrapper for {@link ISelection} which additionally holds a
16
 * reference to the {@link DerivateView}
17
 * @author pplitzner
18
 * @date 14.05.2014
19
 *
20
 */
21
public class DerivateViewSelection implements ISelection {
22

    
23
    private final ISelection selection;
24
    private final DerivateView derivateView;
25

    
26
    /**
27
     * @param selection
28
     * @param derivateView
29
     */
30
    public DerivateViewSelection(ISelection selection, DerivateView derivateView) {
31
        super();
32
        this.selection = selection;
33
        this.derivateView = derivateView;
34
    }
35

    
36
    /**
37
     * @return the selection
38
     */
39
    public ISelection getSelection() {
40
        return selection;
41
    }
42

    
43
    /**
44
     * @return the derivateView
45
     */
46
    public DerivateView getDerivateView() {
47
        return derivateView;
48
    }
49

    
50
    /* (non-Javadoc)
51
     * @see org.eclipse.jface.viewers.ISelection#isEmpty()
52
     */
53
    @Override
54
    public boolean isEmpty() {
55
        return selection.isEmpty();
56
    }
57

    
58
}
(5-5/5)