當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。