Java Code Examples for javax.swing.event.DocumentListener#insertUpdate()
The following examples show how to use
javax.swing.event.DocumentListener#insertUpdate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WeakListenerImpl.java From netbeans with Apache License 2.0 | 5 votes |
/** Gives notification that there was an insert into the document. * @param ev event describing the action */ @Override public void insertUpdate(DocumentEvent ev) { final DocumentListener l = docGet(ev); if (l != null) { l.insertUpdate(ev); } }
Example 2
Source File: AbstractDocumentModel.java From netbeans with Apache License 2.0 | 5 votes |
@Override public void insertUpdate(DocumentEvent e) { DocumentListener l = getDelegate(); if (l != null) { l.insertUpdate(e); } }
Example 3
Source File: PriorityDocumentListenerList.java From netbeans with Apache License 2.0 | 5 votes |
/** * Implementation of DocumentListener's method fires all the added * listeners according to their priority. */ public void insertUpdate(DocumentEvent evt) { logEvent(evt, "insertUpdate"); // 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.insertUpdate(evt); } catch (RuntimeException ex) { if (runtimeException == null) { // Only record first thrown runtimeException = ex; } } } } if (runtimeException != null) { throw runtimeException; // Re-throw remembered exception } logEventEnd("insertUpdate"); }
Example 4
Source File: FormulaDocument.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
protected void fireInsertEvent( final DocumentEvent event ) { final DocumentListener[] listeners = listenerList.getListeners( DocumentListener.class ); for ( int i = 0; i < listeners.length; i++ ) { final DocumentListener documentListener = listeners[ i ]; documentListener.insertUpdate( event ); } }
Example 5
Source File: BaseDocument.java From netbeans with Apache License 2.0 | 4 votes |
void firePreInsertUpdate(DefaultDocumentEvent chng) { for (DocumentListener listener: updateDocumentListenerList.getListeners()) { listener.insertUpdate(chng); } }