com.google.maps.gwt.client.adsense
Class AdUnit

java.lang.Object
  extended by JavaScriptObject
      extended by com.google.maps.gwt.client.MVCObject
          extended by com.google.maps.gwt.client.adsense.AdUnit

public class AdUnit
extends MVCObject

Implements AdSense for Content advertising on an associated map. To use an AdUnit , you must obtain and specify an AdSense for Content publisher ID within the AdUnit 's constructor options. THIS SOURCE CODE IS GENERATED, DO NOT MODIFY


Nested Class Summary
static interface AdUnit.ChannelNumberChangedHandler
          This event is fired when the AdUnit 's channelNumber property changes.
static interface AdUnit.FormatChangedHandler
          This event is fired when the AdUnit 's format property changes.
static interface AdUnit.MapChangedHandler
          This event is fired when the AdUnit 's map property changes.
static interface AdUnit.PositionChangedHandler
          This event is fired when the AdUnit 's position property changes.
 
Constructor Summary
protected AdUnit()
          Protected constructor avoids default public constructor.
 
Method Summary
 void addChannelNumberChangedListener(AdUnit.ChannelNumberChangedHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addChannelNumberChangedListenerOnce(AdUnit.ChannelNumberChangedHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addFormatChangedListener(AdUnit.FormatChangedHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addFormatChangedListenerOnce(AdUnit.FormatChangedHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addMapChangedListener(AdUnit.MapChangedHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addMapChangedListenerOnce(AdUnit.MapChangedHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addPositionChangedListener(AdUnit.PositionChangedHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addPositionChangedListenerOnce(AdUnit.PositionChangedHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void clearChannelNumberChangedListeners()
          Removes all listeners for the given event for the given instance.
 void clearFormatChangedListeners()
          Removes all listeners for the given event for the given instance.
 void clearInstanceListeners()
          Removes all listeners for all events for the given instance.
 void clearMapChangedListeners()
          Removes all listeners for the given event for the given instance.
 void clearPositionChangedListeners()
          Removes all listeners for the given event for the given instance.
static AdUnit create(Node container, AdUnitOptions opts)
          Creates an AdSense for Content display ad on the associated map.
 java.lang.String getChannelNumber()
          Returns the channel number in use by this AdUnit .
 Node getContainer()
          Returns the containing element of the AdUnit.
 AdFormat getFormat()
          Returns the format in use by this AdUnit .
 GoogleMap getMap()
          Returns the map to which this AdUnit 's ads are targeted.
 ControlPosition getPosition()
          Returns the ControlPosition at which this AdUnit is displayed on the map.
 java.lang.String getPublisherId()
          Returns the specified AdSense For Content publisher ID.
 void setChannelNumber(java.lang.String channelNumber)
          Specifies the channel number for this AdUnit .
 void setFormat(AdFormat format)
          Specifies the display format for this AdUnit .
 void setMap(GoogleMap map)
          Associates this AdUnit with the specified map.
 void setPosition(ControlPosition position)
          Sets the ControlPosition at which to display the AdUnit on the map.
 void triggerChannelNumberChanged(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerFormatChanged(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerMapChanged(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerPositionChanged(JavaScriptObject... varargs)
          Triggers the given event.
 
Methods inherited from class com.google.maps.gwt.client.MVCObject
bindTo, bindTo, bindTo, bindTo, changed, create, get, notify, set, setValues, setValues, unbind, unbindAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdUnit

protected AdUnit()
Protected constructor avoids default public constructor.

Method Detail

create

public static AdUnit create(Node container,
                            AdUnitOptions opts)
Creates an AdSense for Content display ad on the associated map.


addChannelNumberChangedListener

public final void addChannelNumberChangedListener(AdUnit.ChannelNumberChangedHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addChannelNumberChangedListenerOnce

public final void addChannelNumberChangedListenerOnce(AdUnit.ChannelNumberChangedHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addFormatChangedListener

public final void addFormatChangedListener(AdUnit.FormatChangedHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addFormatChangedListenerOnce

public final void addFormatChangedListenerOnce(AdUnit.FormatChangedHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addMapChangedListener

public final void addMapChangedListener(AdUnit.MapChangedHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addMapChangedListenerOnce

public final void addMapChangedListenerOnce(AdUnit.MapChangedHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addPositionChangedListener

public final void addPositionChangedListener(AdUnit.PositionChangedHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addPositionChangedListenerOnce

public final void addPositionChangedListenerOnce(AdUnit.PositionChangedHandler handler)
Like addListener, but the handler removes itself after handling the first event.


clearChannelNumberChangedListeners

public final void clearChannelNumberChangedListeners()
Removes all listeners for the given event for the given instance.


clearFormatChangedListeners

public final void clearFormatChangedListeners()
Removes all listeners for the given event for the given instance.


clearInstanceListeners

public final void clearInstanceListeners()
Removes all listeners for all events for the given instance.


clearMapChangedListeners

public final void clearMapChangedListeners()
Removes all listeners for the given event for the given instance.


clearPositionChangedListeners

public final void clearPositionChangedListeners()
Removes all listeners for the given event for the given instance.


getChannelNumber

public final java.lang.String getChannelNumber()
Returns the channel number in use by this AdUnit .


getContainer

public final Node getContainer()
Returns the containing element of the AdUnit.


getFormat

public final AdFormat getFormat()
Returns the format in use by this AdUnit .


getMap

public final GoogleMap getMap()
Returns the map to which this AdUnit 's ads are targeted.


getPosition

public final ControlPosition getPosition()
Returns the ControlPosition at which this AdUnit is displayed on the map.


getPublisherId

public final java.lang.String getPublisherId()
Returns the specified AdSense For Content publisher ID.


setChannelNumber

public final void setChannelNumber(java.lang.String channelNumber)
Specifies the channel number for this AdUnit . Channel numbers are optional and can be created for Google AdSense tracking.


setFormat

public final void setFormat(AdFormat format)
Specifies the display format for this AdUnit .


setMap

public final void setMap(GoogleMap map)
Associates this AdUnit with the specified map. Ads will be targeted to the map's viewport. The map must be specified in order to display ads.


setPosition

public final void setPosition(ControlPosition position)
Sets the ControlPosition at which to display the AdUnit on the map. If the position is set to null, the AdUnit is removed from the map.


triggerChannelNumberChanged

public final void triggerChannelNumberChanged(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerFormatChanged

public final void triggerFormatChanged(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerMapChanged

public final void triggerMapChanged(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerPositionChanged

public final void triggerPositionChanged(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.