本文整理汇总了Java中com.vaadin.ui.CssLayout.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java CssLayout.setHeight方法的具体用法?Java CssLayout.setHeight怎么用?Java CssLayout.setHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.CssLayout
的用法示例。
在下文中一共展示了CssLayout.setHeight方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildContent
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private Component buildContent() {
final CssLayout menuContent = new CssLayout();
menuContent.addStyleName("sidebar");
menuContent.addStyleName(ValoTheme.MENU_PART);
menuContent.addStyleName("no-vertical-drag-hints");
menuContent.addStyleName("no-horizontal-drag-hints");
menuContent.setWidth(null);
menuContent.setHeight("100%");
menuContent.addComponent(buildTitle());
menuContent.addComponent(buildUserMenu());
menuContent.addComponent(buildToggleButton());
menuContent.addComponent(buildMenuItems());
return menuContent;
}
示例2: createRating
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public static CssLayout createRating(Customer customer) {
CssLayout layout = new CssLayout();
layout.setHeight(49, Sizeable.Unit.PIXELS);
layout.setWidth(100, Sizeable.Unit.PIXELS);
Label overallRating = new Label(FontAwesome.STAR.getHtml(), ContentMode.HTML);
overallRating.addStyleName("green");
overallRating.setDescription("Very good : " + testData.getNumberBetween(90, 100) + "% Chance");
overallRating.setWidthUndefined();
overallRating.setWidth(49, Sizeable.Unit.PIXELS);
overallRating.setHeight(49, Sizeable.Unit.PIXELS);
layout.addComponent(overallRating);
Label carRating = new Label(FontAwesome.CAR.getHtml(), ContentMode.HTML);
carRating.addStyleName("red");
carRating.setDescription("Unlikely : " + testData.getNumberBetween(1, 15) + "%");
carRating.setWidthUndefined();
carRating.setWidth(49, Sizeable.Unit.PIXELS);
carRating.setHeight(49, Sizeable.Unit.PIXELS);
layout.addComponent(carRating);
return layout;
}
示例3: initInputField
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected void initInputField() {
// Csslayout is used to style inputtext as rounded
CssLayout csslayout = new CssLayout();
csslayout.setHeight(24, UNITS_PIXELS);
csslayout.setWidth(100, UNITS_PERCENTAGE);
layout.addComponent(csslayout);
inputField = new TextField();
inputField.setWidth(100, UNITS_PERCENTAGE);
inputField.addStyleName(ExplorerLayout.STYLE_SEARCHBOX);
inputField.setInputPrompt(i18nManager.getMessage(Messages.TASK_CREATE_NEW));
inputField.focus();
csslayout.addComponent(inputField);
layout.setComponentAlignment(csslayout, Alignment.MIDDLE_LEFT);
layout.setExpandRatio(csslayout, 1.0f);
}
示例4: createCompositionRoot
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected CssLayout createCompositionRoot() {
CssLayout layout = new CssLayout();
layout.addStyleName(ValoTheme.MENU_PART);
if (largeIcons) {
layout.addStyleName(ValoTheme.MENU_PART_LARGE_ICONS);
}
layout.setWidth(null);
layout.setHeight("100%");
if (logo != null) {
layout.addComponent(logo);
}
if (headerLayout != null) {
layout.addComponent(headerLayout);
}
return layout;
}
示例5: displayChart
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
final protected void displayChart() {
removeAllComponents();
final JFreeChart chart = createChart();
final JFreeChartWrapper chartWrapper = new JFreeChartWrapper(chart);
final CssLayout borderWrap = new CssLayout();
borderWrap.addComponent(chartWrapper);
borderWrap.setStyleName("chart-wrapper");
borderWrap.setHeight(height + "px");
borderWrap.setWidth(width + "px");
chartWrapper.setHeight(height + "px");
chartWrapper.setWidth(width + "px");
chartWrapper.setGraphHeight(height);
chartWrapper.setGraphWidth(width);
this.addComponent(borderWrap);
final Component legendBox = createLegendBox();
if (legendBox != null) {
this.addComponent(legendBox);
}
}
示例6: buildContent
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
public Component buildContent() {
final CssLayout menuContent = new CssLayout();
menuContent.addStyleName("sidebar");
menuContent.addStyleName(ValoTheme.MENU_PART);
menuContent.addStyleName("no-vertical-drag-hints");
menuContent.addStyleName("no-horizontal-drag-hints");
menuContent.setWidth(null);
menuContent.setHeight("100%");
// menuContent.addComponent(buildTitle());
menuContent.addComponent(buildUserMenu());
menuContent.addComponent(buildToggleButton());
menuContent.addComponent(buildMenuItems());
content = menuContent;
return menuContent;
}
示例7: addStep
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public Step addStep(String name, String info) {
if (steps.size() > 0) {
CssLayout connector = new CssLayout();
connector.setHeight(Metrics.Stepper.CONNECTOR_HEIGHT, Unit.PIXELS);
connector.addStyleName(MaterialColor.DARK_DIVIDER.getBackgroundColorStyle());
connector.addStyleName(FlexItem.FlexGrow.GROW_1);
addComponent(connector);
}
Step s = createStep(steps.size() + 1, name, info);
addComponent(s);
steps.add(s);
return s;
}
示例8: initDummyContent
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private void initDummyContent() {
CssLayout card = new CssLayout();
card.setWidth(100, Unit.PERCENTAGE);
card.setHeight(320, Unit.PIXELS);
card.addStyleName("card");
card.addStyleName(Margins.All.LARGE);
content.addComponent(card);
}
示例9: RowLayout
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private RowLayout(Step step) {
this.step = step;
label = getLabelProvider().getStepLabel(step);
divider = new CssLayout();
divider.addStyleName(STYLE_DIVIDER);
divider.setHeight(100, Unit.PERCENTAGE);
contentContainer = new Panel();
contentContainer.addStyleName(STYLE_CONTENT_CONTAINER);
contentContainer.addStyleName(ValoTheme.PANEL_BORDERLESS);
contentContainer.setSizeFull();
buttonBar = new HorizontalLayout();
buttonBar.addStyleName(STYLE_BUTTON_BAR);
buttonBar.setMargin(false);
buttonBar.setSpacing(true);
buttonBar.setWidth(100, Unit.PERCENTAGE);
buttonBar.setMargin(new MarginInfo(false, false, !isLastStep(step), false));
rootLayout = new GridLayout(2, 3);
rootLayout.setSizeFull();
rootLayout.setMargin(false);
rootLayout.setSpacing(false);
rootLayout.setColumnExpandRatio(1, 1);
rootLayout.setRowExpandRatio(1, 1);
rootLayout.addComponent(label, 0, 0, 1, 0);
rootLayout.addComponent(divider, 0, 1, 0, 2);
rootLayout.addComponent(contentContainer, 1, 1, 1, 1);
rootLayout.addComponent(buttonBar, 1, 2, 1, 2);
setCompositionRoot(rootLayout);
addStyleName(STYLE_COMPONENT);
setWidth(100, Unit.PERCENTAGE);
setActive(false);
}
示例10: 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);
}
示例11: buildMenuItems
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private Component buildMenuItems() {
itemButtons.clear();
CssLayout menuItemsLayout = new CssLayout();
menuItemsLayout.addStyleName("valo-menuitems");
menuItemsLayout.setHeight(100.0f, Unit.PERCENTAGE);
Set<Bean<?>> allViews = beanManager.getBeans(View.class, new AnnotationLiteral<Any>() {
});
Consumer<Bean<?>> buildMenuItem = e -> {
Title title = BeanUtility.getAnnotation(e, Title.class);
ValoMenuItemButton menuItemButton = new ValoMenuItemButton(Messages.getString(title.value()),
BeanUtility.getAnnotation(e, CDIView.class).value(), title.icon());
menuItemsLayout.addComponent(menuItemButton);
itemButtons.add(menuItemButton);
};
allViews.stream()
.filter(ViewUtility.filterCDIViewsForMainUI.and(v -> ViewUtility
.isUserViewAllowed((Class<? extends View>) v.getBeanClass(), SessionManager.getLoggedUser())))
.sorted(ViewUtility.titleIndexComparator).forEach(buildMenuItem);
return menuItemsLayout;
}
示例12: createDivider
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private CssLayout createDivider() {
CssLayout divider = new CssLayout();
divider.setHeight(16, Unit.PIXELS);
return divider;
}
示例13: 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);
}
示例14: showSlide
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
public void showSlide(String template, String content) {
notifications.setCloseTimeout(5000);
notifications.setPosition(Position.BOTTOM_RIGHT);
container = factory.createSlideContainer(template, content, reader);
if (container != null) {
container.getPresenter().buildDone();
mask = Mask.addToComponent(container);
mask.setColor("rgba(127,255,127,0.2)");
mask.show();
Window window = new Window("Slide preview");
CssLayout topLayout = new CssLayout();
topLayout.setSizeFull();
VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
topLayout.addComponent(layout);
Toolbox toolbox = new Toolbox();
toolbox.setOrientation(ORIENTATION.TOP_CENTER);
toolbox.setOverflowSize(5);
HorizontalLayout hl = new HorizontalLayout();
hl.setSpacing(true);
Button startButton = new Button("Start slide", e -> {
e.getButton().setEnabled(false);
startClicked();
});
hl.addComponent(startButton);
CssLayout tlLayout = new CssLayout(toolbox);
tlLayout.setHeight("0px");
topLayout.addComponent(tlLayout);
// layout.setExpandRatio(tlLayout, 0f);
toolbox.setContent(hl);
topLayout.addComponent(notifications);
/*
* sliderPanel = new SliderPanelBuilder(new Button("Start slide",
* new ClickListener() {
*
* @Override public void buttonClick(ClickEvent event) {
* event.getButton().setEnabled(false); startClicked(); }
* })).expanded(false).mode(SliderMode.TOP).caption("Tools").
* autoCollapseSlider(true)
* .tabPosition(SliderTabPosition.BEGINNING).build();
*
* layout.addComponent(sliderPanel);
* layout.setExpandRatio(sliderPanel, 0f);
*/
layout.addComponent(container);
layout.setExpandRatio(container, 1f);
window.setContent(topLayout);
window.setSizeFull();
window.setClosable(true);
UI.getCurrent().addWindow(window);
}
}