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