Search in sources :

Example 11 with TypedListener

use of org.eclipse.swt.widgets.TypedListener in project translationstudio8 by heartsome.

the class TableCombo method addSelectionListener.

/**
	 * Adds the listener to the collection of listeners who will be notified when the user changes the receiver's
	 * selection, by sending it one of the messages defined in the <code>SelectionListener</code> interface.
	 * <p>
	 * <code>widgetSelected</code> is called when the combo's list selection changes. <code>widgetDefaultSelected</code>
	 * is typically called when ENTER is pressed the combo's text area.
	 * </p>
	 * @param listener
	 *            the listener which should be notified when the user changes the receiver's selection
	 * @exception IllegalArgumentException
	 *                <ul>
	 *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
	 *                </ul>
	 * @exception SWTException
	 *                <ul>
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
	 *                </ul>
	 * @see SelectionListener
	 * @see #removeSelectionListener
	 * @see SelectionEvent
	 */
public void addSelectionListener(SelectionListener listener) {
    checkWidget();
    if (listener == null) {
        SWT.error(SWT.ERROR_NULL_ARGUMENT);
    }
    TypedListener typedListener = new TypedListener(listener);
    addListener(SWT.Selection, typedListener);
    addListener(SWT.DefaultSelection, typedListener);
}
Also used : TypedListener(org.eclipse.swt.widgets.TypedListener)

Example 12 with TypedListener

use of org.eclipse.swt.widgets.TypedListener in project translationstudio8 by heartsome.

the class TableCombo method addModifyListener.

/**
	 * Adds the listener to the collection of listeners who will be notified when the receiver's text is modified, by
	 * sending it one of the messages defined in the <code>ModifyListener</code> interface.
	 * @param listener
	 *            the listener which should be notified
	 * @exception IllegalArgumentException
	 *                <ul>
	 *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
	 *                </ul>
	 * @exception SWTException
	 *                <ul>
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
	 *                </ul>
	 * @see ModifyListener
	 * @see #removeModifyListener
	 */
public void addModifyListener(ModifyListener listener) {
    checkWidget();
    if (listener == null)
        SWT.error(SWT.ERROR_NULL_ARGUMENT);
    TypedListener typedListener = new TypedListener(listener);
    addListener(SWT.Modify, typedListener);
}
Also used : TypedListener(org.eclipse.swt.widgets.TypedListener)

Example 13 with TypedListener

use of org.eclipse.swt.widgets.TypedListener in project translationstudio8 by heartsome.

the class GridColumnGroup method addTreeListener.

/**
     * Adds the listener to the collection of listeners who will
     * be notified when an item in the receiver is expanded or collapsed
     * by sending it one of the messages defined in the <code>TreeListener</code>
     * interface.
     *
     * @param listener the listener which should be notified
     *
     * @exception IllegalArgumentException <ul>
     *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
     * </ul>
     * @exception SWTException <ul>
     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
     * </ul>
     *
     * @see TreeListener
     * @see #removeTreeListener
     */
public void addTreeListener(TreeListener listener) {
    checkWidget();
    if (listener == null)
        SWT.error(SWT.ERROR_NULL_ARGUMENT);
    TypedListener typedListener = new TypedListener(listener);
    addListener(SWT.Expand, typedListener);
    addListener(SWT.Collapse, typedListener);
}
Also used : TypedListener(org.eclipse.swt.widgets.TypedListener)

Example 14 with TypedListener

use of org.eclipse.swt.widgets.TypedListener in project translationstudio8 by heartsome.

the class TableCombo method addVerifyListener.

/**
	 * Adds the listener to the collection of listeners who will be notified when the receiver's text is verified, by
	 * sending it one of the messages defined in the <code>VerifyListener</code> interface.
	 * @param listener
	 *            the listener which should be notified
	 * @exception IllegalArgumentException
	 *                <ul>
	 *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
	 *                </ul>
	 * @exception SWTException
	 *                <ul>
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
	 *                </ul>
	 * @see VerifyListener
	 * @see #removeVerifyListener
	 * @since 3.3
	 */
public void addVerifyListener(VerifyListener listener) {
    checkWidget();
    if (listener == null)
        SWT.error(SWT.ERROR_NULL_ARGUMENT);
    TypedListener typedListener = new TypedListener(listener);
    addListener(SWT.Verify, typedListener);
}
Also used : TypedListener(org.eclipse.swt.widgets.TypedListener)

Example 15 with TypedListener

use of org.eclipse.swt.widgets.TypedListener in project tdi-studio-se by Talend.

the class ColorCombo method addVerifyListener.

/**
     * Adds the listener to the collection of listeners who will be notified when the receiver's text is verified, by
     * sending it one of the messages defined in the <code>VerifyListener</code> interface.
     * 
     * @param listener the listener which should be notified
     * 
     * @exception IllegalArgumentException <ul>
     * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
     * </ul>
     * @exception SWTException <ul>
     * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
     * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
     * </ul>
     * 
     * @see VerifyListener
     * @see #removeVerifyListener
     * 
     * @since 3.3
     */
public void addVerifyListener(VerifyListener listener) {
    checkWidget();
    if (listener == null) {
        SWT.error(SWT.ERROR_NULL_ARGUMENT);
    }
    TypedListener typedListener = new TypedListener(listener);
    addListener(SWT.Verify, typedListener);
}
Also used : TypedListener(org.eclipse.swt.widgets.TypedListener)

Aggregations

TypedListener (org.eclipse.swt.widgets.TypedListener)16 ControlAdapter (org.eclipse.swt.events.ControlAdapter)1 ControlEvent (org.eclipse.swt.events.ControlEvent)1 DisposeEvent (org.eclipse.swt.events.DisposeEvent)1 DisposeListener (org.eclipse.swt.events.DisposeListener)1 MouseListener (org.eclipse.swt.events.MouseListener)1 PaintEvent (org.eclipse.swt.events.PaintEvent)1 PaintListener (org.eclipse.swt.events.PaintListener)1 Canvas (org.eclipse.swt.widgets.Canvas)1