]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/DataNode.java
G2DParentNode handles "undefined" child bounds separately
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / nodes / DataNode.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.scenegraph.g2d.nodes;
13
14 import java.awt.Graphics2D;
15 import java.awt.geom.Rectangle2D;
16
17 import org.simantics.scenegraph.ILookupService;
18 import org.simantics.scenegraph.g2d.G2DParentNode;
19 import org.simantics.scenegraph.g2d.G2DSceneGraph;
20
21 /**
22  * A non-renderable parent node for the 2D scene graph ({@link G2DSceneGraph}).
23  * Does not perform any child rendering, but is meant for storing static/shared
24  * data inside a scene graph and making it referable through
25  * {@link ILookupService}.
26  * 
27  * @author Tuukka Lehtonen
28  */
29 public class DataNode extends G2DParentNode {
30
31     private static final long serialVersionUID = 6008781343639770034L;
32
33     @Override
34     public void render(Graphics2D g2d) {
35         // This node is meant to prevent rendering anything under it.
36     }
37
38     @Override
39     public Rectangle2D getBoundsInLocal() {
40         return null;
41     }
42
43 }