]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/UpdateableNode.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / modelBrowser / model / UpdateableNode.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.modeling.ui.modelBrowser.model;
13
14 import java.util.Collection;
15
16 import org.simantics.db.Resource;
17
18 /**
19  * A base implementation for an {@link IUpdateable} {@link INode}.
20  * 
21  * @author Tuukka Lehtonen
22  */
23 @Deprecated
24 public class UpdateableNode extends Node implements IUpdateable {
25
26     private IChildrenCallback childrenUpdater;
27
28     public UpdateableNode(Resource resource) {
29         super(resource);
30     }
31
32     @Override
33     public void setChildrenCallback(IChildrenCallback childrenUpdater) {
34         this.childrenUpdater = childrenUpdater;
35     }
36
37     protected void refreshChildren(Collection<?> newChildren) {
38         if (childrenUpdater != null) {
39             childrenUpdater.refreshChildren(newChildren);
40         }
41     }
42
43 }