本文整理了Java中com.vaadin.flow.component.Tag
类的一些代码示例,展示了Tag
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag
类的具体详情如下:
包路径:com.vaadin.flow.component.Tag
类名称:Tag
暂无
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin-flow
@SuppressWarnings("serial")
@Tag(Tag.DIV)
private static class WindowSizeReceiver extends Component {
private final BiConsumer<Integer, Integer> callback;
public WindowSizeReceiver(BiConsumer<Integer, Integer> callback) {
super();
this.callback = callback;
}
@ClientCallable
private void windowSize(int width, int height) {
this.callback.accept(width, height);
}
}
代码示例来源:origin: com.vaadin/flow-server
private void injectClientSideElement(String tagName, String id,
Field field) {
Class<?> fieldType = field.getType();
Tag tag = fieldType.getAnnotation(Tag.class);
if (tag != null && !tagName.equalsIgnoreCase(tag.value())) {
String msg = String.format(
"Class '%s' has field '%s' whose type '%s' is annotated with "
+ "tag '%s' but the element defined in the HTML "
+ "template with id '%s' has tag name '%s'",
templateClass.getName(), field.getName(),
fieldType.getName(), tag.value(), id, tagName);
throw new IllegalStateException(msg);
}
attachExistingElementById(tagName, id, field);
}
代码示例来源:origin: com.vaadin/flow-server
@Tag(Tag.DIV)
private static class ResizeEventReceiver extends Component {
private int windowResizeListenersSize;
@ClientCallable
private void windowResized(int width, int height) {
if (windowResizeListenersSize != 0) {
fireEvent(new ResizeEvent(this, width, height));
}
}
private Registration addListener(BrowserWindowResizeListener listener) {
windowResizeListenersSize++;
Registration registration = addListener(ResizeEvent.class,
event -> listener
.browserWindowResized(event.getApiEvent()));
return new ResizeRegistration(this, registration);
}
private void listenerIsUnregistered() {
windowResizeListenersSize--;
if (windowResizeListenersSize == 0) {
// remove JS listener
getUI().get().getPage().executeJavaScript("$0.resizeRemove()",
this);
}
}
}
代码示例来源:origin: com.vaadin/vaadin-accordion-flow
@Tag("vaadin-accordion-panel")
public class AccordionPanel extends Details {
代码示例来源:origin: com.vaadin/vaadin-select-flow
@Tag("vaadin-item")
class VaadinItem<T> extends Component
implements HasItemsAndComponents.ItemComponent<T>, HasComponents,
代码示例来源:origin: com.vaadin/flow-component-demo-helpers
@Tag("nav")
public class DemoNavigationBar extends HtmlContainer {
代码示例来源:origin: com.vaadin/vaadin-ordered-layout-flow
@Tag(Tag.DIV)
public class FlexLayout extends Component implements FlexComponent<FlexLayout> {
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-layout-left-responsive")
@HtmlImport("frontend://com/github/appreciated/app-layout/left/left-responsive.html")
class LeftResponsive extends AbstractLeftAppLayoutBase {
@Override
public String getStyleName() {
return "left-responsive";
}
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-layout-left")
@HtmlImport("frontend://com/github/appreciated/app-layout/left/left.html")
class Left extends AbstractLeftAppLayoutBase {
@Override
public String getStyleName() {
return "left";
}
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-layout-left-overlay")
@HtmlImport("frontend://com/github/appreciated/app-layout/left/left-overlay.html")
class LeftOverlay extends AbstractLeftAppLayoutBase {
@Override
public String getStyleName() {
return "left-overlay";
}
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-layout-left-responsive-overlay")
@HtmlImport("frontend://com/github/appreciated/app-layout/left/left-responsive-overlay.html")
class LeftResponsiveOverlay extends AbstractLeftAppLayoutBase {
@Override
public String getStyleName() {
return "left-responsive-overlay";
}
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-layout-left-responsive-overlay-no-app-bar")
@HtmlImport("frontend://com/github/appreciated/app-layout/left/left-responsive-overlay-no-app-bar.html")
class LeftResponsiveOverlayNoAppBar extends AbstractLeftAppLayoutBase {
@Override
public String getStyleName() {
return "left-responsive-overlay-no-app-bar";
}
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-header")
@HtmlImport("bower_components/app-layout/app-header/app-header.html")
public class AppHeader extends Component implements HasSize, HasComponents {
}
代码示例来源:origin: vaadin/spring
@HtmlImport("/components/CustomElement.html")
@Tag("custom-element")
public class CustomElement extends PolymerTemplate<TemplateModel> {
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-drawer-layout")
@HtmlImport("bower_components/app-layout/app-drawer-layout/app-drawer-layout.html")
public class AppDrawerLayout extends Component implements HasComponents {
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-drawer")
@HtmlImport("bower_components/app-layout/app-drawer/app-drawer.html")
public class AppDrawer extends Component implements HasSize, HasComponents {
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-header-layout")
@HtmlImport("bower_components/app-layout/app-header-layout/app-header-layout.html")
public class AppHeaderLayout extends Component implements HasComponents {
}
代码示例来源:origin: appreciated/vaadin-app-layout
@Tag("app-toolbar")
@HtmlImport("bower_components/app-layout/app-toolbar/app-toolbar.html")
public class AppToolbar extends Component implements HasSize, HasComponents {
}
代码示例来源:origin: com.vaadin/flow-server
@Tag(Tag.A)
public class RouterLink extends Component
implements HasText, HasComponents, HasStyle, AfterNavigationObserver {
代码示例来源:origin: vaadin/spring
@Tag("child-template")
@HtmlImport("ChildTemplate.html")
public class ChildTemplate extends PolymerTemplate<TemplateModel> {
@Component
@VaadinSessionScope
public static class BackendImpl implements Backend {
@Override
public String getMessage() {
return "foo";
}
}
public interface Backend {
String getMessage();
}
@Autowired
private Backend backend;
@Override
protected void onAttach(AttachEvent attachEvent) {
getElement().setProperty("message", backend.getMessage());
}
}
内容来源于网络,如有侵权,请联系作者删除!