本文整理了Java中com.google.gwt.dom.client.Element.setId()
方法的一些代码示例,展示了Element.setId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setId()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:setId
[英]The element's identifier.
[中]元素的标识符。
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public R id(String id) {
assertCanAddAttribute().setId(id);
return getReturnBuilder();
}
代码示例来源:origin: com.googlecode.gwtquery/gwtquery
public void setAttribute(Element e, String key, Object value) {
e.setId(value == null ? null : value.toString());
super.setAttribute(e, key, value);
}
}
代码示例来源:origin: OpenNMS/opennms
@Override
protected void onLoad() {
super.onLoad();
m_widgetContainer.setSize("100%", "100%");
m_svg.setId("TopologyComponent");
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public R id(String id) {
assertCanAddAttribute().setId(id);
return getReturnBuilder();
}
代码示例来源:origin: oVirt/ovirt-engine
@Override
public void setElementId(String elementId) {
getContentWidgetElement().setId(elementId);
updateLabelElementId(elementId);
}
代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app
@Override
protected void onLoad() {
super.onLoad();
m_widgetContainer.setSize("100%", "100%");
m_svg.setId("TopologyComponent");
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public R id(String id) {
assertCanAddAttribute().setId(id);
return getReturnBuilder();
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3
/**
* Ensures the given element has a non-empty id.
*
* @param element The element being examined.
* @see Document#createUniqueId()
*/
private void ensureId(final Element element) {
final String id = element.getId();
if (id == null || id.isEmpty()) {
element.setId(Document.get().createUniqueId());
}
}
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3
/**
* Ensures the given element has a non-empty id.
*
* @param element The element being examined.
* @see Document#createUniqueId()
*/
private void ensureId(final Element element) {
final String id = element.getId();
if (id == null || id.isEmpty()) {
element.setId(Document.get().createUniqueId());
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-addins
/**
* Executes callback method depending on how far into the page you've scrolled
*/
public void apply() {
if (element != null) {
String uid = DOM.createUniqueId();
element.setId(uid);
JsScrollfire.apply("#" + uid, offset, callback::call);
} else {
GWT.log("You must set the element before applying the scrollfire", new IllegalStateException());
}
}
代码示例来源:origin: de.novanic.gwteventservice/gwteventservice
private static Element createFrameElement() {
Frame theDummyFrame = new Frame();
theDummyFrame.setVisible(false);
final Element theDummyFrameElement = theDummyFrame.getElement();
theDummyFrameElement.setId("gwteventservice_dummy_frame");
return theDummyFrameElement;
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
JQMRadio() {
Element element = input.getElement();
element.setId(Document.get().createUniqueId());
element.setAttribute("type", "radio");
setElement(element);
setLabel(new FormLabel());
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
JQMRadio() {
Element element = input.getElement();
element.setId(Document.get().createUniqueId());
element.setAttribute("type", "radio");
setElement(element);
setLabel(new FormLabel());
}
代码示例来源:origin: fr.lteconsulting/hexa.core
private static void ensureFrame()
{
com.google.gwt.dom.client.Element frame = Document.get().getElementById( "__printingFrame" );
if( frame == null )
{
frame = DOM.createIFrame();
frame.setId( "__printingFrame" );
frame.setAttribute( "style", "width:0;height:0;border:0" );
Document.get().getBody().appendChild( frame );
}
}
代码示例来源:origin: ltearno/hexa.tools
private static void ensureFrame()
{
com.google.gwt.dom.client.Element frame = Document.get().getElementById( "__printingFrame" );
if( frame == null )
{
frame = DOM.createIFrame();
frame.setId( "__printingFrame" );
frame.setAttribute( "style", "width:0;height:0;border:0" );
Document.get().getBody().appendChild( frame );
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-ui
private void ensureTreeElement() {
DivElement element = Document.get().createDivElement();
element.addClassName(treeStyles.treeStylesCss().tree());
rootContainer = Document.get().createDivElement();
rootContainer.addClassName(treeStyles.treeStylesCss().contentTree());
rootContainer.setId("content-Tree");
element.appendChild(rootContainer);
setElement(element);
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
protected JQMTableGrid() {
super(Document.get().createTableElement());
Element table = getElement();
table.setId(Document.get().createUniqueId());
tHead = new CustomFlowPanel(Document.get().createTHeadElement());
tBody = new CustomFlowPanel(Document.get().createTBodyElement());
add(tHead);
add(tBody);
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
protected JQMTableGrid() {
super(Document.get().createTableElement());
Element table = getElement();
table.setId(Document.get().createUniqueId());
tHead = new CustomFlowPanel(Document.get().createTHeadElement());
tBody = new CustomFlowPanel(Document.get().createTBodyElement());
add(tHead);
add(tBody);
}
代码示例来源:origin: OpenNMS/opennms
protected LoadTracker() {
if(Document.get().getElementById(m_trackerDivId) == null) {
Element div = DOM.createDiv();
div.getStyle().setPosition(Position.ABSOLUTE);
div.getStyle().setTop(0.0, Unit.PX);
div.getStyle().setLeft(-9999.0, Unit.PX);
div.getStyle().setVisibility(Visibility.HIDDEN);
div.setId("loadTracker");
Document.get().getBody().appendChild(div);
}
}
代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app
protected LoadTracker() {
if(Document.get().getElementById(m_trackerDivId) == null) {
Element div = DOM.createDiv();
div.getStyle().setPosition(Position.ABSOLUTE);
div.getStyle().setTop(0.0, Unit.PX);
div.getStyle().setLeft(-9999.0, Unit.PX);
div.getStyle().setVisibility(Visibility.HIDDEN);
div.setId("loadTracker");
Document.get().getBody().appendChild(div);
}
}
内容来源于网络,如有侵权,请联系作者删除!