Here are the examples of the java api com.vaadin.ui.VerticalLayout.setComponentAlignment() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
85 Examples
16
View Complete Implementation : MultipleTargetFilter.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
protected void removeMenuBarAndAddCancelButton() {
targetTagTableLayout.removeComponent(menu);
targetTagTableLayout.addComponent(createCancelButtonForUpdateOrDeleteTag(), 0);
targetTagTableLayout.setComponentAlignment(cancelTagButton, Alignment.TOP_RIGHT);
}
16
View Complete Implementation : AbstractHawkbitLoginUI.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void addLoginForm(final VerticalLayout rootLayout) {
final Component loginForm = buildLoginForm();
rootLayout.addComponent(loginForm);
rootLayout.setComponentAlignment(loginForm, Alignment.MIDDLE_CENTER);
}
16
View Complete Implementation : MultipleTargetFilter.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
protected void removeCancelButtonAndAddMenuBar() {
targetTagTableLayout.removeComponent(cancelTagButton);
targetTagTableLayout.addComponent(menu, 0);
targetTagTableLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT);
filterByButtons.removeUpdateAndDeleteColumn();
}
15
View Complete Implementation : DocBrowserPanel.java
Copyright Apache License 2.0
Author : korpling
Copyright Apache License 2.0
Author : korpling
@Override
public void attach() {
super.attach();
// start fetching table only if not done yet.
if (table == null) {
layout.addComponent(progress);
layout.setComponentAlignment(progress, Alignment.MIDDLE_CENTER);
Background.run(new LoadingDocs());
}
}
15
View Complete Implementation : CommonDialogWindow.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private final void init() {
if (content instanceof AbstractOrderedLayout) {
((AbstractOrderedLayout) content).setSpacing(true);
((AbstractOrderedLayout) content).setMargin(true);
}
if (content instanceof GridLayout) {
addStyleName("marginTop");
}
if (content != null) {
mainLayout.addComponent(content);
mainLayout.setExpandRatio(content, 1.0F);
}
createMandatoryLabel();
final HorizontalLayout buttonLayout = createActionButtonsLayout();
mainLayout.addComponent(buttonLayout);
mainLayout.setComponentAlignment(buttonLayout, Alignment.TOP_CENTER);
setCaption(caption);
setCaptionAsHtml(true);
setContent(mainLayout);
setResizable(false);
center();
setModal(true);
addStyleName("fontsize");
setOrginaleValues();
addComponentListeners();
}
15
View Complete Implementation : WizardsDemoApplication.java
Copyright Apache License 2.0
Author : tehapo
Copyright Apache License 2.0
Author : tehapo
private void endWizard(String message) {
wizard.setVisible(false);
Notification.show(message);
Page.getCurrent().setreplacedle(message);
Button startOverButton = new Button("Run the demo again", new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
// Close the session and reload the page.
VaadinSession.getCurrent().close();
Page.getCurrent().setLocation("");
}
});
mainLayout.addComponent(startOverButton);
mainLayout.setComponentAlignment(startOverButton, Alignment.MIDDLE_CENTER);
}
14
View Complete Implementation : MetaDataPanel.java
Copyright Apache License 2.0
Author : korpling
Copyright Apache License 2.0
Author : korpling
/**
* Places a label in the middle center of the corpus browser panel.
*/
private void addEmptyLabel() {
if (emptyLabel == null) {
emptyLabel = new Label("none");
}
if (corpusAnnotationTable != null) {
layout.removeComponent(corpusAnnotationTable);
}
layout.addComponent(emptyLabel);
// this has only an effect after adding the component to a parent. Bug by
// vaadin?
emptyLabel.setSizeUndefined();
layout.setComponentAlignment(emptyLabel, Alignment.MIDDLE_CENTER);
layout.setExpandRatio(emptyLabel, 1.0f);
}
14
View Complete Implementation : HelpSplitPanel.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
private void buildMainLayout() {
addComponent((Component) component);
setExpandRatio((Component) component, 1);
helpPane = new Panel();
helpPane.setImmediate(false);
showHelpLoadingSplash();
helpSliderPanel = new SliderPanelBuilder(helpPane).expanded(false).mode(SliderMode.RIGHT).tabPosition(SliderTabPosition.MIDDLE).style(SliderPanelStyles.COLOR_BLUE).caption("Help").animationDuration(400).tabSize(30).autoCollapseSlider(true).fixedContentSize((int) (UI.getCurrent().getPage().getBrowserWindowWidth() * 0.75)).build();
helpLoader = new SlideOutLoader();
innerSecondPanel = new VerticalLayout();
innerSecondPanel.setSizeFull();
innerSecondPanel.setWidth("30");
innerSecondPanel.addComponent(helpSliderPanel);
innerSecondPanel.setComponentAlignment(helpSliderPanel, Alignment.MIDDLE_RIGHT);
addComponent(innerSecondPanel);
Page.getCurrent().addBrowserWindowResizeListener(new BrowserWindowResizeListener() {
private static final long serialVersionUID = -8548907013566961812L;
@Override
public void browserWindowResized(BrowserWindowResizeEvent event) {
helpSliderPanel.setFixedContentSize((int) (event.getWidth() * 0.75));
if (helpSliderPanel.isExpanded()) {
helpSliderPanel.collapse();
}
}
});
}
14
View Complete Implementation : WizardsDemoApplication.java
Copyright Apache License 2.0
Author : tehapo
Copyright Apache License 2.0
Author : tehapo
@Override
protected void init(VaadinRequest request) {
// setup the main window
mainLayout = new VerticalLayout();
mainLayout.setSizeFull();
mainLayout.setMargin(true);
setContent(mainLayout);
// create the Wizard component and add the steps
wizard = new Wizard();
wizard.setUriFragmentEnabled(true);
wizard.addListener(this);
wizard.addStep(new IntroStep(), "intro");
wizard.addStep(new SetupStep(), "setup");
wizard.addStep(new ListenStep(), "listen");
wizard.addStep(new LastStep(wizard), "last");
wizard.setHeight("600px");
wizard.setWidth("800px");
mainLayout.addComponent(wizard);
mainLayout.setComponentAlignment(wizard, Alignment.TOP_CENTER);
}
14
View Complete Implementation : LoginScreen.java
Copyright The Unlicense
Author : vaadin
Copyright The Unlicense
Author : vaadin
private void buildUI() {
addStyleName("login-screen");
// login form, centered in the available part of the screen
Component loginForm = buildLoginForm();
// layout to center login form when there is sufficient screen space
// - see the theme for how this is made responsive for various screen
// sizes
VerticalLayout centeringLayout = new VerticalLayout();
centeringLayout.setStyleName("centering-layout");
centeringLayout.addComponent(loginForm);
centeringLayout.setComponentAlignment(loginForm, Alignment.MIDDLE_CENTER);
// information text about logging in
CssLayout loginInformation = buildLoginInformation();
addComponent(centeringLayout);
addComponent(loginInformation);
}
14
View Complete Implementation : DashboardMenu.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private Component buildContent() {
final VerticalLayout dashboardMenuLayout = new VerticalLayout();
dashboardMenuLayout.setSizeFull();
final VerticalLayout menuContent = getMenuLayout();
menuContent.addComponent(buildUserMenu(uiProperties));
menuContent.addComponent(buildToggleButton());
final VerticalLayout menus = buildMenuItems();
final VerticalLayout links = buildLinksAndVersion();
menus.addComponent(links);
menus.setComponentAlignment(links, Alignment.BOTTOM_CENTER);
menus.setExpandRatio(links, 1.0F);
menuContent.addComponent(menus);
menuContent.setExpandRatio(menus, 1.0F);
dashboardMenuLayout.addComponent(menuContent);
return dashboardMenuLayout;
}
13
View Complete Implementation : SimpleBoxFormBuilder.java
Copyright Apache License 2.0
Author : chelu
Copyright Apache License 2.0
Author : chelu
public void add(Component c, String label, int width, Alignment alignment) {
if (rows == 0 && rowsHeight.isEmpty()) {
log.warn("You must call row() before adding components. I will add a row with default height for you");
row();
}
if (label != null)
c.setCaption(label);
VerticalLayout column = getColumn();
column.addComponent(c);
index++;
setWidth(width);
if (alignment != null) {
column.setComponentAlignment(c, alignment);
}
if (rowCellSpand) {
c.setWidth(100, Unit.PERCENTAGE);
}
if (useTabIndex && c instanceof Field) {
((Field<?>) c).setTabIndex(tabIndex++);
}
}
13
View Complete Implementation : HelpSplitPanel.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
private void showHelpLoadingSplash() {
VerticalLayout splashHolder = new VerticalLayout();
splashHolder.setSizeFull();
Label splashLabel = new Label("<h2><br><br><b><center>Loading help, Please wait...<b>", ContentMode.HTML);
splashHolder.addComponent(splashLabel);
splashHolder.setComponentAlignment(splashLabel, Alignment.MIDDLE_RIGHT);
helpPane.setContent(splashHolder);
helpPane.setSizeFull();
}
12
View Complete Implementation : TestUI.java
Copyright Apache License 2.0
Author : bsblabs
Copyright Apache License 2.0
Author : bsblabs
@Override
protected void init(VaadinRequest request) {
final VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
layout.setMargin(true);
layout.setSpacing(true);
final Button hello = new Button("Hello");
hello.addClickListener(new Button.ClickListener() {
public void buttonClick(Button.ClickEvent event) {
final Notification n = new Notification("Yes, hello", Notification.Type.HUMANIZED_MESSAGE);
n.setDelayMsec(-1);
n.show(Page.getCurrent());
}
});
layout.addComponent(hello);
layout.setComponentAlignment(hello, Alignment.TOP_CENTER);
setContent(layout);
}
12
View Complete Implementation : FilterManagementView.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void viewListView() {
removeAllComponents();
final VerticalLayout tableListViewLayout = new VerticalLayout();
tableListViewLayout.setSizeFull();
tableListViewLayout.setSpacing(false);
tableListViewLayout.setMargin(false);
tableListViewLayout.setStyleName("table-layout");
tableListViewLayout.addComponent(targetFilterHeader);
tableListViewLayout.setComponentAlignment(targetFilterHeader, Alignment.TOP_CENTER);
tableListViewLayout.addComponent(targetFilterTable);
tableListViewLayout.setComponentAlignment(targetFilterTable, Alignment.TOP_CENTER);
tableListViewLayout.setExpandRatio(targetFilterTable, 1.0F);
addComponent(tableListViewLayout);
}
12
View Complete Implementation : TwinColumnSearchableSelect.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
private Component buildButtons() {
VerticalLayout layout = new VerticalLayout();
layout.setWidth(BUTTON_LAYOUT_WIDTH, Unit.PIXELS);
removeButton.setWidth(BUTTON_WIDTH, Unit.PIXELS);
removeAllButton.setWidth(BUTTON_WIDTH, Unit.PIXELS);
addButton.setWidth(BUTTON_WIDTH, Unit.PIXELS);
addAllButton.setWidth(BUTTON_WIDTH, Unit.PIXELS);
addNewButton.setWidth(BUTTON_WIDTH, Unit.PIXELS);
removeButton.addClickListener(removeClickListener());
removeAllButton.addClickListener(removeAllClickListener());
addButton.addClickListener(addClickListener());
addAllButton.addClickListener(addAllClickListener());
addNewButton.addClickListener(addNewClickListener());
layout.addComponent(addButton);
layout.addComponent(removeButton);
layout.addComponent(addAllButton);
layout.addComponent(removeAllButton);
layout.addComponent(addNewButton);
layout.setComponentAlignment(removeButton, Alignment.MIDDLE_CENTER);
layout.setComponentAlignment(addButton, Alignment.MIDDLE_CENTER);
layout.setComponentAlignment(removeAllButton, Alignment.MIDDLE_CENTER);
layout.setComponentAlignment(addAllButton, Alignment.MIDDLE_CENTER);
layout.setComponentAlignment(addNewButton, Alignment.MIDDLE_CENTER);
return layout;
}
12
View Complete Implementation : Wizard.java
Copyright Apache License 2.0
Author : tehapo
Copyright Apache License 2.0
Author : tehapo
private void init() {
mainLayout = new VerticalLayout();
setCompositionRoot(mainLayout);
setSizeFull();
contentPanel = new Panel();
contentPanel.setSizeFull();
initControlButtons();
footer = new HorizontalLayout();
footer.setSpacing(true);
footer.addComponent(cancelButton);
footer.addComponent(backButton);
footer.addComponent(nextButton);
footer.addComponent(finishButton);
mainLayout.addComponent(contentPanel);
mainLayout.addComponent(footer);
mainLayout.setComponentAlignment(footer, Alignment.BOTTOM_RIGHT);
mainLayout.setExpandRatio(contentPanel, 1.0f);
mainLayout.setSizeFull();
initDefaultHeader();
}
12
View Complete Implementation : CmsToolBar.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
* Folds the toolbar buttons into a sub menu.<p>
*/
private void foldButtons() {
VerticalLayout mainPV = (VerticalLayout) m_foldedButtonsMenu.getContent().getPopupComponent();
for (int i = m_itemsLeft.getComponentCount() - 1; i > -1; i--) {
Component comp = m_itemsLeft.getComponent(i);
if (!isAlwaysShow(comp)) {
m_itemsLeft.removeComponent(comp);
m_leftButtons.addComponent(comp, 0);
m_leftButtons.setComponentAlignment(comp, Alignment.MIDDLE_CENTER);
}
}
if (m_leftButtons.getComponentCount() == 0) {
mainPV.removeComponent(m_leftButtons);
} else {
mainPV.addComponent(m_leftButtons, 0);
}
for (int i = m_itemsRight.getComponentCount() - 1; i > -1; i--) {
Component comp = m_itemsRight.getComponent(i);
if (!isAlwaysShow(comp)) {
m_itemsRight.removeComponent(comp);
m_rightButtons.addComponent(comp, 0);
m_rightButtons.setComponentAlignment(comp, Alignment.MIDDLE_CENTER);
}
}
if (m_rightButtons.getComponentCount() == 0) {
mainPV.removeComponent(m_rightButtons);
} else {
mainPV.addComponent(m_rightButtons);
}
m_itemsRight.addComponent(m_foldedButtonsMenu, 0);
m_buttonsFolded = true;
markAsDirtyRecursive();
}
12
View Complete Implementation : Login.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
private FormLayout addFormLayout() {
FormLayout formLayout = new FormLayout();
formLayout.setWidth("300px");
formLayout.setHeight("200px");
formLayout.addStyleName("outlined");
formLayout.setSpacing(true);
mainLayout.addComponent(formLayout);
mainLayout.setComponentAlignment(formLayout, Alignment.MIDDLE_CENTER);
return formLayout;
}
11
View Complete Implementation : UploadArtifactView.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private VerticalLayout createDetailsAndUploadLayout() {
detailAndUploadLayout = new VerticalLayout();
detailAndUploadLayout.addComponent(artifactDetailsLayout);
detailAndUploadLayout.setComponentAlignment(artifactDetailsLayout, Alignment.TOP_CENTER);
detailAndUploadLayout.setExpandRatio(artifactDetailsLayout, 1.0F);
if (permChecker.hasCreateRepositoryPermission()) {
detailAndUploadLayout.addComponent(dropAreaLayout.getDropAreaWrapper());
}
detailAndUploadLayout.setSizeFull();
detailAndUploadLayout.addStyleName("group");
detailAndUploadLayout.setSpacing(true);
return detailAndUploadLayout;
}
11
View Complete Implementation : AbstractGridComponentLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
/**
* Layouts header, grid and optional footer.
*/
protected void buildLayout() {
setSizeFull();
setSpacing(true);
setMargin(false);
setStyleName("group");
final VerticalLayout gridHeaderLayout = new VerticalLayout();
gridHeaderLayout.setSizeFull();
gridHeaderLayout.setSpacing(false);
gridHeaderLayout.setMargin(false);
gridHeaderLayout.setStyleName("table-layout");
gridHeaderLayout.addComponent(gridHeader);
gridHeaderLayout.setComponentAlignment(gridHeader, Alignment.TOP_CENTER);
gridHeaderLayout.addComponent(grid);
gridHeaderLayout.setComponentAlignment(grid, Alignment.TOP_CENTER);
gridHeaderLayout.setExpandRatio(grid, 1.0F);
addComponent(gridHeaderLayout);
setComponentAlignment(gridHeaderLayout, Alignment.TOP_CENTER);
setExpandRatio(gridHeaderLayout, 1.0F);
if (hasFooterSupport()) {
final Layout footerLayout = getFooterSupport().createFooterMessageComponent();
addComponent(footerLayout);
setComponentAlignment(footerLayout, Alignment.BOTTOM_CENTER);
}
}
10
View Complete Implementation : UploadDropAreaLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private VerticalLayout createDropAreaLayout() {
final VerticalLayout dropAreaLayout = new VerticalLayout();
final Label dropHereLabel = new Label(i18n.getMessage(UIMessageIdProvider.LABEL_DROP_AREA_UPLOAD));
dropHereLabel.setWidth(null);
final Label dropIcon = new Label(FontAwesome.ARROW_DOWN.getHtml(), ContentMode.HTML);
dropIcon.addStyleName("drop-icon");
dropIcon.setWidth(null);
dropAreaLayout.addComponent(dropIcon);
dropAreaLayout.setComponentAlignment(dropIcon, Alignment.TOP_CENTER);
dropAreaLayout.addComponent(dropHereLabel);
dropAreaLayout.setComponentAlignment(dropHereLabel, Alignment.TOP_CENTER);
uploadButtonLayout.setWidth(null);
uploadButtonLayout.addStyleName("upload-button");
dropAreaLayout.addComponent(uploadButtonLayout);
dropAreaLayout.setComponentAlignment(uploadButtonLayout, Alignment.BOTTOM_CENTER);
dropAreaLayout.setSizeFull();
dropAreaLayout.setStyleName("upload-drop-area-layout-info");
dropAreaLayout.setSpacing(false);
return dropAreaLayout;
}
10
View Complete Implementation : FilterManagementView.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void buildFilterDetailOrCreateView() {
removeAllComponents();
final VerticalLayout tableHeaderLayout = new VerticalLayout();
tableHeaderLayout.setSizeFull();
tableHeaderLayout.setSpacing(false);
tableHeaderLayout.setMargin(false);
tableHeaderLayout.setStyleName("table-layout");
tableHeaderLayout.addComponent(createNewFilterHeader);
tableHeaderLayout.setComponentAlignment(createNewFilterHeader, Alignment.TOP_CENTER);
tableHeaderLayout.addComponent(createNewFilterTable);
tableHeaderLayout.setComponentAlignment(createNewFilterTable, Alignment.TOP_CENTER);
tableHeaderLayout.setExpandRatio(createNewFilterTable, 1.0F);
addComponent(tableHeaderLayout);
setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER);
setExpandRatio(tableHeaderLayout, 1.0F);
final HorizontalLayout targetsCountmessageLabelLayout = addTargetFilterMessageLabel();
addComponent(targetsCountmessageLabelLayout);
setComponentAlignment(targetsCountmessageLabelLayout, Alignment.BOTTOM_CENTER);
}
10
View Complete Implementation : AbstractHawkbitLoginUI.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void addFooter(final VerticalLayout rootLayout) {
final Resource resource = context.getResource("clreplacedpath:/VAADIN/themes/" + UI.getCurrent().getTheme() + "/layouts/footer.html");
try (final InputStream resourceStream = resource.getInputStream()) {
final CustomLayout customLayout = new CustomLayout(resourceStream);
customLayout.setSizeUndefined();
rootLayout.addComponent(customLayout);
rootLayout.setComponentAlignment(customLayout, Alignment.BOTTOM_LEFT);
} catch (final IOException ex) {
LOG.error("Footer file cannot be loaded", ex);
}
}
10
View Complete Implementation : CountryMenuItemFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
Copyright Apache License 2.0
Author : Hack23
@Override
public void createOverviewPage(final VerticalLayout panelContent) {
final MenuBar menuBar = new MenuBar();
panelContent.addComponent(menuBar);
panelContent.setComponentAlignment(menuBar, Alignment.TOP_LEFT);
panelContent.setExpandRatio(menuBar, ContentRatio.LARGE);
addSourcesAndIndicatorsToMenu(menuBar.addItem("By Topic", VaadinIcons.LINE_CHART, null), getTopicIndicatorMap());
menuBar.setAutoOpen(true);
}
9
View Complete Implementation : CheckboxColumnGenerator.java
Copyright GNU General Public License v3.0
Author : rlsutton1
Copyright GNU General Public License v3.0
Author : rlsutton1
@Override
public Object generateCell(Table source, Object itemId, Object columnId) {
// Need a layout to set center alignment on the checkbox.
// http://dev.vaadin.com/ticket/12027
final VerticalLayout layout = new VerticalLayout();
final CheckBox checkbox = new CheckBox();
layout.addComponent(checkbox);
layout.setComponentAlignment(checkbox, Alignment.MIDDLE_CENTER);
@SuppressWarnings("unchecked")
final Property<Boolean> property = source.gereplacedem(itemId).gereplacedemProperty(columnId);
checkbox.setValue(property.getValue());
checkbox.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
property.setValue((Boolean) event.getProperty().getValue());
}
});
((ValueChangeNotifier) property).addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
checkbox.setValue((Boolean) event.getProperty().getValue());
}
});
return layout;
}
8
View Complete Implementation : MultipleTargetFilter.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private Component getSimpleFilterTab() {
simpleFilterTab = new VerticalLayout();
targetTagTableLayout = new VerticalLayout();
targetTagTableLayout.setSizeFull();
if (menu != null) {
targetTagTableLayout.addComponent(menu);
targetTagTableLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT);
}
targetTagTableLayout.addComponent(filterByButtons);
targetTagTableLayout.setComponentAlignment(filterByButtons, Alignment.MIDDLE_CENTER);
targetTagTableLayout.setId(UIComponentIdProvider.TARGET_TAG_DROP_AREA_ID);
targetTagTableLayout.setExpandRatio(filterByButtons, 1.0F);
simpleFilterTab.setCaption(i18n.getMessage("caption.filter.simple"));
simpleFilterTab.addComponent(targetTagTableLayout);
simpleFilterTab.setExpandRatio(targetTagTableLayout, 1.0F);
simpleFilterTab.addComponent(filterByStatusFooter);
simpleFilterTab.setComponentAlignment(filterByStatusFooter, Alignment.MIDDLE_CENTER);
simpleFilterTab.setSizeFull();
simpleFilterTab.addStyleName(SPUIStyleDefinitions.SIMPLE_FILTER_HEADER);
return simpleFilterTab;
}
7
View Complete Implementation : PageableTable.java
Copyright Apache License 2.0
Author : chelu
Copyright Apache License 2.0
Author : chelu
@SuppressWarnings("unchecked")
@PostConstruct
public void init() {
// build Component
VerticalLayout verticalLayout = getVerticalLayout();
verticalLayout.setSizeUndefined();
verticalLayout.setSpacing(true);
// filter
if (filterEditor != null && filterForm == null) {
filterForm = (VaadinView<Filter>) getGuiFactory().getView(filterEditor);
}
if (filterForm != null) {
if (beanFilter != null) {
filterForm.setModel(beanFilter);
} else {
beanFilter = filterForm.getModel();
}
verticalLayout.addComponent((Component) filterForm.getPanel());
}
// action group
if (getActions().size() > 0) {
verticalLayout.addComponent(createButtonBox());
}
// table
verticalLayout.addComponent(getTable());
verticalLayout.setExpandRatio(getTable(), 1.0f);
// paginator
if (this.paginator == null) {
this.paginator = new VaadinPaginator<T>();
this.paginator.setMessageSource(getMessageSource());
}
paginator.setModel(page);
paginator.addPaginatorListener(this);
paginator.setNativeButtons(isNativeButtons());
page.setPageableDataSource(getService());
// set external sorting, ie don't call Container.sort()
getTable().setSorter(new PageSorter());
Component p = paginator.getPanel();
verticalLayout.addComponent(p);
verticalLayout.setComponentAlignment(p, Alignment.MIDDLE_CENTER);
getTable().setPageLength(page.getPageSize());
if (beanFilter != null) {
postProcessFilter(beanFilter);
page.setFilter(beanFilter);
}
// get initial page and wrap data in container
this.page.setAutoload(true);
paginator.firstPage();
getTable().addItemClickListener(this);
this.setSizeUndefined();
}
7
View Complete Implementation : DateFilterPopup.java
Copyright Apache License 2.0
Author : tepi
Copyright Apache License 2.0
Author : tepi
protected void buildPopup() {
VerticalLayout content = new VerticalLayout();
content.setStyleName("datefilterpopupcontent");
content.setSpacing(true);
content.setMargin(true);
content.setSizeUndefined();
fromField = new InlineDateField();
toField = new InlineDateField();
fromField.setImmediate(true);
toField.setImmediate(true);
fromField.addValueChangeListener(e -> {
if (e.getProperty().getValue() != null) {
toField.setRangeStart((Date) e.getProperty().getValue());
} else {
toField.setRangeStart(null);
}
});
toField.addValueChangeListener(e -> {
if (e.getProperty().getValue() != null) {
fromField.setRangeEnd((Date) e.getProperty().getValue());
} else {
fromField.setRangeEnd(null);
}
});
set = new Button();
clear = new Button();
ClickListener buttonClickHandler = event -> updateValue(clear.equals(event.getButton()));
set.addClickListener(buttonClickHandler);
clear.addClickListener(buttonClickHandler);
HorizontalLayout buttonBar = new HorizontalLayout();
buttonBar.setSizeUndefined();
buttonBar.setSpacing(true);
buttonBar.addComponent(set);
buttonBar.addComponent(clear);
HorizontalLayout row = new HorizontalLayout();
row.setSizeUndefined();
row.setSpacing(true);
row.addComponent(fromField);
row.addComponent(toField);
content.addComponent(row);
content.addComponent(buttonBar);
content.setComponentAlignment(buttonBar, Alignment.BOTTOM_RIGHT);
this.content.setContent(content);
}
6
View Complete Implementation : RenamePolicyFileWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// textFieldFilename
textFieldFilename = new TextField();
textFieldFilename.setCaption("Policy File Name");
textFieldFilename.setImmediate(false);
textFieldFilename.setWidth("-1px");
textFieldFilename.setHeight("-1px");
mainLayout.addComponent(textFieldFilename);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(false);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(24));
return mainLayout;
}
6
View Complete Implementation : SelectPDPGroupWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// listSelectPDPGroup
listSelectPDPGroup = new ListSelect();
listSelectPDPGroup.setImmediate(false);
listSelectPDPGroup.setWidth("-1px");
listSelectPDPGroup.setHeight("-1px");
listSelectPDPGroup.setInvalidAllowed(false);
listSelectPDPGroup.setRequired(true);
mainLayout.addComponent(listSelectPDPGroup);
mainLayout.setExpandRatio(listSelectPDPGroup, 1.0f);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(true);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
6
View Complete Implementation : SelectPIPConfigurationWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// table
table = new Table();
table.setCaption("PIP Configurations");
table.setImmediate(false);
table.setWidth("-1px");
table.setHeight("-1px");
mainLayout.addComponent(table);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(false);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
6
View Complete Implementation : XacmlErrorHandler.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("100%");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("100.0%");
setHeight("-1px");
// labelError
labelError = new Label();
labelError.setImmediate(false);
labelError.setWidth("100.0%");
labelError.setHeight("80px");
labelError.setValue("This holds error messages.");
mainLayout.addComponent(labelError);
// buttonGo
buttonGo = new Button();
buttonGo.setCaption("Ok");
buttonGo.setImmediate(true);
buttonGo.setWidth("-1px");
buttonGo.setHeight("-1px");
mainLayout.addComponent(buttonGo);
mainLayout.setComponentAlignment(buttonGo, new Alignment(48));
return mainLayout;
}
6
View Complete Implementation : MainView.java
Copyright GNU General Public License v3.0
Author : AskNowQA
Copyright GNU General Public License v3.0
Author : AskNowQA
private void createMainPanel() {
mainPanel = new VerticalLayout();
mainPanel.setSpacing(true);
mainPanel.setSizeFull();
addComponent(mainPanel);
setExpandRatio(mainPanel, 1f);
// top part
Component inputForm = createInputComponent();
inputForm.setWidth("60%");
inputForm.setHeight("100%");
VerticalLayout inputFormHolder = new VerticalLayout();
inputFormHolder.addStyleName("input-form");
inputFormHolder.setHeight(null);
inputFormHolder.setWidth("100%");
inputFormHolder.addComponent(inputForm);
inputFormHolder.setComponentAlignment(inputForm, Alignment.MIDDLE_CENTER);
mainPanel.addComponent(inputFormHolder);
mainPanel.setComponentAlignment(inputFormHolder, Alignment.MIDDLE_CENTER);
// middle part
resultHolderPanel = new VerticalLayout();
resultHolderPanel.setWidth("80%");
resultHolderPanel.setHeight("100%");
mainPanel.addComponent(resultHolderPanel);
mainPanel.setComponentAlignment(resultHolderPanel, Alignment.MIDDLE_CENTER);
mainPanel.setExpandRatio(resultHolderPanel, 0.8f);
// refine button, only visible if constraints running QTL algorithm are satisfied
refineButton = new Button("Refine");
refineButton.setVisible(false);
refineButton.addListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
onRefineResult();
}
});
mainPanel.addComponent(refineButton);
mainPanel.setComponentAlignment(refineButton, Alignment.MIDDLE_CENTER);
}
6
View Complete Implementation : ExpressionSelectionWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// optionGroupExpression
optionGroupExpression = new OptionGroup();
optionGroupExpression.setCaption("Select One Of The Following Types of Expressions");
optionGroupExpression.setImmediate(false);
optionGroupExpression.setWidth("-1px");
optionGroupExpression.setHeight("-1px");
mainLayout.addComponent(optionGroupExpression);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Select");
buttonSave.setImmediate(false);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(24));
return mainLayout;
}
6
View Complete Implementation : GitSynchronizeWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// textAreaResults
textAreaResults = new TextArea();
textAreaResults.setCaption("Synch Results");
textAreaResults.setImmediate(false);
textAreaResults.setWidth("462px");
textAreaResults.setHeight("222px");
mainLayout.addComponent(textAreaResults);
// buttonSynchronize
buttonSynchronize = new Button();
buttonSynchronize.setCaption("Synchronize");
buttonSynchronize.setImmediate(true);
buttonSynchronize.setWidth("-1px");
buttonSynchronize.setHeight("-1px");
mainLayout.addComponent(buttonSynchronize);
mainLayout.setComponentAlignment(buttonSynchronize, new Alignment(24));
return mainLayout;
}
5
View Complete Implementation : PolicyUploadWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// upload
upload = new Upload();
upload.setCaption("Upload Xacml Policy File");
upload.setImmediate(false);
upload.setWidth("-1px");
upload.setHeight("-1px");
mainLayout.addComponent(upload);
// checkBoxImportAttributes
checkBoxImportAttributes = new CheckBox();
checkBoxImportAttributes.setCaption("Import attributes into attribute dictionary.");
checkBoxImportAttributes.setImmediate(false);
checkBoxImportAttributes.setWidth("-1px");
checkBoxImportAttributes.setHeight("-1px");
mainLayout.addComponent(checkBoxImportAttributes);
// checkBoxIgnoreStandard
checkBoxIgnoreStandard = new CheckBox();
checkBoxIgnoreStandard.setCaption("Ignore Standard Attributes");
checkBoxIgnoreStandard.setImmediate(false);
checkBoxIgnoreStandard.setWidth("-1px");
checkBoxIgnoreStandard.setHeight("-1px");
mainLayout.addComponent(checkBoxIgnoreStandard);
mainLayout.setComponentAlignment(checkBoxIgnoreStandard, new Alignment(20));
// checkBoxImportObligations
checkBoxImportObligations = new CheckBox();
checkBoxImportObligations.setCaption("Import obligations into obligation dictionary.");
checkBoxImportObligations.setImmediate(false);
checkBoxImportObligations.setWidth("-1px");
checkBoxImportObligations.setHeight("-1px");
mainLayout.addComponent(checkBoxImportObligations);
// checkBoxImportAdvice
checkBoxImportAdvice = new CheckBox();
checkBoxImportAdvice.setCaption("Import advice into advice dictionary.");
checkBoxImportAdvice.setImmediate(false);
checkBoxImportAdvice.setWidth("-1px");
checkBoxImportAdvice.setHeight("-1px");
mainLayout.addComponent(checkBoxImportAdvice);
return mainLayout;
}
5
View Complete Implementation : XacmlAdminConsole.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.setMargin(true);
// top-level component properties
setWidth("100.0%");
setHeight("100.0%");
// horizontalLayout_1
horizontalLayout_1 = buildHorizontalLayout_1();
mainLayout.addComponent(horizontalLayout_1);
// tabSheet
tabSheet = new TabSheet();
tabSheet.setImmediate(false);
tabSheet.setWidth("100.0%");
tabSheet.setHeight("100.0%");
mainLayout.addComponent(tabSheet);
mainLayout.setExpandRatio(tabSheet, 1.0f);
// labelCopyright
labelCopyright = new Label();
labelCopyright.setImmediate(false);
labelCopyright.setWidth("-1px");
labelCopyright.setHeight("40px");
labelCopyright.setValue("<center>Copyright © 2015 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.</center>");
mainLayout.addComponent(labelCopyright);
mainLayout.setComponentAlignment(labelCopyright, new Alignment(48));
return mainLayout;
}
5
View Complete Implementation : XacmlAdminConsole.java
Copyright MIT License
Author : att
Copyright MIT License
Author : att
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.setMargin(true);
// top-level component properties
setWidth("100.0%");
setHeight("100.0%");
// horizontalLayout_1
horizontalLayout_1 = buildHorizontalLayout_1();
mainLayout.addComponent(horizontalLayout_1);
// tabSheet
tabSheet = new TabSheet();
tabSheet.setImmediate(false);
tabSheet.setWidth("100.0%");
tabSheet.setHeight("100.0%");
mainLayout.addComponent(tabSheet);
mainLayout.setExpandRatio(tabSheet, 1.0f);
// labelCopyright
labelCopyright = new Label();
labelCopyright.setImmediate(false);
labelCopyright.setWidth("-1px");
labelCopyright.setHeight("40px");
labelCopyright.setValue("<center>© 2013-2014 AT&T Intellectual Property. All rights reserved.</center>");
mainLayout.addComponent(labelCopyright);
mainLayout.setComponentAlignment(labelCopyright, new Alignment(48));
return mainLayout;
}
5
View Complete Implementation : SignUpViewImpl.java
Copyright Apache License 2.0
Author : markoradinovic
Copyright Apache License 2.0
Author : markoradinovic
@Override
public void postConstruct() {
super.postConstruct();
setSizeFull();
layout = new VerticalLayout();
layout.setSizeFull();
layout.setSpacing(true);
setCompositionRoot(layout);
infoLabel = new Label("Vaadin4Spring Security Demo - SignUp");
infoLabel.addStyleName(ValoTheme.LABEL_H2);
infoLabel.setSizeUndefined();
layout.addComponent(infoLabel);
layout.setComponentAlignment(infoLabel, Alignment.MIDDLE_CENTER);
container = new VerticalLayout();
container.setSizeUndefined();
container.setSpacing(true);
layout.addComponent(container);
layout.setComponentAlignment(container, Alignment.MIDDLE_CENTER);
layout.setExpandRatio(container, 1);
form = new FormLayout();
form.setWidth("400px");
form.setSpacing(true);
container.addComponent(form);
buildForm();
btnSignUp = new Button("Signup", FontAwesome.FLOPPY_O);
btnSignUp.addStyleName(ValoTheme.BUTTON_FRIENDLY);
btnSignUp.addClickListener(this);
container.addComponent(btnSignUp);
container.setComponentAlignment(btnSignUp, Alignment.MIDDLE_CENTER);
}
4
View Complete Implementation : AttributeSelectionWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// horizontalLayout_1
horizontalLayout_1 = buildHorizontalLayout_1();
mainLayout.addComponent(horizontalLayout_1);
// horizontalLayoutAttribute
horizontalLayoutAttribute = new HorizontalLayout();
horizontalLayoutAttribute.setImmediate(false);
horizontalLayoutAttribute.setWidth("-1px");
horizontalLayoutAttribute.setHeight("-1px");
horizontalLayoutAttribute.setMargin(false);
mainLayout.addComponent(horizontalLayoutAttribute);
mainLayout.setExpandRatio(horizontalLayoutAttribute, 1.0f);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Select");
buttonSave.setImmediate(true);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
4
View Complete Implementation : ExpressionBuilderComponent.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("100%");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// horizontalLayout_1
horizontalLayout_1 = buildHorizontalLayout_1();
mainLayout.addComponent(horizontalLayout_1);
mainLayout.setExpandRatio(horizontalLayout_1, 1.0f);
// treeExpressions
treeExpressions = new TreeTable();
treeExpressions.setImmediate(false);
treeExpressions.setWidth("100.0%");
treeExpressions.setHeight("-1px");
mainLayout.addComponent(treeExpressions);
mainLayout.setExpandRatio(treeExpressions, 1.0f);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(true);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
4
View Complete Implementation : PDPStatusWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("100.0%");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// table
table = new Table();
table.setCaption("Status");
table.setImmediate(false);
table.setWidth("100.0%");
table.setHeight("-1px");
mainLayout.addComponent(table);
// buttonOK
buttonOK = new Button();
buttonOK.setCaption("Ok");
buttonOK.setImmediate(true);
buttonOK.setWidth("-1px");
buttonOK.setHeight("-1px");
mainLayout.addComponent(buttonOK);
mainLayout.setComponentAlignment(buttonOK, new Alignment(48));
return mainLayout;
}
4
View Complete Implementation : PIPParamEditorWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// textFieldName
textFieldName = new TextField();
textFieldName.setCaption("Parameter Name");
textFieldName.setImmediate(false);
textFieldName.setWidth("-1px");
textFieldName.setHeight("-1px");
textFieldName.setInvalidAllowed(false);
textFieldName.setRequired(true);
mainLayout.addComponent(textFieldName);
// textFieldValue
textFieldValue = new TextField();
textFieldValue.setCaption("Parameter Value");
textFieldValue.setImmediate(false);
textFieldValue.setWidth("-1px");
textFieldValue.setHeight("-1px");
textFieldValue.setInvalidAllowed(false);
textFieldValue.setRequired(true);
mainLayout.addComponent(textFieldValue);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(true);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
4
View Complete Implementation : SelectWorkspacePoliciesWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// treeWorkspace
treeWorkspace = new TreeTable();
treeWorkspace.setCaption("Select Policy(s) for PDP Group");
treeWorkspace.setImmediate(true);
treeWorkspace.setWidth("100.0%");
treeWorkspace.setHeight("-1px");
mainLayout.addComponent(treeWorkspace);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(false);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
4
View Complete Implementation : VariableDefinitionEditorWindow.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
@AutoGenerated
private VerticalLayout buildMainLayout() {
// common part: create layout
mainLayout = new VerticalLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// textFieldID
textFieldID = new TextField();
textFieldID.setCaption("Variable ID");
textFieldID.setImmediate(false);
textFieldID.setWidth("-1px");
textFieldID.setHeight("-1px");
textFieldID.setInvalidAllowed(false);
textFieldID.setRequired(true);
textFieldID.setNullRepresentation("");
mainLayout.addComponent(textFieldID);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save and Continue");
buttonSave.setImmediate(false);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
4
View Complete Implementation : AbstractTableLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
private void buildLayout() {
setSizeFull();
setSpacing(true);
setMargin(false);
setStyleName("group");
final VerticalLayout tableHeaderLayout = new VerticalLayout();
tableHeaderLayout.setSizeFull();
tableHeaderLayout.setSpacing(false);
tableHeaderLayout.setMargin(false);
tableHeaderLayout.setStyleName("table-layout");
tableHeaderLayout.addComponent(tableHeader);
tableHeaderLayout.setComponentAlignment(tableHeader, Alignment.TOP_CENTER);
if (isShortCutKeysRequired()) {
final Panel tablePanel = new Panel();
tablePanel.setStyleName("table-panel");
tablePanel.setHeight(100.0F, Unit.PERCENTAGE);
tablePanel.setContent(table);
tablePanel.addActionHandler(getShortCutKeysHandler(i18n));
tablePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
tableHeaderLayout.addComponent(tablePanel);
tableHeaderLayout.setComponentAlignment(tablePanel, Alignment.TOP_CENTER);
tableHeaderLayout.setExpandRatio(tablePanel, 1.0F);
} else {
tableHeaderLayout.addComponent(table);
tableHeaderLayout.setComponentAlignment(table, Alignment.TOP_CENTER);
tableHeaderLayout.setExpandRatio(table, 1.0F);
}
addComponent(tableHeaderLayout);
addComponent(detailsLayout);
setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER);
setComponentAlignment(detailsLayout, Alignment.TOP_CENTER);
setExpandRatio(tableHeaderLayout, 1.0F);
}
4
View Complete Implementation : AbstractTagLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
protected void buildLayout() {
mainLayout = new GridLayout(3, 2);
mainLayout.setSpacing(true);
colorPickerLayout = new ColorPickerLayout();
ColorPickerHelper.setRgbSliderValues(colorPickerLayout);
contentLayout = new VerticalLayout();
colorLabelLayout = new HorizontalLayout();
colorLabelLayout.setMargin(false);
colorLabelLayout.addComponents(colorLabel, tagColorPreviewBtn);
formLayout.addComponent(tagName);
formLayout.addComponent(tagDesc);
formLayout.setSizeFull();
contentLayout.addComponent(formLayout);
contentLayout.addComponent(colorLabelLayout);
contentLayout.setComponentAlignment(formLayout, Alignment.MIDDLE_CENTER);
contentLayout.setComponentAlignment(colorLabelLayout, Alignment.MIDDLE_LEFT);
contentLayout.setSizeUndefined();
mainLayout.setSizeFull();
mainLayout.addComponent(contentLayout, 0, 0);
colorPickerLayout.setVisible(false);
mainLayout.addComponent(colorPickerLayout, 1, 0);
mainLayout.setComponentAlignment(colorPickerLayout, Alignment.MIDDLE_CENTER);
setCompositionRoot(mainLayout);
tagName.focus();
}
4
View Complete Implementation : TenantConfigurationDashboardView.java
Copyright Eclipse Public License 1.0
Author : eclipse
Copyright Eclipse Public License 1.0
Author : eclipse
/**
* Init method adds all Configuration Views to the list of Views.
*/
@PostConstruct
public void init() {
if (defaultDistributionSetTypeLayout.getComponentCount() > 0) {
configurationViews.add(defaultDistributionSetTypeLayout);
}
configurationViews.add(repositoryConfigurationView);
configurationViews.add(rolloutConfigurationView);
configurationViews.add(authenticationConfigurationView);
configurationViews.add(pollingConfigurationView);
if (customConfigurationViews != null) {
configurationViews.addAll(customConfigurationViews.stream().filter(ConfigurationGroup::show).collect(Collectors.toList()));
}
final Panel rootPanel = new Panel();
rootPanel.setStyleName("tenantconfig-root");
final VerticalLayout rootLayout = new VerticalLayout();
rootLayout.setSizeFull();
rootLayout.setMargin(true);
rootLayout.setSpacing(true);
configurationViews.forEach(rootLayout::addComponent);
final HorizontalLayout buttonContent = saveConfigurationButtonsLayout();
rootLayout.addComponent(buttonContent);
rootLayout.setComponentAlignment(buttonContent, Alignment.BOTTOM_LEFT);
rootPanel.setContent(rootLayout);
setCompositionRoot(rootPanel);
configurationViews.forEach(view -> view.addChangeListener(this));
}
4
View Complete Implementation : GraphExplorer.java
Copyright Apache License 2.0
Author : vaadin
Copyright Apache License 2.0
Author : vaadin
protected void openMemberSelector(final String groupId) {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.setSpacing(true);
layout.setSizeFull();
final NodeSelector selector = controller.getMemberSelector(groupId, repository);
layout.addComponent(selector);
layout.setExpandRatio(selector, 1.0f);
HorizontalLayout buttons = new HorizontalLayout();
Button showButton = new Button(getShowButtonCaption());
Button cancelButton = new Button(getCancelButtonCaption());
buttons.addComponent(cancelButton);
buttons.addComponent(showButton);
buttons.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(buttons);
layout.setComponentAlignment(buttons, Alignment.BOTTOM_RIGHT);
final Window dialog = createMemberSelectorWindow();
dialog.setContent(layout);
getUI().addWindow(dialog);
cancelButton.addClickListener(new ClickListener() {
private static final long serialVersionUID = 1L;
public void buttonClick(ClickEvent event) {
getUI().removeWindow(dialog);
}
});
showButton.addClickListener(new ClickListener() {
private static final long serialVersionUID = 1L;
public void buttonClick(ClickEvent event) {
getUI().removeWindow(dialog);
controller.loadMembers(groupId, selector.getSelectedNodeIds(), repository, layoutEngine.getModel());
Set<NodeProxy> lockedNodes = new HashSet<NodeProxy>();
NodeProxy groupNode = layoutEngine.getModel().getNode(groupId);
if (groupNode == null) {
refreshLayout(lockedNodes, true, groupId);
} else {
lockedNodes.add(groupNode);
refreshLayout(lockedNodes, true, null);
}
}
});
}