本文整理汇总了Java中com.vaadin.ui.CssLayout.setMargin方法的典型用法代码示例。如果您正苦于以下问题:Java CssLayout.setMargin方法的具体用法?Java CssLayout.setMargin怎么用?Java CssLayout.setMargin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.CssLayout
的用法示例。
在下文中一共展示了CssLayout.setMargin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initHeader
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private void initHeader() {
CssLayout header = new CssLayout();
header.setMargin(true);
header.setHeight("15px");
header.setCaption("LOD Management Suite");
header.addStyleName("lodms-header");
header.setIcon(new ClassResource("/at/punkt/lodms/logo.png", getApplication()));
addComponent(header);
}
示例2: init
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
public void init() {
// TODO Make better implementation, not literal
if (notificationManager == null) {
throw new IllegalStateException();
}
if (applicationLifecycleManager == null) {
throw new IllegalStateException();
}
logger.info("Initializing Main Application");
// setTheme(Reindeer.THEME_NAME);
// setTheme(Runo.THEME_NAME);
// setTheme("demo");
setTheme("uno");
main = new Window("Dynamic Vaadin OSGi Demo");
mainLayout = (VerticalLayout) main.getContent();
mainLayout.setMargin(false);
//mainLayout.setStyleName(Reindeer.L "blue");
setMainWindow(main);
mainLayout.setSizeFull();
mainLayout.addComponent(getMenu());
mainLayout.addComponent(getHeader());
CssLayout margin = new CssLayout();
margin.setMargin(false, true, true, true);
margin.setSizeFull();
tabSheet = new TabSheet();
tabSheet.setSizeFull();
tabSheet.setCloseHandler(closeHandler);
margin.addComponent(tabSheet);
mainLayout.addComponent(margin);
mainLayout.setExpandRatio(margin, 1);
for (IVaadinMenuContributor contributor : menuContributorsList) {
contributor.contribute(menubar, this);
}
if (getContext() != null) {
getContext().addTransactionListener(this);
}
initialized = true;
applicationLifecycleManager.init(this);
}
示例3: attach
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
public void attach() {
setSizeFull();
addStyleName(Reindeer.PANEL_LIGHT);
VerticalLayout layout = (VerticalLayout) getContent();
layout.setSizeFull();
layout.addStyleName("loadbalancer-tab");
layout.setSpacing(false);
layout.setMargin(false);
// スプリットパネル
SplitPanel splitPanel = new SplitPanel();
splitPanel.setOrientation(SplitPanel.ORIENTATION_VERTICAL);
splitPanel.setSplitPosition(40);
splitPanel.setSizeFull();
layout.addComponent(splitPanel);
// スプリットパネル上段
VerticalLayout upperLayout = new VerticalLayout();
upperLayout.setSizeFull();
upperLayout.setSpacing(false);
upperLayout.setMargin(false);
CssLayout upperTopLayout = new CssLayout();
Label label = new Label(ViewProperties.getCaption("label.loadbalancer"));
upperTopLayout.setWidth("100%");
upperTopLayout.setMargin(true);
upperTopLayout.addStyleName("loadbalancer-table-label");
upperTopLayout.addComponent(label);
upperTopLayout.setHeight("28px");
upperLayout.addComponent(upperTopLayout);
loadBalancerTable = new LoadBalancerTable(sender);
loadBalancerTable.setContainerDataSource(new LoadBalancerDtoContainer());
upperLayout.addComponent(loadBalancerTable);
loadBalancerTable.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
tableRowSelected(event);
}
});
loadBalancerButtonsBottom = new LoadBalancerButtonsBottom(sender);
upperLayout.addComponent(loadBalancerButtonsBottom);
upperLayout.setExpandRatio(loadBalancerTable, 10);
splitPanel.addComponent(upperLayout);
// スプリットパネル下段
loadBalancerDesc = new LoadBalancerDesc(sender);
splitPanel.addComponent(loadBalancerDesc);
}