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
9 * VTT Technical Research Centre of Finland - initial API and implementation
10 *******************************************************************************/
11 package org.simantics.g2d.element.handler;
13 import java.util.Collection;
15 import org.simantics.g2d.element.IElement;
16 import org.simantics.utils.datastructures.valueinterface.ValueAccess;
19 * Handlers public element properties
21 * @See {@link PropertyHandlerImpl} default implementation
22 * @author Toni Kalajainen
24 public interface PropertyHandler extends ElementHandler {
27 * Enumerates property keys
28 * @param collection adds property keys
30 void enumerateProperties(Collection<String> collection);
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.
38 * @param access value access or null (to deattach)
40 void setValueSource(IElement e, ValueAccess<String> access);
42 Object getValue(IElement e, String key);