1 /*******************************************************************************
2 * Copyright (c) 2009 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * William Bourque - Initial API and implementation
13 * 2010-07-16 Yuriy Vashchuk - Heritage corrections.
14 *******************************************************************************/
15 package org
.eclipse
.linuxtools
.lttng
.ui
.views
.histogram
;
17 import org
.eclipse
.swt
.events
.FocusEvent
;
18 import org
.eclipse
.swt
.events
.FocusListener
;
21 * <b><u>HistogramCanvasFocusListener</u></b>
23 * Implementation of a FocusListener for the need of the HistogramCanvas
26 public class HistogramCanvasFocusListener
implements FocusListener
{
28 private HistogramCanvas ourCanvas
= null;
31 * HistogramCanvasFocusListener constructor
33 * @param newCanvas Related canvas
35 public HistogramCanvasFocusListener(HistogramCanvas newCanvas
) {
36 ourCanvas
= newCanvas
;
40 * Function that is called when the canvas get focus.<p>
42 * Redraw the screen to make sure everything is sane.
44 * @param event The focus event generated.
47 public void focusGained(FocusEvent event
) {
48 ourCanvas
.redrawAsynchronously();
52 * Function that is called when the canvas loose focus.<p>
54 * Doesn't do anything yet...
56 * @param event The focus event generated.
59 public void focusLost(FocusEvent event
) {