view dwt/internal/DWTEventObject.d @ 197:184ab53b7785

Changes and fixes for jface
author Frank Benoit <benoit@tionex.de>
date Thu, 10 Apr 2008 11:19:49 +0200
parents 57151e2793a2
children ab60f3309436
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
 * Port to the D programming language:
 *     Frank Benoit <benoit@tionex.de>
 *******************************************************************************/
module dwt.internal.DWTEventObject;


//import java.util.EventObject;
import tango.core.Exception;
import dwt.dwthelper.utils;

/+
///PORTING_TYPE
class EventObject : 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 DWTEventObject instead of java.util.EventObject.
 * </p>
 * <p>
 * Note: java.util.EventObject is not part of CDC and CLDC.
 * </p>
 */
public class DWTEventObject : 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);
}
}