本文整理了Java中org.openide.nodes.AbstractNode.internalLookup()
方法的一些代码示例,展示了AbstractNode.internalLookup()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractNode.internalLookup()
方法的具体详情如下:
包路径:org.openide.nodes.AbstractNode
类名称:AbstractNode
方法名:internalLookup
暂无
代码示例来源: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: org.netbeans.api/org-openide-nodes
/** 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 {@link #PROP_COOKIE} change events.
*
* @param s the cookie set to use
* @deprecated just use getCookieSet().add(...) instead
* @exception IllegalStateException If you pass a Lookup instance into the constructor, this
* method cannot be called.
*/
@Deprecated
protected final synchronized void setCookieSet(CookieSet s) {
if (internalLookup(false) != null) {
throw new IllegalStateException("CookieSet cannot be used when lookup is associated with the node"); // NOI18N
}
if (sheetCookieL == null) {
sheetCookieL = new SheetAndCookieListener();
}
CookieSet cookieSet = (CookieSet) lookup;
if (cookieSet != null) {
cookieSet.removeChangeListener(sheetCookieL);
}
s.addChangeListener(sheetCookieL);
lookup = s;
fireCookieChange();
}
代码示例来源: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;
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** 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 {@link #PROP_COOKIE} change events.
*
* @param s the cookie set to use
* @deprecated just use getCookieSet().add(...) instead
* @exception IllegalStateException If you pass a Lookup instance into the constructor, this
* method cannot be called.
*/
protected final synchronized void setCookieSet (CookieSet s) {
if (internalLookup (false) != null) {
throw new IllegalStateException ("CookieSet cannot be used when lookup is associated with the node"); // NOI18N
}
if (sheetCookieL == null) {
sheetCookieL = new SheetAndCookieListener ();
}
CookieSet cookieSet = (CookieSet)lookup;
if (cookieSet != null) {
cookieSet.removeChangeListener (sheetCookieL);
}
s.addChangeListener (sheetCookieL);
lookup = s;
fireCookieChange ();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** 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 {@link #PROP_COOKIE} change events.
*
* @param s the cookie set to use
* @deprecated just use getCookieSet().add(...) instead
* @exception IllegalStateException If you pass a Lookup instance into the constructor, this
* method cannot be called.
*/
protected final synchronized void setCookieSet (CookieSet s) {
if (internalLookup (false) != null) {
throw new IllegalStateException ("CookieSet cannot be used when lookup is associated with the node"); // NOI18N
}
if (sheetCookieL == null) {
sheetCookieL = new SheetAndCookieListener ();
}
CookieSet cookieSet = (CookieSet)lookup;
if (cookieSet != null) {
cookieSet.removeChangeListener (sheetCookieL);
}
s.addChangeListener (sheetCookieL);
lookup = s;
fireCookieChange ();
}
内容来源于网络,如有侵权,请联系作者删除!