MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / setAd

Method setAd

CodenameOne/src/com/codename1/components/Ads.java:215–225  ·  view source on GitHub ↗
(String ad)

Source from the content-addressed store, hash-verified

213 ///
214 /// - `ad`: the ad to set
215 public void setAd(String ad) {
216 this.ad = ad;
217 HTMLComponent html = new HTMLComponent(new MyAsyncDocumentRequestHandlerImpl());
218 html.setSupressExceptions(true);
219 html.setHTMLCallback(this);
220 html.setBodyText("<html><body><div align='center'>" + ad + "</div></body></html>");
221 replace(getComponentAt(0), html, null);
222 revalidate();
223 html.setPageUIID("Container");
224 html.getStyle().setBgTransparency(0);
225 }
226
227 /// The amount of time needed to update the ad
228 ///

Callers 1

actionPerformedMethod · 0.95

Calls 9

setSupressExceptionsMethod · 0.95
setHTMLCallbackMethod · 0.95
setBodyTextMethod · 0.95
setPageUIIDMethod · 0.95
replaceMethod · 0.65
revalidateMethod · 0.65
getStyleMethod · 0.65
getComponentAtMethod · 0.45
setBgTransparencyMethod · 0.45

Tested by

no test coverage detected