void (final @NotNull DocumentEvent event) { final Integer pos = event.getOffset(); if (ApplicationManager.getApplication().isDispatchThread()) { firePropertyChange(ACCESSIBLE_TEXT_PROPERTY, null, pos); if (SystemInfo.isMac) { // For MacOSX we also need to fire a JTextComponent event to anyone listening // to our Document, since *that* rather than the accessible property // change is the only way to trigger a speech update fireJTextComponentDocumentChange(event); } } else { ApplicationManager.getApplication().invokeLater(() -> { firePropertyChange(ACCESSIBLE_TEXT_PROPERTY, null, pos); fireJTextComponentDocumentChange(event); }); } }