本文整理汇总了Java中elemental2.dom.HTMLElement类的典型用法代码示例。如果您正苦于以下问题:Java HTMLElement类的具体用法?Java HTMLElement怎么用?Java HTMLElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HTMLElement类属于elemental2.dom包,在下文中一共展示了HTMLElement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createTable
import elemental2.dom.HTMLElement; //导入依赖的package包/类
private HTMLElement createTable(List<Person> result) {
resultTable = table().css("resultTable")
.add(colgroup().add(col().style("width: 40%;"))
.add(col().style("width: 25%;"))
.add(col().style("width: 10%;"))
.add(col().style("width: 25%;")))
.add(thead().add(th().css("resultTableHeader")
.textContent("Name"))
.add(th().css("resultTableHeader")
.textContent("Street"))
.add(th().css("resultTableHeader")
.textContent("Zip"))
.add(th().css("resultTableHeader")
.textContent("City")))
.asElement();
for (Person person : result) {
resultTable.appendChild(this.createTableDataRow(person));
}
return resultTable;
}
开发者ID:mvp4g,项目名称:mvp4g2-examples,代码行数:23,代码来源:ListView.java
示例2: testMapZoom
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public void testMapZoom(){
InjectedLeafletResources.whenReady((e) -> {
HTMLElement div = (HTMLElement) DomGlobal.document.createElement("div");
div.id = "test3";
DomGlobal.document.body.appendChild(div);
MapOptions options = new MapOptions.Builder(L.latLng(52.51, 13.40), 12.0, 7.0).dragging(true).maxZoom(20.0).build();
Map map = L.map("test3", options);
assertNotNull(map);
assertEquals(String.valueOf(map.getZoom()), "12");
assertEquals(String.valueOf(map.getMinZoom()), "7");
assertEquals(String.valueOf(map.getMaxZoom()), "20");
//Zoom In method has weird behavior *** Fails
map.zoomOut(5.0, null);
assertEquals("7", map.getZoom().toString());
return null;
});
}
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:21,代码来源:MapTest.java
示例3: testMapPan
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public void testMapPan(){
InjectedLeafletResources.whenReady((e) -> {
HTMLElement div = (HTMLElement) DomGlobal.document.createElement("div");
div.id = "test4";
DomGlobal.document.body.appendChild(div);
MapOptions options = new MapOptions.Builder(L.latLng(52.51, 13.40), 12.0, 7.0).maxZoom(20.0).build();
Map map = L.map("test4", options);
assertNotNull(map);
map.panTo(L.latLng(51.51, 13.80), null);
assertEquals(map.getCenter().lat, 51.51);
assertEquals(map.getCenter().lng, 13.80);
return null;
});
}
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:17,代码来源:MapTest.java
示例4: testMarkeradd
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public void testMarkeradd(){
InjectedLeafletResources.whenReady((e) -> {
HTMLElement div = (HTMLElement) DomGlobal.document.createElement("div");
div.id = "test6";
DomGlobal.document.body.appendChild(div);
Map map = L.map("test6", null);
MarkerOptions mkOptions = new MarkerOptions.Builder().build();
Marker marker = L.marker(L.latLng(52.51, 13.40), mkOptions);
marker.addTo(map);
assertNotNull(map);
assertNotNull(marker);
assertEquals(marker.getLatLng().lat, 52.51);
assertEquals(marker.getLatLng().lng, 13.40);
return null;
});
}
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:21,代码来源:MarkerTest.java
示例5: getShadowRoot
import elemental2.dom.HTMLElement; //导入依赖的package包/类
@Override
public native HTMLElement getShadowRoot(HTMLElement element)
/*-{
if (element.shadowController) {
return element.shadowController;
}
if (element.shadowRoot) {
return element.shadowRoot;
}
if (element.attachShadow) {
return element.attachShadow({mode: "open"});
}
if (element.createShadowRoot) {
return element.createShadowRoot();
}
return element;
}-*/;
开发者ID:WeTheInternet,项目名称:xapi,代码行数:18,代码来源:Gwt3ServiceDefault.java
示例6: createTableDataRow
import elemental2.dom.HTMLElement; //导入依赖的package包/类
private HTMLElement createTableDataRow(Person person) {
return tr().add(td().add(div().css("resultTableLink")
.textContent(person.getName() + ", " + person.getFirstName())
.on(click,
(event) -> getPresenter().doUpdate(person))))
.add(td().textContent(person.getAddress()
.getStreet()))
.add(td().textContent(person.getAddress()
.getZip()))
.add(td().textContent(person.getAddress()
.getCity()))
.asElement();
}
开发者ID:mvp4g,项目名称:mvp4g2-examples,代码行数:14,代码来源:ListView.java
示例7: testMapCreateWithId
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public void testMapCreateWithId(){
InjectedLeafletResources.whenReady((e) -> {
HTMLElement div = (HTMLElement) DomGlobal.document.createElement("div");
div.id = "test";
DomGlobal.document.body.appendChild(div);
Map map = L.map("test", null);
assertNotNull(map);
return null;
});
}
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:13,代码来源:MapTest.java
示例8: testMapCreateWithHTMLElement
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public void testMapCreateWithHTMLElement(){
InjectedLeafletResources.whenReady((e) -> {
HTMLElement mapContainer = (HTMLElement) DomGlobal.document.createElement("div");
Map map = L.map(mapContainer, null);
assertNotNull(map);
return null;
});
}
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:9,代码来源:MapTest.java
示例9: testMapRemove
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public void testMapRemove(){
InjectedLeafletResources.whenReady((e) -> {
HTMLElement div = (HTMLElement) DomGlobal.document.createElement("div");
div.id = "test5";
DomGlobal.document.body.appendChild(div);
MapOptions options = new MapOptions.Builder(L.latLng(52.51, 13.40), 12.0, 7.0).maxZoom(20.0).build();
Map map = L.map("test5", options);
assertNotNull(map);
map.remove();
return null;
});
}
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:16,代码来源:MapTest.java
示例10: testMapView
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public void testMapView(){
InjectedLeafletResources.whenReady((e) -> {
HTMLElement div = (HTMLElement) DomGlobal.document.createElement("div");
div.id = "test2";
DomGlobal.document.body.appendChild(div);
Map map = L.map("test2", null);
map.setView(L.latLng(52.51, 13.40), 12.0, null);
assertNotNull(map);
assertEquals(map.getCenter().lat, 52.51);
assertEquals(map.getCenter().lng, 13.40);
return null;
});
}
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:16,代码来源:MapTest.java
示例11: Gwt3ServiceDefault
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public Gwt3ServiceDefault() {
offscreen = Lazy.deferred1(()->{
HTMLElement el = X_Gwt3.newDiv();
el.style.position = "absolute";
el.style.left = "-2000px";
el.style.top = "-2000px";
DomGlobal.document.body.appendChild(el);
return el;
});
}
开发者ID:WeTheInternet,项目名称:xapi,代码行数:11,代码来源:Gwt3ServiceDefault.java
示例12: remove
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public void remove(final HTMLElement element) {
Optional.ofNullable(element.parentNode)
.filter(n -> n.nodeType == Node.ELEMENT_NODE)
.map(n -> (HTMLElement) n)
.filter(e -> "li".equalsIgnoreCase(e.tagName))
.filter(e -> e.parentNode == navlist)
.ifPresent(e -> navlist.removeChild(e));
}
开发者ID:errai,项目名称:errai-tutorial,代码行数:9,代码来源:NavBar.java
示例13: get
import elemental2.dom.HTMLElement; //导入依赖的package包/类
@Override
public HTMLElement get() {
return this.asElement();
}
开发者ID:GwtDomino,项目名称:domino-todolist,代码行数:5,代码来源:ItemsList.java
示例14: get
import elemental2.dom.HTMLElement; //导入依赖的package包/类
public HTMLElement get(String selector) {
return (HTMLElement) element.querySelector(selector);
}
开发者ID:xemantic,项目名称:github-users-web,代码行数:4,代码来源:Elements.java
示例15: asElement
import elemental2.dom.HTMLElement; //导入依赖的package包/类
@Override
public HTMLElement asElement() {
return this.container;
}
开发者ID:mvp4g,项目名称:mvp4g2-examples,代码行数:5,代码来源:TextField.java
示例16: bindPopup
import elemental2.dom.HTMLElement; //导入依赖的package包/类
@JsMethod
public native L bindPopup(HTMLElement content, PopupOptions options);
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:3,代码来源:Renderer.java
示例17: setPopupContent
import elemental2.dom.HTMLElement; //导入依赖的package包/类
@JsMethod
public native L setPopupContent(HTMLElement content);
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:3,代码来源:Renderer.java
示例18: bindTooltip
import elemental2.dom.HTMLElement; //导入依赖的package包/类
@JsMethod
public native L bindTooltip(HTMLElement content, TooltipOptions options);
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:3,代码来源:Icon.java
示例19: setTooltipContent
import elemental2.dom.HTMLElement; //导入依赖的package包/类
@JsMethod
public native L setTooltipContent(HTMLElement content);
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:3,代码来源:Icon.java
示例20: getPane
import elemental2.dom.HTMLElement; //导入依赖的package包/类
@JsMethod
public native HTMLElement getPane(String name);
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:3,代码来源:Icon.java
注:本文中的elemental2.dom.HTMLElement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论