本文整理了Java中com.vaadin.flow.dom.Element.callFunction()
方法的一些代码示例,展示了Element.callFunction()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.callFunction()
方法的具体详情如下:
包路径:com.vaadin.flow.dom.Element
类名称:Element
方法名:callFunction
[英]Calls the given function on the element with the given arguments.
The function will be called after all pending DOM updates have completed, at the same time that Page#executeJavaScript(String,Serializable...) calls are invoked.
If the element is not attached, the function call will be deferred until the element is attached.
[中]使用给定参数对元素调用给定函数。
该函数将在所有挂起的DOM更新完成后调用,同时调用页面#executeJavaScript(字符串,可序列化…)调用调用。
如果未附加元素,则函数调用将推迟到附加元素。
代码示例来源:origin: com.vaadin/flow-server
/**
* Calls the <code>blur</code> function at the client, making the component
* lose keyboard focus.
*
* @see <a href=
* "https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur">blur
* at MDN</a>
*/
default void blur() {
getElement().callFunction("blur");
}
代码示例来源:origin: com.vaadin/vaadin-date-picker-flow
/**
* <p>
* Description copied from corresponding location in WebComponent:
* </p>
* <p>
* Opens the dropdown.
* </p>
*/
protected void open() {
getElement().callFunction("open");
}
代码示例来源:origin: com.vaadin/vaadin-notification-flow
/**
* <p>
* Description copied from corresponding location in WebComponent:
* </p>
* <p>
* Opens the notification.
* </p>
*/
protected void open() {
getElement().callFunction("open");
}
代码示例来源:origin: com.vaadin/vaadin-select-flow
/**
* <p>
* Description copied from corresponding location in WebComponent:
* </p>
* <p>
* Manually invoke existing renderer.
* </p>
*/
protected void render() {
getElement().callFunction("render");
}
代码示例来源:origin: com.vaadin/vaadin-context-menu-flow
/**
* <p>
* Description copied from corresponding location in WebComponent:
* </p>
* <p>
* Closes the overlay.
* </p>
*/
protected void close() {
getElement().callFunction("close");
}
代码示例来源:origin: com.vaadin/vaadin-context-menu-flow
/**
* <p>
* Description copied from corresponding location in WebComponent:
* </p>
* <p>
* Opens the overlay.
* </p>
*/
protected void open() {
getElement().callFunction("open");
}
代码示例来源:origin: com.vaadin/vaadin-crud-flow
/**
* Opens or closes the editor. In most use cases opening or closing the editor
* is automatically done by the component and this method does not need to be called.
*
* @param opened true to open or false to close
*/
public void setOpened(boolean opened) {
getElement().callFunction("set", "editorOpened", opened);
}
代码示例来源:origin: com.vaadin/vaadin-date-picker-flow
/**
* <p>
* Description copied from corresponding location in WebComponent:
* </p>
* <p>
* Closes the dropdown.
* </p>
*/
protected void close() {
getElement().callFunction("close");
}
代码示例来源:origin: com.vaadin/vaadin-context-menu-flow
private void updateOpenOn() {
if (target != null) {
target.getElement().callFunction(
"$contextMenuConnector.updateOpenOn", openOnEventName);
}
}
代码示例来源:origin: com.vaadin/vaadin-text-field-flow
protected void checkValidity() {
getElement().callFunction("checkValidity");
}
代码示例来源:origin: com.vaadin/vaadin-button-flow
/**
* Executes a click on this button at the client-side. Calling this method
* behaves the same as if the user would have clicked on the button.
*/
public void clickInClient() {
getElement().callFunction("click");
}
代码示例来源:origin: com.vaadin/vaadin-notification-flow
/**
* <p>
* Description copied from corresponding location in WebComponent:
* </p>
* <p>
* Closes the notification.
* </p>
*/
protected void close() {
getElement().callFunction("close");
}
代码示例来源:origin: appreciated/vaadin-app-layout
public void toggleDrawer() {
getDrawer().getElement().callFunction("toggle");
}
代码示例来源:origin: com.vaadin/vaadin-charts-flow
@Override
public void seriesStateChanged(SeriesStateEvent event) {
if (event.isEnabled()) {
chart.getElement().callFunction("__callSeriesFunction", "show",
getSeriesIndex(event));
} else {
chart.getElement().callFunction("__callSeriesFunction", "hide",
getSeriesIndex(event));
}
}
代码示例来源:origin: com.vaadin/vaadin-charts-flow
@Override
public void dataRemoved(DataRemovedEvent event) {
chart.getElement().callFunction("__callPointFunction", "remove",
getSeriesIndex(event), event.getIndex());
}
代码示例来源:origin: com.vaadin/vaadin-charts-flow
@Override
public void axisRescaled(AxisRescaledEvent event) {
chart.getElement().callFunction("__callAxisFunction", "setExtremes",
event.getAxis(), event.getAxisIndex(),
event.getMinimum().doubleValue(),
event.getMaximum().doubleValue(), event.isRedrawingNeeded(),
event.isAnimated());
}
代码示例来源:origin: com.vaadin/vaadin-charts-flow
@Override
public void seriesAdded(SeriesAddedEvent event) {
chart.getElement().callFunction("__callChartFunction", "addSeries",
chart.getJsonFactory().parse(ChartSerialization.toJSON(
(AbstractConfigurationObject) event.getSeries())));
}
代码示例来源:origin: com.vaadin/vaadin-charts-flow
@Override
public void itemSliced(ItemSlicedEvent event) {
chart.getElement().callFunction("__callPointFunction", "slice",
getSeriesIndex(event), event.getIndex(), event.isSliced(),
event.isRedraw(), event.isAnimation());
}
代码示例来源:origin: com.vaadin/vaadin-charts-flow
@Override
public void seriesChanged(SeriesChangedEvent event) {
chart.getElement().callFunction("__callSeriesFunction", "update",
getSeriesIndex(event),
chart.getJsonFactory().parse(ChartSerialization.toJSON(
(AbstractConfigurationObject) event.getSeries())));
}
代码示例来源:origin: com.vaadin/vaadin-charts-flow
@Override
public void dataAdded(DataAddedEvent event) {
if (event.getItem() != null) {
chart.getElement().callFunction("__callSeriesFunction",
"addPoint", getSeriesIndex(event),
chart.getJsonFactory().parse(
ChartSerialization.toJSON(event.getItem())),
true, event.isShift());
}
}
内容来源于网络,如有侵权,请联系作者删除!