1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2011 Association for Decentralized Information Management in
\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
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.trend.impl;
\r
14 import java.awt.AlphaComposite;
\r
15 import java.awt.Color;
\r
16 import java.awt.Composite;
\r
17 import java.awt.Graphics2D;
\r
19 public class TooltipNode extends TrendGraphicalNode {
\r
21 private static final long serialVersionUID = 8818424722082593562L;
\r
23 public static final AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .61f);
\r
25 public boolean visible = true;
\r
29 protected void doRender(Graphics2D g) {
\r
30 if ( !visible ) return;
\r
32 //double w = getWidth();
\r
33 //double h = getHeight();
\r
35 Composite c = g.getComposite();
\r
36 g.setComposite(composite);
\r
38 g.setColor(Color.BLACK);
\r