use of org.eclipse.swt.widgets.TypedListener in project translationstudio8 by heartsome.
the class Grid method addSelectionListener.
/**
* Adds the listener to the collection of listeners who will be notified
* when the receiver's selection changes, by sending it one of the messages
* defined in the {@code SelectionListener} interface.
* <p>
* Cell selection events may have <code>Event.detail = SWT.DRAG</code> when the
* user is drag selecting multiple cells. A follow up selection event will be generated
* when the drag is complete.
*
* @param listener the listener which should be notified
* @throws IllegalArgumentException
* <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
* </ul>
* @throws org.eclipse.swt.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>
*/
public void addSelectionListener(SelectionListener listener) {
checkWidget();
if (listener == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
addListener(SWT.Selection, new TypedListener(listener));
addListener(SWT.DefaultSelection, new TypedListener(listener));
}
use of org.eclipse.swt.widgets.TypedListener in project translationstudio8 by heartsome.
the class GridItem method addControlListener.
/**
* Adds the listener to the collection of listeners who will be notified
* when the row is resized, by sending it one of the messages defined in the
* <code>ControlListener</code> interface.
* <p>
* Clients who wish to override the standard row resize logic should use the
* untyped listener mechanisms. The untyped <code>Event</code> object passed
* to an untyped listener will have its <code>detail</code> field populated
* with the new row height. Clients may alter this value to, for example,
* enforce minimum or maximum row sizes. Clients may also set the
* <code>doit</code> field to false to prevent the entire resize operation.
*
* @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>
*/
public void addControlListener(ControlListener listener) {
checkWidget();
if (listener == null)
SWT.error(SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener(listener);
addListener(SWT.Resize, typedListener);
}
use of org.eclipse.swt.widgets.TypedListener in project translationstudio8 by heartsome.
the class GridColumn method addControlListener.
/**
* Adds a listener to the list of listeners notified when the column is
* moved or resized.
*
* @param listener
* listener
* @throws IllegalArgumentException
* <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
* </ul>
* @throws org.eclipse.swt.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>
*/
public void addControlListener(ControlListener listener) {
checkWidget();
if (listener == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
TypedListener typedListener = new TypedListener(listener);
addListener(SWT.Resize, typedListener);
addListener(SWT.Move, typedListener);
}
use of org.eclipse.swt.widgets.TypedListener in project tdi-studio-se by Talend.
the class ColorCombo 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);
}
use of org.eclipse.swt.widgets.TypedListener in project tdi-studio-se by Talend.
the class ColorCombo 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);
}
Aggregations