// Path: src/main/java/com/readytalk/swt/widgets/CustomElementDataProvider.java
// public interface CustomElementDataProvider {
//   /**
//    * Returns the element that's being painted by the GC.
//    * For example, if you add a PaintListener to a Canvas, this method should return the Canvas element.
//    * @return The element being painted by the GC
//    */
//   public Control getPaintedElement();
// 
//   /**
//    * Returns a Point describing the item to apply the PopOver to, relative to the parent (painted) element.
//    * @return The PopOver'd item's location relative to the parent.
//    */
//   public Point getLocation();
// 
//   /**
//    * Returns a Point describing the size of the item to be PopOver'd.
//    * The x value is the width of the item, the y value is the height.
//    * @return The PopOver'd item's size.
//    */
//   public Point getSize();
// }


import com.readytalk.swt.widgets.CustomElementDataProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Widget;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
   * Remember to invoke this method if you previously invoked <code>showAllBubbles</code>
   */
  public void dismissAllBubbles() {
    for(BubbleRegistrant registrant : registrants) {
      registrant.dismissBubble();
      registrant.bubble.setDisableAutoHide(false);
    }
  }

  BubbleRegistrant findRegistrant(Object target) {
    for(BubbleRegistrant br : registrants) {
      if(br.getTarget() == target) {
        return br;
      }
    }
    return null;
  }

  List<BubbleRegistrant> getTagList(BubbleTag tag) {
    List<BubbleRegistrant> tagList = tagMap.get(tag.getText());
    if(tagList == null) {
      tagList = new ArrayList<BubbleRegistrant>();
      tagMap.put(tag.getText(), tagList);
    }
    return tagList;
  }

  void unregister(Object target) {
    BubbleRegistrant registrant = findRegistrant(target);
    if(registrant != null) {
// Path: src/main/java/com/readytalk/swt/widgets/CustomElementDataProvider.java
// public interface CustomElementDataProvider {
//   /**
//    * Returns the element that's being painted by the GC.
//    * For example, if you add a PaintListener to a Canvas, this method should return the Canvas element.
//    * @return The element being painted by the GC
//    */
//   public Control getPaintedElement();
// 
//   /**
//    * Returns a Point describing the item to apply the PopOver to, relative to the parent (painted) element.
//    * @return The PopOver'd item's location relative to the parent.
//    */
//   public Point getLocation();
// 
//   /**
//    * Returns a Point describing the size of the item to be PopOver'd.
//    * The x value is the width of the item, the y value is the height.
//    * @return The PopOver'd item's size.
//    */
//   public Point getSize();
// }


// Path: src/main/java/com/readytalk/swt/widgets/notifications/BubbleRegistry.java
import com.readytalk.swt.widgets.CustomElementDataProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Widget;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;

   * Remember to invoke this method if you previously invoked <code>showAllBubbles</code>
   */
  public void dismissAllBubbles() {
    for(BubbleRegistrant registrant : registrants) {
      registrant.dismissBubble();
      registrant.bubble.setDisableAutoHide(false);
    }
  }

  BubbleRegistrant findRegistrant(Object target) {
    for(BubbleRegistrant br : registrants) {
      if(br.getTarget() == target) {
        return br;
      }
    }
    return null;
  }

  List<BubbleRegistrant> getTagList(BubbleTag tag) {
    List<BubbleRegistrant> tagList = tagMap.get(tag.getText());
    if(tagList == null) {
      tagList = new ArrayList<BubbleRegistrant>();
      tagMap.put(tag.getText(), tagList);
    }
    return tagList;
  }

  void unregister(Object target) {
    BubbleRegistrant registrant = findRegistrant(target);
    if(registrant != null) {
      removeTags(registrant,