javax.swing.text.AbstractDocument.removeUndoableEditListener()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(81)

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

AbstractDocument.removeUndoableEditListener介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-xml-xam-ui

/**
 * Prepare to perform an undo/redo operation.
 *
 * @return  the set of undoable edit listeners removed from document.
 */
private UndoableEditListener[] prepare() {
  if (model != null) {
    // If the model is set, that means we are to sync the model
    // after performing the undo/redo operation. That, however,
    // means we cannot be listening to the model lest we receive
    // additional undoable edits, which would be bad.
    model.removeUndoableEditListener(this);
  }
  if (document == null) {
    return null;
  }
  UndoableEditListener[] listeners = document.getUndoableEditListeners();
  if (listeners != null && listeners.length > 0) {
    for (UndoableEditListener uel : listeners) {
      document.removeUndoableEditListener(uel);
    }
  }
  return listeners;
}

代码示例来源:origin: stackoverflow.com

throws BadLocationException {
 for(UndoableEditListener uel: getUndoableEditListeners()) {
  removeUndoableEditListener(uel);

相关文章