]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DRenderingHints.java
Merge commit 'bd5bc6e45f700e755b61bd112631796631330ecb'
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / G2DRenderingHints.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.scenegraph.g2d;\r
13 \r
14 import java.awt.Component;\r
15 import java.awt.RenderingHints.Key;\r
16 import java.awt.geom.Rectangle2D;\r
17 \r
18 /**\r
19  * @author Tuukka Lehtonen\r
20  * See {@link G2DPDFRenderingHints}\r
21  */\r
22 public final class G2DRenderingHints {\r
23 \r
24     /**\r
25      * A rendering hint for storing the boundaries of the control area within a\r
26      * Graphics2D instance.\r
27      */\r
28     public static final Key KEY_CONTROL_BOUNDS = new Key(1000) {\r
29         @Override\r
30         public boolean isCompatibleValue(Object val) {\r
31             return val instanceof Rectangle2D;\r
32         }\r
33     };\r
34 \r
35     /**\r
36      * A rendering hint for storing the root AWT Component on which the scene\r
37      * graph is rendered within a Graphics2D instance.\r
38      */\r
39     public static final Key KEY_COMPONENT      = new Key(1001) {\r
40         @Override\r
41         public boolean isCompatibleValue(Object val) {\r
42             return val instanceof Component;\r
43         }\r
44     };\r
45 \r
46 }