/** Removal of added annotation. * @param doc the annotated document * @param annotation annotation which is going to be removed * @since 1.20 */ public static void removeAnnotation (final StyledDocument doc, final Annotation annotation) { if (!(doc instanceof Annotatable)) return; if (SwingUtilities.isEventDispatchThread()) { ((Annotatable)doc).removeAnnotation (annotation); } else { SwingUtilities.invokeLater(new Runnable() { public void run() { ((Annotatable)doc).removeAnnotation (annotation); } }); } }
/** Removal of added annotation. * @param doc the annotated document * @param annotation annotation which is going to be removed * @since 1.20 */ public static void removeAnnotation (final StyledDocument doc, final Annotation annotation) { if (!(doc instanceof Annotatable)) return; if (SwingUtilities.isEventDispatchThread()) { ((Annotatable)doc).removeAnnotation (annotation); } else { SwingUtilities.invokeLater(new Runnable() { public void run() { ((Annotatable)doc).removeAnnotation (annotation); } }); } }
/** * Removal of added annotation. * <br/> * Note: since 6.35 the requests (delegated to document) are no longer replanned to EDT. * @param doc the annotated document * @param annotation annotation which is going to be removed * @since 1.20 */ public static void removeAnnotation(final StyledDocument doc, final Annotation annotation) { if (!(doc instanceof Annotatable)) { return; } ((Annotatable) doc).removeAnnotation(annotation); }
public void run() { ((Annotatable)doc).removeAnnotation (annotation); } });
public void run() { ((Annotatable)doc).removeAnnotation (annotation); } });