Mercurial > projects > dwt-addons
view dwtx/jface/viewers/CheckStateChangedEvent.d @ 10:b6c35faf97c8
Viewers
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 31 Mar 2008 00:47:19 +0200 |
parents | |
children |
line wrap: on
line source
/******************************************************************************* * Copyright (c) 2000, 2006 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: * IBM Corporation - initial API and implementation * Port to the D programming language: * Frank Benoit <benoit@tionex.de> *******************************************************************************/ module dwtx.jface.viewers.CheckStateChangedEvent; import dwtx.jface.viewers.ICheckStateListener; import dwtx.jface.viewers.ICheckable; import dwt.dwthelper.utils; /** * Event object describing a change to the checked state * of a viewer element. * * @see ICheckStateListener */ public class CheckStateChangedEvent : EventObject { /** * Generated serial version UID for this class. * @since 3.1 */ private static const long serialVersionUID = 3256443603340244789L; /** * The viewer element. */ private Object element; /** * The checked state. */ private bool state; /** * Creates a new event for the given source, element, and checked state. * * @param source the source * @param element the element * @param state the checked state */ public this(ICheckable source, Object element, bool state) { super(cast(Object)source); this.element = element; this.state = state; } /** * Returns the checkable that is the source of this event. * * @return the originating checkable */ public ICheckable getCheckable() { return cast(ICheckable) source; } /** * Returns the checked state of the element. * * @return the checked state */ public bool getChecked() { return state; } /** * Returns the element whose check state changed. * * @return the element */ public Object getElement() { return element; } }