本文整理汇总了Java中com.vaadin.ui.Panel.setSizeFull方法的典型用法代码示例。如果您正苦于以下问题:Java Panel.setSizeFull方法的具体用法?Java Panel.setSizeFull怎么用?Java Panel.setSizeFull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Panel
的用法示例。
在下文中一共展示了Panel.setSizeFull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {
final VerticalLayout root = new VerticalLayout();
root.setSizeFull();
root.setMargin(true);
root.setSpacing(true);
setContent(root);
MHorizontalLayout horizontalLayout = new MHorizontalLayout();
for (MenuEntry menuEntry : menuEntries) {
horizontalLayout.addComponent(new MButton(menuEntry.getName(), event -> {
navigator.navigateTo(menuEntry.getNavigationTarget());
}));
}
root.addComponent(horizontalLayout);
springViewDisplay = new Panel();
springViewDisplay.setSizeFull();
root.addComponent(springViewDisplay);
root.setExpandRatio(springViewDisplay, 1.0f);
}
示例2: init
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {
final VerticalLayout rootLayout = new VerticalLayout();
rootLayout.setSizeFull();
setContent(rootLayout);
final CssLayout navigationBar = new CssLayout();
navigationBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
navigationBar.addComponent(createNavigationButton("Demo View (Default)",
Constants.VIEW_DEFAULT));
navigationBar.addComponent(createNavigationButton("Stream View",
Constants.VIEW_STREAM));
rootLayout.addComponent(navigationBar);
springViewDisplay = new Panel();
springViewDisplay.setSizeFull();
rootLayout.addComponent(springViewDisplay);
rootLayout.setExpandRatio(springViewDisplay, 1.0f);
}
示例3: init
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {
log.info("Levanto la pagina UI");
final VerticalLayout root = new VerticalLayout();
root.setSizeFull();
root.setMargin(true);
root.setSpacing(true);
setContent(root);
final Panel viewContainer = new Panel();
viewContainer.setSizeFull();
root.addComponent(viewContainer);
root.setExpandRatio(viewContainer, 1.0f);
Navigator navigator = new Navigator(this, viewContainer);
//Navigator navigator = new Navigator(this, this);
navigator.addProvider(viewProvider);
log.info("Termina de levantar la pagina UI");
}
示例4: MovieDetailsWindow
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private MovieDetailsWindow(final Movie movie, final Date startTime,
final Date endTime) {
addStyleName("moviedetailswindow");
Responsive.makeResponsive(this);
setCaption(movie.getTitle());
center();
setCloseShortcut(KeyCode.ESCAPE, null);
setResizable(false);
setClosable(false);
setHeight(90.0f, Unit.PERCENTAGE);
VerticalLayout content = new VerticalLayout();
content.setSizeFull();
setContent(content);
Panel detailsWrapper = new Panel(buildMovieDetails(movie, startTime,
endTime));
detailsWrapper.setSizeFull();
detailsWrapper.addStyleName(ValoTheme.PANEL_BORDERLESS);
detailsWrapper.addStyleName("scroll-divider");
content.addComponent(detailsWrapper);
content.setExpandRatio(detailsWrapper, 1f);
content.addComponent(buildFooter());
}
示例5: initLayout
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private void initLayout() {
final VerticalLayout root = new VerticalLayout();
root.setSizeFull();
root.setMargin(true);
root.setSpacing(true);
setContent(root);
final CssLayout navigationBar = new CssLayout();
navigationBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
navigationBar.addComponent(createNavigationButton("Default View",
DefaultView.VIEW_NAME));
navigationBar.addComponent(createNavigationButton("MongoDB View",
MongoDBUIView.VIEW_NAME));
navigationBar.addComponent(createNavigationButton("Combobox Example View",
CityComboboxView.VIEW_NAME));
root.addComponent(navigationBar);
springViewDisplay = new Panel();
springViewDisplay.setSizeFull();
root.addComponent(springViewDisplay);
root.setExpandRatio(springViewDisplay, 1.0f);
}
示例6: initInformationPanel
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
protected void initInformationPanel() {
Panel infoPanel = new Panel();
infoPanel.addStyleName(Reindeer.PANEL_LIGHT);
infoPanel.setSizeFull();
profilePanelLayout.addComponent(infoPanel);
profilePanelLayout.setExpandRatio(infoPanel, 1.0f); // info panel should take all the remaining width available
// All the information sections are put under each other in a vertical layout
this.infoPanelLayout = new VerticalLayout();
infoPanel.setContent(infoPanelLayout);
initAboutSection();
initContactSection();
}
示例7: DetailPanel
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
public DetailPanel() {
setSizeFull();
addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
setMargin(true);
CssLayout cssLayout = new CssLayout(); // Needed for rounded corners
cssLayout.addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
cssLayout.setSizeFull();
super.addComponent(cssLayout);
mainPanel = new Panel();
mainPanel.addStyleName(Reindeer.PANEL_LIGHT);
mainPanel.setSizeFull();
cssLayout.addComponent(mainPanel);
// Use default layout
VerticalLayout verticalLayout = new VerticalLayout();
verticalLayout.setWidth(100, UNITS_PERCENTAGE);
verticalLayout.setMargin(true);
mainPanel.setContent(verticalLayout);
}
示例8: createTab
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private VerticalLayout createTab(String caption, String title, FormLayout content, String guid) {
VerticalLayout tabSheet = new VerticalLayout();
tabSheet.setCaption(caption);
tabSheet.setStyleName(StyleConstants.TAB_SHEET);
Panel panel = new Panel();
// creating subHeader inside panel
panel.setContent(content);
panel.setSizeFull();
tabSheet.addComponent(ViewUtil.createSubHeader(title, guid));
tabSheet.addComponent(panel);
return tabSheet;
}
示例9: createComponent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private VerticalLayout createComponent(String caption, String title, FormLayout content, String guid) {
VerticalLayout tabSheet = new VerticalLayout();
Panel panel = new Panel();
// creating subHeader inside panel
panel.setContent(content);
panel.setSizeFull();
tabSheet.addComponent(ViewUtil.createSubHeader(title, guid));
tabSheet.addComponent(panel);
return tabSheet;
}
示例10: RowLayout
import com.vaadin.ui.Panel; //导入方法依赖的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);
}
示例11: init
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {
// Root layout
final VerticalLayout root = new VerticalLayout();
root.setSizeFull();
root.setSpacing(false);
root.setMargin(false);
setContent(root);
// Main panel
springViewDisplay = new Panel();
springViewDisplay.setSizeFull();
root.addComponent(springViewDisplay);
root.setExpandRatio(springViewDisplay, 1);
// Footer
Layout footer = getFooter();
root.addComponent(footer);
root.setExpandRatio(footer, 0);
// Error handler
UI.getCurrent().setErrorHandler(new UIErrorHandler());
// Disable session expired notification, the page will be reloaded on any action
VaadinService.getCurrent().setSystemMessagesProvider(
systemMessagesInfo -> {
CustomizedSystemMessages msgs = new CustomizedSystemMessages();
msgs.setSessionExpiredNotificationEnabled(false);
return msgs;
});
}
示例12: initLayouts
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private void initLayouts() {
navBar = new NavBar(this);
// Use panel as main content container to allow it's content to scroll
content = new Panel();
content.setSizeFull();
content.addStyleName(UIConstants.PANEL_BORDERLESS);
addComponents(navBar, content);
setExpandRatio(content, 1);
}
示例13: getAddonComponent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Override
public Component getAddonComponent() {
Window w = new Window("Medium Editor in window");
w.setWidth(500, Unit.PIXELS);
w.setHeight(400, Unit.PIXELS);
Panel p = new Panel();
p.addStyleName(ValoTheme.PANEL_WELL);
p.setSizeFull();
MediumEditor editor = new MediumEditor();
editor.setSizeFull();
editor.setFocusOutlineEnabled(false);
editor.setJsLoggingEnabled(true);
editor.setContent(Lorem.getHtmlParagraphs(3, 5));
editor.configure(
editor.options()
.toolbar()
.buttons(Buttons.BOLD, Buttons.ITALIC,
Buttons.JUSTIFY_CENTER,
Buttons.ANCHOR)
.done()
.autoLink(true)
.imageDragging(false)
.done()
);
editors.add(editor);
p.setContent(editor);
w.setContent(p);
Button b = new Button("Open Window");
b.addClickListener(e -> {
w.setPosition(e.getClientX(), e.getClientY());
UI.getCurrent().addWindow(w);
});
return b;
}
示例14: buildPreview
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private Component buildPreview() {
previewLabel = new Label();
previewLabel.setSizeFull();
Panel panel = new Panel(previewLabel);
panel.setCaption("Preview");
panel.setSizeFull();
panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
panel.addStyleName("addon-code");
return panel;
}
示例15: buildCode
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private Component buildCode() {
codeLabel = new Label();
codeLabel.setContentMode(ContentMode.HTML);
Panel codePanel = new Panel(codeLabel);
codePanel.setSizeFull();
codePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
codePanel.addStyleName("addon-code");
return codePanel;
}