本文整理了Java中com.vaadin.flow.dom.Element.<init>()
方法的一些代码示例,展示了Element.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.<init>()
方法的具体详情如下:
包路径:com.vaadin.flow.dom.Element
类名称:Element
方法名:<init>
[英]Private constructor for initializing with an existing node and state provider.
[中]用于使用现有节点和状态提供程序初始化的专用构造函数。
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates a {@code <div>} element.
*
* @return a {@code <div>} element.
*/
static Element createDiv() {
return new Element(Tag.DIV);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <li>} element.
*
* @return an {@code <li>} element.
*/
static Element createListItem() {
return new Element(Tag.LI);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <label>} element.
*
* @return an {@code <label>} element.
*/
static Element createLabel() {
return new Element(Tag.LABEL);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates a {@code <select>} element.
*
* @return a {@code <select>} element.
*/
static Element createSelect() {
return new Element(Tag.SELECT);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates a {@code <strong>} element.
*
* @return a {@code <strong>} element.
*/
static Element createStrong() {
return new Element(Tag.STRONG);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <h1>} element.
*
* @return an {@code <h1>} element.
*/
static Element createHeading1() {
return new Element(Tag.H1);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <h2>} element.
*
* @return an {@code <h2>} element.
*/
static Element createHeading2() {
return new Element(Tag.H2);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <h3>} element.
*
* @return an {@code <h3>} element.
*/
static Element createHeading3() {
return new Element(Tag.H3);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <h5>} element.
*
* @return an {@code <h5>} element.
*/
static Element createHeading5() {
return new Element(Tag.H5);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates a {@code <ul>} element.
*
* @return a {@code <ul>} element.
*/
static Element createUnorderedList() {
return new Element(Tag.UL);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <em>} element.
*
* @return an {@code <em>} element.
*/
static Element createEmphasis() {
return new Element(Tag.EM);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <a>} element.
*
* @return an {@code <a>} element.
*/
static Element createAnchor() {
return new Element(Tag.A);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <h4>} element.
*
* @return an {@code <h4>} element.
*/
static Element createHeading4() {
return new Element(Tag.H4);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <h6>} element.
*
* @return an {@code <h6>} element.
*/
static Element createHeading6() {
return new Element(Tag.H6);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates an {@code <input>} element.
*
* @return an {@code <input>} element.
*/
static Element createInput() {
return new Element(Tag.INPUT);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates a {@code <p>} element.
*
* @return a {@code <p>} element.
*/
static Element createParagraph() {
return new Element(Tag.P);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates a {@code <pre>} element.
*
* @return a {@code <pre>} element.
*/
static Element createPreformatted() {
return new Element(Tag.PRE);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates a {@code <span>} element.
*
* @return a {@code <span>} element.
*/
static Element createSpan() {
return new Element(Tag.SPAN);
}
代码示例来源:origin: com.vaadin/flow-server
/**
* Creates a {@code <p>} element with the given text content.
*
* @param textContent
* the text content of the element
* @return a {@code <p>} element.
*/
static Element createParagraph(String textContent) {
return new Element(Tag.P).setText(textContent);
}
代码示例来源:origin: com.vaadin/flow-component-demo-helpers
private void addSourceCodeBlock(String text, String className) {
Element pre = new Element("pre");
Element code = new Element("code");
pre.appendChild(code);
code.setAttribute("spellcheck", "false");
code.getClassList().add(className);
code.setText(text);
getElement().appendChild(pre);
}
}
内容来源于网络,如有侵权,请联系作者删除!