本文整理汇总了Java中org.eclipse.swt.events.TreeListener类的典型用法代码示例。如果您正苦于以下问题:Java TreeListener类的具体用法?Java TreeListener怎么用?Java TreeListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TreeListener类属于org.eclipse.swt.events包,在下文中一共展示了TreeListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
protected void addTreeListener(Control control, TreeListener listener) {
((Gallery) control).addTreeListener(listener);
}
示例2: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
@Override
protected void addTreeListener(Control c, TreeListener listener) {
((Tree) c).addTreeListener(listener);
}
示例3: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/** {@inheritDoc} */
protected void addTreeListener(Control control, TreeListener listener) {
((Grid) control).addTreeListener(listener);
}
示例4: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
protected void addTreeListener(Control c, TreeListener listener) {
((TableTree) c).addTreeListener(listener);
}
示例5: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
protected void addTreeListener(Control c, TreeListener listener) {
((Tree) c).addTreeListener(listener);
}
示例6: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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));
}
示例7: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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));
}
示例8: removeTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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);
}
示例9: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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);
}
示例10: removeTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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);
}
示例11: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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);
}
示例12: removeTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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);
}
示例13: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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);
}
示例14: removeTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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);
}
示例15: addTreeListener
import org.eclipse.swt.events.TreeListener; //导入依赖的package包/类
/**
* 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);
}