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