/******************************************************************************* * Copyright (c) 2006, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Qi Liang (IBM Corporation) *******************************************************************************/ package net.sf.eclipsefp.haskell.profiler.internal.editors; import org.eclipse.birt.chart.device.IDeviceRenderer; import org.eclipse.birt.chart.device.IUpdateNotifier; import org.eclipse.birt.chart.model.Chart; import org.eclipse.swt.widgets.Composite; /** * The canvas to draw chart with the tool tip to show the value. * * @author Qi Liang */ public class ChartWithToolTipCanvas extends ChartCanvas implements IUpdateNotifier { public ChartWithToolTipCanvas(Composite parent, int style) { super(parent, style); render.setProperty(IDeviceRenderer.UPDATE_NOTIFIER, this); } /* * (non-Javadoc) * * @see org.eclipse.birt.chart.device.IUpdateNotifier#regenerateChart() */ @Override public void regenerateChart() { redraw(); } /* * (non-Javadoc) * * @see org.eclipse.birt.chart.device.IUpdateNotifier#repaintChart() */ @Override public void repaintChart() { redraw(); } /* * (non-Javadoc) * * @see org.eclipse.birt.chart.device.IUpdateNotifier#peerInstance() */ @Override public Object peerInstance() { return this; } /* * (non-Javadoc) * * @see org.eclipse.birt.chart.device.IUpdateNotifier#getDesignTimeModel() */ @Override public Chart getDesignTimeModel() { return chart; } /* * (non-Javadoc) * * @see org.eclipse.birt.chart.device.IUpdateNotifier#getRunTimeModel() */ @Override public Chart getRunTimeModel() { return state.getChartModel(); } /* * (non-Javadoc) * * @see org.eclipse.birt.chart.device.IUpdateNotifier#getContext(java.lang.Object) */ public Object getContext(Object arg0) { return null; } /* * (non-Javadoc) * * @see org.eclipse.birt.chart.device.IUpdateNotifier#putContext(java.lang.Object, * java.lang.Object) */ public Object putContext(Object arg0, Object arg1) { return null; } /* * (non-Javadoc) * * @see org.eclipse.birt.chart.device.IUpdateNotifier#removeContext(java.lang.Object) */ public Object removeContext(Object arg0) { return null; } }