|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJavaScriptObject
com.google.maps.gwt.client.MVCObject
com.google.maps.gwt.client.adsense.AdUnit
public class AdUnit
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 |
---|
protected AdUnit()
Method Detail |
---|
public static AdUnit create(Node container, AdUnitOptions opts)
public final void addChannelNumberChangedListener(AdUnit.ChannelNumberChangedHandler handler)
public final void addChannelNumberChangedListenerOnce(AdUnit.ChannelNumberChangedHandler handler)
public final void addFormatChangedListener(AdUnit.FormatChangedHandler handler)
public final void addFormatChangedListenerOnce(AdUnit.FormatChangedHandler handler)
public final void addMapChangedListener(AdUnit.MapChangedHandler handler)
public final void addMapChangedListenerOnce(AdUnit.MapChangedHandler handler)
public final void addPositionChangedListener(AdUnit.PositionChangedHandler handler)
public final void addPositionChangedListenerOnce(AdUnit.PositionChangedHandler handler)
public final void clearChannelNumberChangedListeners()
public final void clearFormatChangedListeners()
public final void clearInstanceListeners()
public final void clearMapChangedListeners()
public final void clearPositionChangedListeners()
public final java.lang.String getChannelNumber()
AdUnit
.
public final Node getContainer()
public final AdFormat getFormat()
AdUnit
.
public final GoogleMap getMap()
AdUnit
's ads are targeted.
public final ControlPosition getPosition()
ControlPosition
at which this
AdUnit
is displayed on the map.
public final java.lang.String getPublisherId()
public final void setChannelNumber(java.lang.String channelNumber)
AdUnit
. Channel numbers are optional and can be created for Google AdSense tracking.
public final void setFormat(AdFormat format)
AdUnit
.
public final void setMap(GoogleMap map)
AdUnit
with the specified map. Ads will be targeted to the map's viewport.
The map must be specified in order to display ads.
public final void setPosition(ControlPosition position)
ControlPosition
at which to display the
AdUnit
on the map. If the position is set to null, the
AdUnit
is removed from the map.
public final void triggerChannelNumberChanged(JavaScriptObject... varargs)
public final void triggerFormatChanged(JavaScriptObject... varargs)
public final void triggerMapChanged(JavaScriptObject... varargs)
public final void triggerPositionChanged(JavaScriptObject... varargs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |