List of usage examples for com.vaadin.ui Alignment BOTTOM_LEFT
Alignment BOTTOM_LEFT
To view the source code for com.vaadin.ui Alignment BOTTOM_LEFT.
Click Source Link
From source file:roart.client.MyVaadinUI.java
private VerticalLayout getControlPanelTab() { VerticalLayout tab = new VerticalLayout(); tab.setCaption("Control Panel"); HorizontalLayout horNewInd = new HorizontalLayout(); horNewInd.setHeight("20%"); horNewInd.setWidth("90%"); Button fsIndexNew = getFsIndexNew(); horNewInd.addComponent(fsIndexNew);//from w w w. j ava 2 s .c o m horNewInd.setComponentAlignment(fsIndexNew, Alignment.BOTTOM_LEFT); horNewInd.addComponent(getFsIndexNewPath()); horNewInd.addComponent(getFsIndexNewMd5()); HorizontalLayout horNew = new HorizontalLayout(); horNew.setHeight("20%"); horNew.setWidth("60%"); Button fsAddNew = getFsAddNew(); horNew.addComponent(fsAddNew); horNew.setComponentAlignment(fsAddNew, Alignment.BOTTOM_LEFT); horNew.addComponent(getFsAddNewPath()); HorizontalLayout horInd = new HorizontalLayout(); horInd.setHeight("20%"); horInd.setWidth("90%"); Button indexNew = getIndexNew(); horInd.addComponent(indexNew); horInd.setComponentAlignment(indexNew, Alignment.BOTTOM_LEFT); horInd.addComponent(getIndexNewPath()); HorizontalLayout horIndSuf = new HorizontalLayout(); horIndSuf.setHeight("20%"); horIndSuf.setWidth("90%"); horIndSuf.addComponent(getIndexSuffix()); horIndSuf.addComponent(getReindexSuffix()); HorizontalLayout horReindex = new HorizontalLayout(); horReindex.setHeight("20%"); horReindex.setWidth("90%"); horReindex.addComponent(getReindex()); horReindex.addComponent(getReindexDateLower()); horReindex.addComponent(getReindexDateHigher()); HorizontalLayout horReindex2 = new HorizontalLayout(); horReindex2.setHeight("20%"); horReindex2.setWidth("90%"); horReindex2.addComponent(getReindexLanguage()); horReindex2.addComponent(getReindexConfiguredLanguage()); HorizontalLayout horClean = new HorizontalLayout(); horClean.setHeight("20%"); horClean.setWidth("60%"); horClean.addComponent(getConsistent()); horClean.addComponent(getConsistentCleanup()); HorizontalLayout horStat = new HorizontalLayout(); horStat.setHeight("20%"); horStat.setWidth("90%"); horStat.addComponent(getNotIndexed()); horStat.addComponent(getMemoryUsage()); horStat.addComponent(getOverlapping()); HorizontalLayout horDb = new HorizontalLayout(); horDb.setHeight("20%"); horDb.setWidth("60%"); horDb.addComponent(getDbItem()); horDb.addComponent(getDbSearch()); HorizontalLayout horConfig = new HorizontalLayout(); horConfig.setHeight("20%"); horConfig.setWidth("60%"); horConfig.addComponent(getConfigValue(ControlService.Config.FAILEDLIMIT)); horConfig.addComponent(getConfigValue(ControlService.Config.INDEXLIMIT)); horConfig.addComponent(getConfigValue(ControlService.Config.REINDEXLIMIT)); horConfig.addComponent(getConfigValue(ControlService.Config.TIKATIMEOUT)); horConfig.addComponent(getConfigValue(ControlService.Config.OTHERTIMEOUT)); /* tab.addComponent(getCleanup()); tab.addComponent(getCleanup2()); tab.addComponent(getCleanupfs()); */ tab.addComponent(horNewInd); tab.addComponent(horNew); tab.addComponent(horInd); tab.addComponent(horIndSuf); tab.addComponent(horReindex); tab.addComponent(horReindex2); tab.addComponent(horClean); tab.addComponent(horStat); tab.addComponent(horDb); tab.addComponent(horConfig); return tab; }
From source file:tad.grupo7.ccamistadeslargas.LoginView.java
/** * Crea los campos del formulario.// w w w.jav a 2s.com * * @return Component Devuelve el layout que contiene todos los campos del * formulario. */ private Component buildFields() { //LAYOUT CON LOS CAMPOS DEL FORMULARIO HorizontalLayout fields = new HorizontalLayout(); fields.setSpacing(true); fields.addStyleName("fields"); final TextField email = new TextField("Email"); email.setRequired(true); email.setIcon(FontAwesome.USER); email.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); email.focus(); final PasswordField password = new PasswordField("Password"); password.setRequired(true); password.setIcon(FontAwesome.LOCK); password.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); final Button signin = new Button("Sign In"); signin.addStyleName(ValoTheme.BUTTON_PRIMARY); signin.setClickShortcut(KeyCode.ENTER); final Button registrar = new Button("Sign Up"); signin.addStyleName(ValoTheme.BUTTON_PRIMARY); fields.addComponents(email, password, signin, registrar); fields.setComponentAlignment(signin, Alignment.BOTTOM_LEFT); fields.setComponentAlignment(registrar, Alignment.BOTTOM_LEFT); //LOGARSE signin.addClickListener(new ClickListener() { @Override public void buttonClick(final ClickEvent event) { try { email.validate(); password.validate(); Usuario u = UsuarioDAO.read(email.getValue(), password.getValue()); if (u != null) { if (u.getEmail().equals("admin") && u.getPassword().equals("admin")) { Session.setAttribute("usuario", u); UI.getCurrent().getNavigator().navigateTo("AdminIndex"); } else { Session.setAttribute("usuario", u); UI.getCurrent().getNavigator().navigateTo("index"); } } else { Notification n = new Notification("Usuario incorrecto", Notification.Type.WARNING_MESSAGE); n.setPosition(Position.TOP_CENTER); n.show(Page.getCurrent()); } } catch (Validator.InvalidValueException ex) { Notification n = new Notification("Rellena todos los campos", Notification.Type.WARNING_MESSAGE); n.setPosition(Position.TOP_CENTER); n.show(Page.getCurrent()); } } }); //IR AL FORMULARIO DE REGISTRARSE registrar.addClickListener(new ClickListener() { @Override public void buttonClick(final ClickEvent event) { UI.getCurrent().getNavigator().navigateTo("registrar"); } }); return fields; }