blob: 66b8f853a81c76e2b3b17838d2e8fedb48804fbc [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011 Laurent CARON.
* 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:
* Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation
*******************************************************************************/
package org.mihalis.opal.utils;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
/**
* This class is an adapter for the SelectionListener. Both behaviours (DefaultSelected and Selected) are doing the same thing
*/
public abstract class SimpleSelectionAdapter implements SelectionListener {
/** Widget default selected.
*
* @param e the e
* @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
*/
@Override
public void widgetDefaultSelected(final SelectionEvent e) {
this.handle(e);
}
/** Widget selected.
*
* @param e the e
* @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
*/
@Override
public void widgetSelected(final SelectionEvent e) {
this.handle(e);
}
/**
* Sent when selection occurs in the control.
*
* @param e - an event containing information about the selection
*/
public abstract void handle(SelectionEvent e);
}