]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Information.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / modelBrowser / model / Information.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 import java.util.Collections;
16
17 import org.eclipse.jface.resource.ImageDescriptor;
18 import org.simantics.db.ReadGraph;
19 import org.simantics.db.Resource;
20
21 @Deprecated
22 public class Information extends Node {
23
24     String label;
25
26     public Information(Resource resource) {
27         super(resource);
28         this.label = "Pending...";
29     }
30
31     public Information(String label, Resource resource) {
32         super(resource);
33         this.label = label;
34     }
35
36     @Override
37     public String getLabel(ReadGraph g) {
38         return label;
39     }
40
41     @Override
42     public Collection<?> getChildren(ReadGraph g) {
43         return Collections.emptyList();
44     }
45
46     @Override
47     public ImageDescriptor getImage(ReadGraph g) {
48         return null;
49     }
50
51     @SuppressWarnings("unchecked")
52     @Override
53     public Object getAdapter(Class adapter) {
54         // deny adaptability, prevent showing of properties this way.
55         return null;
56     }
57
58 }