Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.maryanovsky.map.client.widgets.bubble
Class BubbleWidget

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.google.gwt.user.client.ui.Composite
                  com.maryanovsky.map.client.widgets.bubble.BubbleWidget

All Implemented Interfaces:
  HasHandlers, EventListener, Overlay

    public class BubbleWidget

extends Composite
implements Overlay

A "bubble", or "tooltip" widget. The style name of the widget is `map-BubbleWidget`. The style name of the content holder element is `map-BubbleWidgetContentHolder`. The style name of the bubble's "leg" is `map-BubbleWidgetLeg`.

Author:
  Maryanovsky Alexander

Nested Class Summary
`static interface` | `BubbleWidget.Images` A bundle of the images used by the widget.

Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
`UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

Field Summary

Fields inherited from class com.google.gwt.user.client.ui.UIObject
`DEBUG_ID_PREFIX`

Constructor Summary
`BubbleWidget()` Creates a new Bubble, with initially no content.
`BubbleWidget(BubbleWidget.Images images, Alignment alignment, Widget content)` Creates a new `BubbleWidget` with the specified images, alignment relative to the anchor point and content (the latter may be `null`).
`BubbleWidget(Widget content)` Creates a new `BubbleWidget` with the specified content (may be `null`).

Method Summary
`void` | `added(MapWidget mapWidget)` Adds the bubble to the map's overlay panel.
`protected Widget` | `createContentHolderWrapper(Widget contentHolder)` This method creates a wrapper panel for the content holder.
`void` | `removed(MapWidget mapWidget)` Removes the widget from the map's overlay panel.
`void` | `setAnchor(LatLng anchor)` Sets the anchor coordinate - the one to which the bubble points.
`void` | `setContent(Widget content)` Sets the content widget.
`void` | `updated(MapWidget mapWidget, boolean isTemporary)` Called to update the overlay's position.

Methods inherited from class com.google.gwt.user.client.ui.Composite
`getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents`

Methods inherited from class com.google.gwt.user.client.ui.UIObject
`addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BubbleWidget

    public BubbleWidget(BubbleWidget.Images images,
                        Alignment alignment,
                        Widget content)

  Creates a new `BubbleWidget` with the specified images, alignment relative to the anchor point and content (the latter may be `null`).

### BubbleWidget

    public BubbleWidget(Widget content)

  Creates a new `BubbleWidget` with the specified content (may be `null`).

### BubbleWidget

    public BubbleWidget()

  Creates a new Bubble, with initially no content.

Method Detail

### createContentHolderWrapper

    protected Widget createContentHolderWrapper(Widget contentHolder)

  This method creates a wrapper panel for the content holder. This allows customizing the look of the bubble in ways that are difficult or impossible to achieve with just CSS. The method is responsible for adding the content holder into the wrapper. The default implementation simply returns the content holder itself.

### setContent

    public void setContent(Widget content)

  Sets the content widget. Pass `null` to clear the content.

### setAnchor

    public void setAnchor(LatLng anchor)

  Sets the anchor coordinate - the one to which the bubble points.

### added

    public void added(MapWidget mapWidget)

  Adds the bubble to the map's overlay panel.

  Specified by:
    `added` in interface `Overlay`

### updated

    public void updated(MapWidget mapWidget,
                        boolean isTemporary)

  Called to update the overlay's position.

  Specified by:
    `updated` in interface `Overlay`

### removed

    public void removed(MapWidget mapWidget)

  Removes the widget from the map's overlay panel.

  Specified by:
    `removed` in interface `Overlay`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD