本文整理汇总了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);
}
}
示例2: removeUpdate
import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
@Override
public void removeUpdate(DocumentEvent e) {
DocumentListener l = getDelegate();
if (l != null) {
l.removeUpdate(e);
}
}
示例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");
}
示例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);
}
}
示例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);
}
}