当前位置: 首页>>代码示例>>Java>>正文


Java DocumentListener.removeUpdate方法代码示例

本文整理汇总了Java中javax.swing.event.DocumentListener.removeUpdate方法的典型用法代码示例。如果您正苦于以下问题:Java DocumentListener.removeUpdate方法的具体用法?Java DocumentListener.removeUpdate怎么用?Java DocumentListener.removeUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.event.DocumentListener的用法示例。


在下文中一共展示了DocumentListener.removeUpdate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: firePreRemoveUpdate

import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
void firePreRemoveUpdate(DefaultDocumentEvent chng) {
    // Notify the remove update listeners - before the actual remove happens
    // so that it adheres to removeUpdate() logic; also the listeners can check
    // positions' offsets before the actual removal happens.
    for (DocumentListener listener: updateDocumentListenerList.getListeners()) {
        listener.removeUpdate(chng);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:BaseDocument.java

示例2: removeUpdate

import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
@Override
public void removeUpdate(DocumentEvent e) {
    DocumentListener l = getDelegate();
    if (l != null) {
	l.removeUpdate(e);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:AbstractDocumentModel.java

示例3: removeUpdate

import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
/**
 * Implementation of DocumentListener's method fires all the added
 * listeners according to their priority.
 */
public void removeUpdate(DocumentEvent evt) {
    logEvent(evt, "removeUpdate");
    // Fire the prioritized listeners
    EventListener[][] listenersArray = getListenersArray();
    // Attempt to fire to all listeners catching possible exception(s) and report first fired then
    RuntimeException runtimeException = null;
    for (int priority = listenersArray.length - 1; priority >= 0; priority--) {
        logPriority(priority);
        EventListener[] listeners = listenersArray[priority];
        for (int i = listeners.length - 1; i >= 0; i--) {
            DocumentListener l = (DocumentListener) listeners[i];
            logListener(l);
            try {
                l.removeUpdate(evt);
            } catch (RuntimeException ex) {
                if (runtimeException == null) { // Only record first thrown
                    runtimeException = ex;
                }
            }
        }
    }
    if (runtimeException != null) {
        throw runtimeException; // Re-throw remembered exception
    }
    logEventEnd("removeUpdate");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:PriorityDocumentListenerList.java

示例4: removeUpdate

import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
/** Gives notification that a portion of the document has been removed.
* @param ev event describing the action
*/
@Override public void removeUpdate(DocumentEvent ev) {
    final DocumentListener l = docGet(ev);

    if (l != null) {
        l.removeUpdate(ev);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:WeakListenerImpl.java

示例5: fireRemoveUpdate

import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
protected void fireRemoveUpdate(final DocumentEvent event) {
    lock.setCallingListeners(true);

    try {
        DocumentListener[] listeners = getDocumentListeners();
        for (DocumentListener listener : listeners) {
            listener.removeUpdate(event);
        }
    } finally {
        lock.setCallingListeners(false);
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:13,代码来源:AbstractDocument.java


注:本文中的javax.swing.event.DocumentListener.removeUpdate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。