protected void addTreeListener(Control control, TreeListener listener) { ((Gallery) control).addTreeListener(listener); }
@Override protected void addTreeListener(Control c, TreeListener listener) { ((Tree) c).addTreeListener(listener); }
/** {@inheritDoc} */ protected void addTreeListener(Control control, TreeListener listener) { ((Grid) control).addTreeListener(listener); }
protected void addTreeListener(Control c, TreeListener listener) { ((TableTree) c).addTreeListener(listener); }
protected void addTreeListener(Control c, TreeListener listener) { ((Tree) c).addTreeListener(listener); }
/** * 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 TreeListener interface. * * @param listener */ public void addTreeListener(TreeListener listener) { checkWidget(); if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); addListener(SWT.Expand, new TypedListener(listener)); }
/** * Adds the listener to the collection of listeners who will be notified * when the receiver's items changes, by sending it one of the messages * defined in the {@code TreeListener} interface. * * @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> * @see TreeListener * @see #removeTreeListener * @see org.eclipse.swt.events.TreeEvent */ public void addTreeListener(TreeListener listener) { checkWidget(); if (listener == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } addListener(SWT.Expand, new TypedListener(listener)); addListener(SWT.Collapse, new TypedListener(listener)); }
/** * Removes the listener from the collection of listeners who will be * notified when the receiver's items changes. * * @param listener the listener which should no longer be notified * @see TreeListener * @see #addTreeListener(TreeListener) * @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 removeTreeListener(TreeListener listener) { checkWidget(); removeListener(SWT.Expand, listener); removeListener(SWT.Collapse, listener); }
/** * 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); }
/** * Removes the listener from the collection of listeners who will * be notified when items in the receiver are expanded or collapsed. * * @param listener the listener which should no longer 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 #addTreeListener */ public void removeTreeListener(TreeListener listener) { checkWidget (); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); removeListener (SWT.Expand, listener); removeListener (SWT.Collapse, listener); }
/** * 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); }
/** * Removes the listener from the collection of listeners who will be * notified when items in the receiver are expanded or collapsed. * * @param listener * the listener which should no longer 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 #addTreeListener */ public void removeTreeListener(TreeListener listener) { checkWidget(); if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); removeListener(SWT.Expand, listener); removeListener(SWT.Collapse, listener); }
/** * 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) error(SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener(listener); addListener(SWT.Expand, typedListener); addListener(SWT.Collapse, typedListener); }
/** * Removes the listener from the collection of listeners who will be * notified when items in the receiver are expanded or collapsed. * * @param listener * the listener which should no longer 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 #addTreeListener */ public void removeTreeListener(TreeListener listener) { checkWidget(); if (listener == null) error(SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook(SWT.Expand, listener); eventTable.unhook(SWT.Collapse, listener); }
/** * Adds the listener to receive tree events. * <p> * * @param listener * the tree listener * * @exception SWTError * <ul> * <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread <li> * ERROR_WIDGET_DISPOSED when the widget has been disposed <li> * ERROR_NULL_ARGUMENT when listener is null * </ul> */ public void addTreeListener(TreeListener listener) { if (listener == null) throw new SWTError(SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener(listener); addListener(SWT.Expand, typedListener); addListener(SWT.Collapse, typedListener); }
/** * Removes the listener. * * @param listener * the listener * * @exception SWTError * <ul> * <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread * <li>ERROR_WIDGET_DISPOSED when the widget has been disposed * <li>ERROR_NULL_ARGUMENT when listener is null * </ul> */ public void removeTreeListener(TreeListener listener) { if (listener == null) throw new SWTError(SWT.ERROR_NULL_ARGUMENT); removeListener(SWT.Expand, listener); removeListener(SWT.Collapse, listener); }
public void addTreeListener(TreeListener listener) { tree.addTreeListener(listener); }
public void removeTreeListener(TreeListener listener) { tree.removeTreeListener(listener); }
/** * Adds the given SWT tree listener to the given SWT control. * * @param control * the SWT control * @param listener * the SWT tree listener */ protected abstract void addTreeListener(Control control, TreeListener listener);