view dwtx/ui/forms/events/HyperlinkEvent.d @ 75:5d489b9f966c

Fix continue porting
author Frank Benoit <benoit@tionex.de>
date Sat, 24 May 2008 05:11:16 +0200
parents
children
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2000, 2005 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.ui.forms.events.HyperlinkEvent;
import dwt.events.TypedEvent;
import dwt.widgets.Widget;
import dwt.dwthelper.utils;
/**
 * Notifies listeners about a hyperlink change.
 *
 * @since 3.0
 */
public final class HyperlinkEvent : TypedEvent {
    private static const long serialVersionUID = 6009335074727417445L;
    private String label;
    private int stateMask;
    /**
     * Creates a new hyperlink
     *
     * @param widget
     *            event source
     * @param href
     *            the hyperlink reference that will be followed upon when the
     *            hyperlink is activated.
     * @param label
     *            the name of the hyperlink (the text that is rendered as a
     *            link in the source widget).
     * @param stateMask
     *            the given state mask
     */
    public this(Widget widget, Object href, String label, int stateMask) {
        super(widget);
        this.widget = widget;
        this.data = href;
        this.label = label;
        this.stateMask = stateMask;
    }
    /**
     * The hyperlink reference that will be followed when the hyperlink is
     * activated.
     *
     * @return the hyperlink reference object
     */
    public Object getHref() {
        return this.data;
    }
    /**
     * The text of the hyperlink rendered in the source widget.
     *
     * @return the hyperlink label
     */
    public String getLabel() {
        return label;
    }
    /**
     * Returns the value of the keyboard state mask present when
     * the event occured, or DWT.NULL for no modifiers.
     * @return the keyboard state mask or <code>DWT.NULL</code>.
     */
    public int getStateMask() {
        return stateMask;
    }
}