org.openide.util.WeakSet.remove()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(171)

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

WeakSet.remove介绍

[英]Removes the given element from this set if it is present.
[中]从该集合中移除给定元素(如果存在)。

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-util

/** Set whether the action will survive a change in focus.
* If <code>false</code>, then the action will be automatically
* disabled (using {@link #setActionPerformer}) when the window
* focus changes.
*
* @param b <code>true</code> to survive focus changes, <code>false</code> to be sensitive to them
*/
public void setSurviveFocusChange(boolean b) {
  synchronized (notSurviving) {
    if (b) {
      notSurviving.remove(getClass());
      surviving.add(getClass());
    } else {
      notSurviving.add(getClass());
      surviving.remove(getClass());
    }
  }
}

代码示例来源:origin: org.netbeans.api/org-openide-util-ui

/** Set whether the action will survive a change in focus.
* If <code>false</code>, then the action will be automatically
* disabled (using {@link #setActionPerformer}) when the window
* focus changes.
*
* @param b <code>true</code> to survive focus changes, <code>false</code> to be sensitive to them
*/
public void setSurviveFocusChange(boolean b) {
  synchronized (notSurviving) {
    if (b) {
      notSurviving.remove(getClass());
      surviving.add(getClass());
    } else {
      notSurviving.add(getClass());
      surviving.remove(getClass());
    }
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-io

/**
 * Unregisters an listener.
 * @param listener the listener
 */
public void removeActiveViewListener (Listener listener) {
  synchronized (listeners) {
    listeners.remove (listener);
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-model

public void run () {
    listeners.remove (listener);
  }
});

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-model

/**
 * Unregisters an active-document listener.
 * @param listener the listener
 */
public void removeActiveDocumentListener (Listener listener) {
  synchronized (listeners) {
    listeners.remove (listener);
  }
}

代码示例来源:origin: in.jlibs/org-openide-util

/** Set whether the action will survive a change in focus.
* If <code>false</code>, then the action will be automatically
* disabled (using {@link #setActionPerformer}) when the window
* focus changes.
*
* @param b <code>true</code> to survive focus changes, <code>false</code> to be sensitive to them
*/
public void setSurviveFocusChange(boolean b) {
  synchronized (notSurviving) {
    if (b) {
      notSurviving.remove(getClass());
      surviving.add(getClass());
    } else {
      notSurviving.add(getClass());
      surviving.remove(getClass());
    }
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Set whether the action will survive a change in focus.
* If <code>false</code>, then the action will be automatically
* disabled (using {@link #setActionPerformer}) when the window
* focus changes.
*
* @param b <code>true</code> to survive focus changes, <code>false</code> to be sensitive to them
*/
public void setSurviveFocusChange (boolean b) {
  synchronized (notSurviving) {
    if (b) {
      notSurviving.remove (getClass ());
      surviving.add (getClass ());
    } else {
      notSurviving.add (getClass ());
      surviving.remove (getClass ());
    }
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Set whether the action will survive a change in focus.
* If <code>false</code>, then the action will be automatically
* disabled (using {@link #setActionPerformer}) when the window
* focus changes.
*
* @param b <code>true</code> to survive focus changes, <code>false</code> to be sensitive to them
*/
public void setSurviveFocusChange (boolean b) {
  synchronized (notSurviving) {
    if (b) {
      notSurviving.remove (getClass ());
      surviving.add (getClass ());
    } else {
      notSurviving.add (getClass ());
      surviving.remove (getClass ());
    }
  }
}

代码示例来源:origin: uk.gov.nationalarchives.thirdparty.netbeans/org-openide-util

/** Set whether the action will survive a change in focus.
* If <code>false</code>, then the action will be automatically
* disabled (using {@link #setActionPerformer}) when the window
* focus changes.
*
* @param b <code>true</code> to survive focus changes, <code>false</code> to be sensitive to them
*/
public void setSurviveFocusChange(boolean b) {
  synchronized (notSurviving) {
    if (b) {
      notSurviving.remove(getClass());
      surviving.add(getClass());
    } else {
      notSurviving.add(getClass());
      surviving.remove(getClass());
    }
  }
}

相关文章