本文整理汇总了Java中javax.swing.event.DocumentListener.changedUpdate方法的典型用法代码示例。如果您正苦于以下问题:Java DocumentListener.changedUpdate方法的具体用法?Java DocumentListener.changedUpdate怎么用?Java DocumentListener.changedUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.event.DocumentListener
的用法示例。
在下文中一共展示了DocumentListener.changedUpdate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: changedUpdate
import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
@Override
public void changedUpdate(DocumentEvent e) {
DocumentListener l = getDelegate();
if (l != null) {
l.changedUpdate(e);
}
}
示例2: changedUpdate
import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
/**
* Implementation of DocumentListener's method fires all the added
* listeners according to their priority.
*/
public void changedUpdate(DocumentEvent evt) {
logEvent(evt, "changedUpdate");
// 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.changedUpdate(evt);
} catch (RuntimeException ex) {
if (runtimeException == null) { // Only record first thrown
runtimeException = ex;
}
}
}
}
if (runtimeException != null) {
throw runtimeException; // Re-throw remembered exception
}
logEventEnd("changedUpdate");
}
示例3: changedUpdate
import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
/** Gives notification that an attribute or set of attributes changed.
* @param ev event describing the action
*/
@Override public void changedUpdate(DocumentEvent ev) {
final DocumentListener l = docGet(ev);
if (l != null) {
l.changedUpdate(ev);
}
}
示例4: fireChangedUpdate
import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
protected void fireChangedUpdate(final DocumentEvent event) {
lock.setCallingListeners(true);
try {
DocumentListener[] listeners = getDocumentListeners();
for (DocumentListener listener : listeners) {
listener.changedUpdate(event);
}
} finally {
lock.setCallingListeners(false);
}
}
示例5: fireDocumentEvent
import javax.swing.event.DocumentListener; //导入方法依赖的package包/类
public void fireDocumentEvent() {
for (DocumentListener l : documentListeners) {
l.changedUpdate(null);
}
}