本文整理了Java中org.openide.nodes.AbstractNode.setCookieSet()
方法的一些代码示例,展示了AbstractNode.setCookieSet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractNode.setCookieSet()
方法的具体详情如下:
包路径:org.openide.nodes.AbstractNode
类名称:AbstractNode
方法名:setCookieSet
[英]Set the cookie set. A listener is attached to the provided cookie set, and any change of the sheet is propagated to the node by firing #PROP_COOKIE change events.
[中]设置cookie集。监听器连接到提供的cookie集,并且通过触发#PROP_cookie change事件将工作表的任何更改传播到节点。
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** Get the cookie set.
*
* @return the cookie set created by {@link #setCookieSet}, or an empty set (never <code>null</code>)
* @exception IllegalStateException If you pass a Lookup instance into the constructor, this
* method cannot be called.
*/
protected final CookieSet getCookieSet() {
if (internalLookup(false) != null) {
throw new IllegalStateException("CookieSet cannot be used when lookup is associated with the node"); // NOI18N
}
CookieSet s = (CookieSet) lookup;
if (s != null) {
return s;
}
synchronized (this) {
if (lookup != null) {
return (CookieSet) lookup;
}
// sets empty sheet and adds a listener to it
setCookieSet(new CookieSet());
return (CookieSet) lookup;
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Get the cookie set.
*
* @return the cookie set created by {@link #setCookieSet}, or an empty set (never <code>null</code>)
* @exception IllegalStateException If you pass a Lookup instance into the constructor, this
* method cannot be called.
*/
protected final CookieSet getCookieSet () {
if (internalLookup (false) != null) {
throw new IllegalStateException ("CookieSet cannot be used when lookup is associated with the node"); // NOI18N
}
CookieSet s = (CookieSet)lookup;
if (s != null) return s;
synchronized (this) {
if (lookup != null) return (CookieSet)lookup;
// sets empty sheet and adds a listener to it
setCookieSet (new CookieSet ());
return (CookieSet)lookup;
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Get the cookie set.
*
* @return the cookie set created by {@link #setCookieSet}, or an empty set (never <code>null</code>)
* @exception IllegalStateException If you pass a Lookup instance into the constructor, this
* method cannot be called.
*/
protected final CookieSet getCookieSet () {
if (internalLookup (false) != null) {
throw new IllegalStateException ("CookieSet cannot be used when lookup is associated with the node"); // NOI18N
}
CookieSet s = (CookieSet)lookup;
if (s != null) return s;
synchronized (this) {
if (lookup != null) return (CookieSet)lookup;
// sets empty sheet and adds a listener to it
setCookieSet (new CookieSet ());
return (CookieSet)lookup;
}
}
内容来源于网络,如有侵权,请联系作者删除!