]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/PropertyHandler.java.keep
Sync git svn branch with SVN repository r33324.
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / handler / PropertyHandler.java.keep
1 /*******************************************************************************\r
2  * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
3  * All rights reserved. This program and the accompanying materials\r
4  * are made available under the terms of the Eclipse Public License v1.0\r
5  * which accompanies this distribution, and is available at\r
6  * http://www.eclipse.org/legal/epl-v10.html\r
7  *\r
8  * Contributors:\r
9  *     VTT Technical Research Centre of Finland - initial API and implementation\r
10  *******************************************************************************/\r
11 package org.simantics.g2d.element.handler;\r
12 \r
13 import java.util.Collection;\r
14 \r
15 import org.simantics.g2d.element.IElement;\r
16 import org.simantics.utils.datastructures.valueinterface.ValueAccess;\r
17 \r
18 /**\r
19  * Handlers public element properties\r
20  * \r
21  * @See {@link PropertyHandlerImpl} default implementation\r
22  * @author Toni Kalajainen\r
23  */\r
24 public interface PropertyHandler extends ElementHandler {\r
25 \r
26         /**\r
27          * Enumerates property keys\r
28          * @param collection adds property keys\r
29          */\r
30         void enumerateProperties(Collection<String> collection);\r
31         \r
32         /**\r
33          * Attach/deattach (=null) value access to this property handler.\r
34          * Though each propertyhandler can be attached only one value access,\r
35          * there can be parallel property handlers. \r
36          *   \r
37          * @param e\r
38          * @param access value access or null (to deattach)\r
39          */\r
40         void setValueSource(IElement e, ValueAccess<String> access);\r
41         \r
42         Object getValue(IElement e, String key);\r
43         \r
44 }\r