]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/SelectionFilter.java
31454b0f36ea298d8d8346247641719f4a5479a1
[simantics/platform.git] / bundles / org.simantics.browsing.ui / src / org / simantics / browsing / ui / SelectionFilter.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.browsing.ui;\r
13 \r
14 /**\r
15  * A SelectionFilter gives a {@link GraphExplorer} client primitive control over\r
16  * what objects the explorer puts into the selections it provides.\r
17  * \r
18  * <p>\r
19  * Normally, a {@link GraphExplorer} selection contains only {@link NodeContext}\r
20  * instances which exist separately for each separate visible UI element, like a\r
21  * tree node. Presenting an implementation of this interface to an explorer will\r
22  * cause the explorer to filter its selected NodeContexts, one by one, through\r
23  * this interface.\r
24  * \r
25  * @author Tuukka Lehtonen\r
26  * \r
27  * @see GraphExplorer#setSelectionFilter(SelectionFilter)\r
28  */\r
29 public interface SelectionFilter {\r
30 \r
31     /**\r
32      * @param context the context to filter\r
33      * @return the filtered object\r
34      */\r
35     Object filter(NodeContext context);\r
36 \r
37 }\r