view dwt/internal/SWTEventObject.d @ 10:63c023465156

moved from org.eclipse.swt to dwt
author Frank Benoit <benoit@tionex.de>
date Sat, 05 Jan 2008 17:58:37 +0100
parents ad2b69216039
children 8cec8f536af3
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2000, 2004 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
 *******************************************************************************/
module dwt.internal.SWTEventObject;


//import java.util.EventObject;
import tango.core.Exception;

///PORTING_TYPE
class EventObject {
  protected Object source;

  public this(Object source) {
    if (source is null)
      throw new IllegalArgumentException( "null arg" );
    this.source = source;
  }

  public Object getSource() {
    return source;
  }

  public override char[] toString() {
    return this.classinfo.name ~ "[source=" ~ source.toString() ~ "]";
  }
}




/**
 * This class is the cross-platform version of the
 * java.util.EventObject class.
 * <p>
 * It is part of our effort to provide support for both J2SE
 * and J2ME platforms. Under this scheme, classes need to
 * extend SWTEventObject instead of java.util.EventObject.
 * </p>
 * <p>
 * Note: java.util.EventObject is not part of CDC and CLDC.
 * </p>
 */
public class SWTEventObject : EventObject {

	//static final long serialVersionUID = 3258125873411470903L;

/**
 * Constructs a new instance of this class.
 *
 * @param source the object which fired the event
 */
public this(Object source) {
	super(source);
}
}