/** Detach annotation.*/ public final void detach() { if (attached != null) { attached.removeAnnotation(this); Annotatable old = attached; attached = null; notifyDetached(old); } }
/** Attach annotation to Annotatable object. * @param anno annotatable class to which this annotation will be attached */ public final void attach(Annotatable anno) { if (attached != null) detach(); attached = anno; attached.addAnnotation(this); notifyAttached(attached); }
private synchronized void doDetach() { Annotatable ann = getAttachedAnnotatable(); if (ann != null) { ann.removePropertyChangeListener(this); detach(); } synchronized (hyperlinks) { hyperlinks.remove(this); } }
private synchronized void attachAsNeeded(Line l) { if (getAttachedAnnotatable() == null) { Annotatable ann = l; attach(ann); ann.addPropertyChangeListener(this); } }
/** Attach annotation to Annotatable object. * @param anno annotatable class to which this annotation will be attached */ public final void attach(Annotatable anno) { if (attached != null) detach(); attached = anno; attached.addAnnotation(this); notifyAttached(attached); }
/** Attach annotation to Annotatable object. * @param anno annotatable class to which this annotation will be attached */ public final void attach(Annotatable anno) { if (attached != null) { detach(); } attached = anno; attached.addAnnotation(this); notifyAttached(attached); }
/** Detach annotation.*/ public final void detach() { if (attached != null) { attached.removeAnnotation(this); Annotatable old = attached; attached = null; notifyDetached(old); } }
/** Detach annotation.*/ public final void detach() { if (attached != null) { attached.removeAnnotation(this); Annotatable old = attached; attached = null; notifyDetached(old); } }