本文整理汇总了Java中com.vaadin.ui.Layout.addComponent方法的典型用法代码示例。如果您正苦于以下问题:Java Layout.addComponent方法的具体用法?Java Layout.addComponent怎么用?Java Layout.addComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Layout
的用法示例。
在下文中一共展示了Layout.addComponent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFooter
import com.vaadin.ui.Layout; //导入方法依赖的package包/类
private Layout getFooter() {
Layout footer = new HorizontalLayout();
footer.addComponent(new Label("Persephone v"+persephoneVersion));
footer.addComponent(new Link("Created by Vianney FAIVRE", new ExternalResource("https://vianneyfaiv.re"), "_blank", 0, 0, BorderStyle.DEFAULT));
footer.addComponent(new Link("GitHub", new ExternalResource("https://github.com/vianneyfaivre/Persephone"), "_blank", 0, 0, BorderStyle.DEFAULT));
footer.setHeight(20, Unit.PIXELS);
footer.setStyleName("persephone-footer");
return footer;
}
示例2: WindowBreadCrumbs
import com.vaadin.ui.Layout; //导入方法依赖的package包/类
public WindowBreadCrumbs(AppWorkArea workArea) {
setWidth(100, Unit.PERCENTAGE);
setHeightUndefined();
setPrimaryStyleName(C_HEADLINE_CONTAINER);
tabbedMode = workArea.getMode() == AppWorkArea.Mode.TABBED;
if (tabbedMode) {
super.setVisible(false);
}
addAttachListener((AttachListener) event ->
adjustParentStyles()
);
logoLayout = createLogoLayout();
linksLayout = createLinksLayout();
linksLayout.setSizeUndefined();
if (!tabbedMode) {
closeBtn = new CubaButton("", (Button.ClickListener) event -> {
Window window = getCurrentWindow();
if (!isCloseWithCloseButtonPrevented(window)) {
window.close(Window.CLOSE_ACTION_ID);
}
});
closeBtn.setIcon(WebComponentsHelper.getIcon("icons/close.png"));
closeBtn.setStyleName("c-closetab-button");
}
AppUI ui = AppUI.getCurrent();
if (ui.isTestMode()) {
TestIdManager testIdManager = ui.getTestIdManager();
linksLayout.setId(testIdManager.getTestId("breadCrumbs"));
linksLayout.setCubaId("breadCrumbs");
if (closeBtn != null) {
closeBtn.setId(testIdManager.getTestId("closeBtn"));
closeBtn.setCubaId("closeBtn");
}
}
Layout enclosingLayout = createEnclosingLayout();
enclosingLayout.addComponent(linksLayout);
addComponent(logoLayout);
addComponent(enclosingLayout);
if (closeBtn != null) {
addComponent(closeBtn);
}
}