List of usage examples for com.vaadin.ui Alignment BOTTOM_RIGHT
Alignment BOTTOM_RIGHT
To view the source code for com.vaadin.ui Alignment BOTTOM_RIGHT.
Click Source Link
From source file:edu.kit.dama.ui.admin.administration.user.UserDataAdministrationTab.java
License:Apache License
private VerticalLayout getMainLayout() { if (mainLayout == null) { String id = "mainLayout"; LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ..."); mainLayout = new VerticalLayout(); mainLayout.setId(DEBUG_ID_PREFIX + id); mainLayout.setSizeFull();/*from w ww .j a va2s.co m*/ mainLayout.setMargin(true); mainLayout.setSpacing(true); HorizontalLayout filterButtons = new HorizontalLayout(getRemoveAllFiltersButton(), getAddFilterButton()); filterButtons.setComponentAlignment(getRemoveAllFiltersButton(), Alignment.BOTTOM_RIGHT); filterButtons.setComponentAlignment(getAddFilterButton(), Alignment.BOTTOM_RIGHT); // Add components to mainLayout mainLayout.addComponent(getUserDataForm()); mainLayout.addComponent(filterButtons); mainLayout.addComponent(getUserDataTablePanel()); mainLayout.setComponentAlignment(filterButtons, Alignment.BOTTOM_RIGHT); } return mainLayout; }
From source file:edu.kit.dama.ui.admin.administration.user.UserDataAdministrationTab.java
License:Apache License
private GridLayout getFilterWindowLayout() { if (filterWindowLayout == null) { String id = "viewLayout"; LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ..."); filterWindowLayout = new GridLayout(2, 3); filterWindowLayout.setId(DEBUG_ID_PREFIX + id); filterWindowLayout.setSpacing(true); filterWindowLayout.setMargin(true); filterWindowLayout.addStyleName(CSSTokenContainer.GREY_CAPTION); filterWindowLayout.addComponent(getFilterColumnBox(), 0, 0); filterWindowLayout.addComponent(getFilterOptions(), 1, 0, 1, 1); filterWindowLayout.addComponent(getFilterSearchField(), 0, 1); filterWindowLayout.addComponent(getFilterButton(), 1, 2); filterWindowLayout.setComponentAlignment(getFilterButton(), Alignment.BOTTOM_RIGHT); filterWindowLayout.setColumnExpandRatio(0, 0.7f); filterWindowLayout.setColumnExpandRatio(1, 0.3f); }//from w w w. ja va 2 s .c o m return filterWindowLayout; }
From source file:edu.kit.dama.ui.admin.administration.usergroup.GroupMembershipEditorWindow.java
License:Apache License
private GridLayout getMainLayout() throws AuthorizationException, UnsupportedEnumException { if (mainPanel == null) { String id = "mainPanel"; LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ..."); UIUtils7.GridLayoutBuilder builder = new UIUtils7.GridLayoutBuilder(2, 2); //add table and exclude button builder.addComponent(getMembersTable(), 0, 0).addComponent(getExcludeMembersButton(), Alignment.BOTTOM_LEFT, 0, 1, 1, 1); Label l = new Label( "To add members select them in the list below and click <i>'Add Member(s)'</i>. To exclude members select them in the table and click <i>'Exclude Member(s)'</i>", ContentMode.HTML); Button closeButton = new Button("Close"); closeButton.addClickListener((event) -> { close();/*from w ww . j a v a 2 s .c o m*/ }); VerticalLayout actionLayout = new VerticalLayout(l, getUserSelector(), getAddMembersButton()); actionLayout.setComponentAlignment(l, Alignment.TOP_CENTER); actionLayout.setComponentAlignment(getUserSelector(), Alignment.TOP_RIGHT); actionLayout.setComponentAlignment(getAddMembersButton(), Alignment.TOP_RIGHT); actionLayout.setExpandRatio(getUserSelector(), 1.0f); actionLayout.setSpacing(true); actionLayout.setSizeFull(); builder.addComponent(actionLayout, 1, 0, 1, 1).addComponent(closeButton, Alignment.BOTTOM_RIGHT, 1, 1, 1, 1); mainPanel = builder.getLayout(); mainPanel.setId(DEBUG_ID_PREFIX + id); mainPanel.setSizeFull(); mainPanel.setColumnExpandRatio(0, .7f); mainPanel.setColumnExpandRatio(1, .3f); mainPanel.setRowExpandRatio(0, .99f); mainPanel.setRowExpandRatio(1, .01f); mainPanel.setSpacing(true); mainPanel.setMargin(true); updateMainPanel(); } return mainPanel; }
From source file:edu.kit.dama.ui.admin.administration.usergroup.UserGroupAdministrationTab.java
License:Apache License
private VerticalLayout getMainLayout() { if (mainLayout == null) { String id = "mainLayout"; LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ..."); mainLayout = new VerticalLayout(); mainLayout.setId(DEBUG_ID_PREFIX + id); mainLayout.setSizeFull();//from w w w . ja va2s . co m mainLayout.setMargin(true); mainLayout.setSpacing(true); HorizontalLayout filterButtons = new HorizontalLayout(getRemoveAllFiltersButton(), getAddFilterButton()); filterButtons.setComponentAlignment(getRemoveAllFiltersButton(), Alignment.BOTTOM_RIGHT); filterButtons.setComponentAlignment(getAddFilterButton(), Alignment.BOTTOM_RIGHT); // Add components to mainLayout mainLayout.addComponent(getUserGroupForm()); mainLayout.addComponent(filterButtons); mainLayout.addComponent(getUserGroupTablePanel()); mainLayout.setComponentAlignment(filterButtons, Alignment.BOTTOM_RIGHT); } return mainLayout; }
From source file:edu.kit.dama.ui.admin.administration.usergroup.UserGroupAdministrationTab.java
License:Apache License
private GridLayout getFilterWindowLayout() { if (filterWindowLayout == null) { String id = "viewLayout"; LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ..."); filterWindowLayout = new GridLayout(2, 3); filterWindowLayout.setId(DEBUG_ID_PREFIX + id); filterWindowLayout.setSpacing(true); filterWindowLayout.setMargin(true); filterWindowLayout.addStyleName(CSSTokenContainer.GREY_CAPTION); filterWindowLayout.addComponent(getColumnBox(), 0, 0); filterWindowLayout.addComponent(getFilterOptions(), 1, 0, 1, 1); filterWindowLayout.addComponent(getFilterSearchField(), 0, 1); filterWindowLayout.addComponent(getFilterButton(), 1, 2); filterWindowLayout.setComponentAlignment(getFilterButton(), Alignment.BOTTOM_RIGHT); filterWindowLayout.setColumnExpandRatio(0, 0.7f); filterWindowLayout.setColumnExpandRatio(1, 0.3f); }/*from w w w . ja v a 2 s. co m*/ return filterWindowLayout; }
From source file:edu.kit.dama.ui.admin.administration.usergroup.UserGroupForm.java
License:Apache License
public UserGroupForm(UserGroupAdministrationTab groupAdministrationTab) { this.userGroupAdministrationTab = groupAdministrationTab; LOGGER.debug("Building " + DEBUG_ID_PREFIX + " ..."); setId(DEBUG_ID_PREFIX.substring(0, DEBUG_ID_PREFIX.length() - 1)); setColumns(5);//from w ww . j a v a 2 s .c o m setRows(4); setSizeFull(); setSpacing(true); // Add components addComponent(getIdField(), 0, 0); addComponent(getGroupNameField(), 0, 1); addComponent(getDescriptionArea(), 0, 2, 2, 3); addComponent(getGroupIdField(), 2, 0); addComponent(getNumberOfMembersField(), 2, 1); addComponent(getCommitChangesButton(), 4, 0); addComponent(getShowMembersButton(), 4, 1); addComponent(getCreateUserGroupButton(), 4, 2, 4, 3); setColumnExpandRatio(0, 0.39f); setColumnExpandRatio(1, 0.01f); setColumnExpandRatio(2, 0.39f); setColumnExpandRatio(3, 0.01f); setColumnExpandRatio(4, 0.2f); setComponentAlignment(getCommitChangesButton(), Alignment.BOTTOM_RIGHT); setComponentAlignment(getShowMembersButton(), Alignment.MIDDLE_RIGHT); setComponentAlignment(getCreateUserGroupButton(), Alignment.MIDDLE_CENTER); }
From source file:edu.kit.dama.ui.admin.administration.usergroup.UserGroupForm.java
License:Apache License
private VerticalLayout getCreateGroupLayout() { if (createGroupLayout == null) { String id = "viewLayout"; LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ..."); createGroupLayout = new VerticalLayout(getNewGroupIdField(), getNewGroupNameField(), getNewGroupDescriptionField(), getCommitNewGroupButton()); createGroupLayout.setId(DEBUG_ID_PREFIX + id); createGroupLayout.setWidth("300px"); createGroupLayout.setSpacing(true); createGroupLayout.setMargin(true); createGroupLayout.setCaption("NEW GROUP"); createGroupLayout.addStyleName(CSSTokenContainer.GREY_CAPTION); createGroupLayout.setComponentAlignment(getNewGroupIdField(), Alignment.TOP_LEFT); createGroupLayout.setComponentAlignment(getNewGroupNameField(), Alignment.TOP_LEFT); createGroupLayout.setComponentAlignment(getNewGroupDescriptionField(), Alignment.TOP_LEFT); createGroupLayout.setComponentAlignment(getCommitNewGroupButton(), Alignment.BOTTOM_RIGHT); }/*from w w w .j a v a 2s. c om*/ return createGroupLayout; }
From source file:edu.kit.dama.ui.admin.login.AbstractLoginComponent.java
License:Apache License
/** * Basic initialization of components.//from w w w . ja va2s .c o m */ private void initializeLayout() { registrationFormView.setWidth("400px"); loginButton = new Button("Login"); loginButton.setClickShortcut(ShortcutAction.KeyCode.ENTER); loginButton.setWidth("100px"); loginButton.addClickListener(this); registerButton = new Button("Register"); registerButton.setWidth("100px"); registerButton.addClickListener(this); mainLayout = new UIUtils7.GridLayoutBuilder(2, 2).addComponent(getLoginForm(), 0, 0, 2, 1) .addComponent(registerButton, 0, 1, 1, 1).addComponent(loginButton, 1, 1, 1, 1).getLayout(); mainLayout.setComponentAlignment(getLoginForm(), Alignment.TOP_CENTER); mainLayout.setComponentAlignment(loginButton, Alignment.BOTTOM_RIGHT); mainLayout.setSpacing(true); mainLayout.setMargin(false); mainLayout.setComponentAlignment(registerButton, Alignment.BOTTOM_LEFT); VerticalLayout vLayout = new VerticalLayout(mainLayout); vLayout.setImmediate(true); vLayout.setComponentAlignment(mainLayout, Alignment.MIDDLE_CENTER); setCompositionRoot(vLayout); }
From source file:edu.kit.dama.ui.admin.MainControlPanel.java
License:Apache License
/** * Build the main layout./*from w w w . j av a2 s .c om*/ */ private void buildMainLayout() { infoCell = createCell("img/128x128/information2.png", Alignment.TOP_RIGHT, 0, "<p>Show/edit your profile and personel settings.</p>", "help-right"); profileCell = createCell("img/128x128/preferences.png", Alignment.TOP_LEFT, 1, "<p>Get information on how you use this KIT Data Manager instance.</p>", "help-left"); administrationCell = createCell("img/128x128/gears_preferences.png", Alignment.BOTTOM_RIGHT, 2, "<p>Logout.</p>", "help-right"); logoutCell = createCell("img/128x128/exit.png", Alignment.BOTTOM_LEFT, 3, "<p>Show KIT Data Manager settings.<br/>This view is only available for administrators and group manager</p>.", "help-left"); GridLayout actionCellLayout = new UIUtils7.GridLayoutBuilder(2, 2) .addComponent(infoCell, Alignment.BOTTOM_RIGHT, 0, 0, 1, 1) .addComponent(profileCell, Alignment.BOTTOM_LEFT, 1, 0, 1, 1) .addComponent(administrationCell, Alignment.TOP_RIGHT, 0, 1, 1, 1) .addComponent(logoutCell, Alignment.TOP_LEFT, 1, 1, 1, 1).getLayout(); actionCellLayout.setSpacing(true); actionCellLayout.setMargin(true); actionCellLayout.setSizeFull(); actionCellLayout.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (event.getClickedComponent() instanceof Image) { // Check if childComponent is disabled if (!event.getChildComponent().isEnabled()) { return; } Image img = (Image) event.getClickedComponent(); if ("image0".equals(img.getId())) { parent.updateView(AdminUIMainView.VIEW.INFORMATION); } else if ("image1".equals(img.getId())) { parent.updateView(AdminUIMainView.VIEW.PROFILE); } else if ("image2".equals(img.getId())) { parent.updateView(AdminUIMainView.VIEW.SETTINGS); } else if ("image3".equals(img.getId())) { parent.logout(); } } } }); mainLayout = new VerticalLayout(actionCellLayout); mainLayout.setSizeFull(); }
From source file:edu.kit.dama.ui.admin.schedule.JobScheduleConfigurationTab.java
License:Apache License
/** * Build the main layout./*from w w w. j a v a 2 s .c o m*/ * * @return The main layout. */ @Override public GridLayout buildMainLayout() { String id = "mainLayout"; LOGGER.debug("Building " + DEBUG_ID_PREFIX + id + " ..."); UIUtils7.GridLayoutBuilder mainLayoutBuilder = new UIUtils7.GridLayoutBuilder(3, 3); // Add components to mainLayout mainLayoutBuilder.fillColumn(getElementList(), 0, 0, 1); mainLayoutBuilder.addComponent(getImplementationClassField(), 1, 0, 1, 1) .addComponent(getLoadImplementationClassButton(), Alignment.BOTTOM_RIGHT, 2, 0, 1, 1); mainLayoutBuilder.fillRow(getPropertiesPanel(), 1, 1, 1); mainLayoutBuilder.addComponent(getNavigateButton(), Alignment.BOTTOM_LEFT, 1, 2, 1, 1) .addComponent(getCommitChangesButton(), Alignment.BOTTOM_RIGHT, 2, 2, 1, 1); mainLayout = mainLayoutBuilder.getLayout(); mainLayout.setId(DEBUG_ID_PREFIX + id); mainLayout.setSizeFull(); mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.setColumnExpandRatio(1, 1f); mainLayout.setRowExpandRatio(1, 1f); return mainLayout; }