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