org.openide.nodes.AbstractNode.internalLookup()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(42)

本文整理了Java中org.openide.nodes.AbstractNode.internalLookup()方法的一些代码示例,展示了AbstractNode.internalLookup()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractNode.internalLookup()方法的具体详情如下:
包路径:org.openide.nodes.AbstractNode
类名称:AbstractNode
方法名:internalLookup

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 ();
}

相关文章

最新文章

更多