]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/INode.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / modelBrowser / model / INode.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.eclipse.core.runtime.IAdaptable;
17 import org.eclipse.jface.resource.ImageDescriptor;
18 import org.eclipse.jface.viewers.ISelection;
19 import org.simantics.browsing.ui.common.node.IDeletable;
20 import org.simantics.browsing.ui.common.node.IModifiable;
21 import org.simantics.browsing.ui.common.node.IRefreshable;
22 import org.simantics.browsing.ui.content.Labeler.Modifier;
23 import org.simantics.db.ReadGraph;
24 import org.simantics.db.Session;
25 import org.simantics.db.WriteGraph;
26 import org.simantics.db.exception.DatabaseException;
27
28 /**
29  * INode represents a node in the graph based object model.
30  * 
31  * @see IDeletable
32  * @see IModifiable
33  * @see IRefreshable
34  * @see IOpenable
35  * 
36  * @deprecated <a href="https://www.simantics.org/wiki/index.php/Org.simantics.browsing.ui_Manual">See tutorial for new features</a>
37  */
38 @Deprecated
39 public interface INode extends IAdaptable {
40     String getLabel(ReadGraph graph) throws DatabaseException;
41     int getCategory(ReadGraph graph) throws DatabaseException;
42     Collection<?> getChildren(ReadGraph graph) throws DatabaseException;
43     boolean hasChildren(ReadGraph graph) throws DatabaseException;
44     ImageDescriptor getImage(ReadGraph graph) throws DatabaseException;
45     void handleDrop(Session session, ISelection selection);
46     Modifier getModifier(Session session, String columnId);
47
48     /**
49      * Delete node in the background system. The node is considered deletable
50      * only if it implements {@link IDeletable}.
51      */
52     void handleDelete(WriteGraph graph) throws DatabaseException;
53 }