-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.g2d.layers;\r
-\r
-/**\r
- * @author Antti Villberg\r
- */\r
-public interface IEditableLayer extends ILayer {\r
-\r
- String PROP_NAME = "name";\r
-\r
- /**\r
- * \r
- */\r
- public static class LayerChangeEvent {\r
- private final ILayer source;\r
- private final String property;\r
- private final Object oldValue;\r
- private final Object newValue;\r
- public LayerChangeEvent(ILayer source, String property, Object oldValue, Object newValue) {\r
- this.source = source;\r
- this.property = property;\r
- this.oldValue = oldValue;\r
- this.newValue = newValue;\r
- }\r
- public ILayer getSource() {\r
- return source;\r
- }\r
- public String getProperty() {\r
- return property;\r
- }\r
- public Object getOldValue() {\r
- return oldValue;\r
- }\r
- public Object getNewValue() {\r
- return newValue;\r
- }\r
- \r
- }\r
-\r
- /**\r
- * For listening to changes in a layer. For the time being the only thing\r
- * that can change is the name.\r
- */\r
- public interface ILayerListener {\r
- void layerChanged(LayerChangeEvent event);\r
- }\r
-\r
- void setName(String name);\r
-\r
- void addLayerListener(ILayerListener l);\r
- void removeLayerListener(ILayerListener l);\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.g2d.layers;
+
+/**
+ * @author Antti Villberg
+ */
+public interface IEditableLayer extends ILayer {
+
+ String PROP_NAME = "name";
+
+ /**
+ *
+ */
+ public static class LayerChangeEvent {
+ private final ILayer source;
+ private final String property;
+ private final Object oldValue;
+ private final Object newValue;
+ public LayerChangeEvent(ILayer source, String property, Object oldValue, Object newValue) {
+ this.source = source;
+ this.property = property;
+ this.oldValue = oldValue;
+ this.newValue = newValue;
+ }
+ public ILayer getSource() {
+ return source;
+ }
+ public String getProperty() {
+ return property;
+ }
+ public Object getOldValue() {
+ return oldValue;
+ }
+ public Object getNewValue() {
+ return newValue;
+ }
+
+ }
+
+ /**
+ * For listening to changes in a layer. For the time being the only thing
+ * that can change is the name.
+ */
+ public interface ILayerListener {
+ void layerChanged(LayerChangeEvent event);
+ }
+
+ void setName(String name);
+
+ void addLayerListener(ILayerListener l);
+ void removeLayerListener(ILayerListener l);
+
+}