--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2011 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.trend.impl;\r
+\r
+import java.awt.AlphaComposite;\r
+import java.awt.Color;\r
+import java.awt.Composite;\r
+import java.awt.Graphics2D;\r
+\r
+public class TooltipNode extends TrendGraphicalNode {\r
+\r
+ private static final long serialVersionUID = 8818424722082593562L;\r
+\r
+ public static final AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .61f);\r
+ \r
+ public boolean visible = true;\r
+ public double time;\r
+ \r
+ @Override\r
+ protected void doRender(Graphics2D g) {\r
+ if ( !visible ) return;\r
+ \r
+ //double w = getWidth();\r
+ //double h = getHeight();\r
+ \r
+ Composite c = g.getComposite();\r
+ g.setComposite(composite);\r
+ try {\r
+ g.setColor(Color.BLACK);\r
+ g.fill( bounds );\r
+ } finally {\r
+ g.setComposite(c);\r
+ }\r
+ }\r
+ \r
+ \r
+\r
+}\r