List of usage examples for com.vaadin.ui HorizontalLayout HorizontalLayout
public HorizontalLayout()
From source file:com.ahmed.vaadinone.ui.PersonForm.java
public PersonForm() { addField("First Name", new TextField("First Name")); addField("Last Name", new TextField("Last Name")); HorizontalLayout footer = new HorizontalLayout(); footer.setSpacing(true);//from w w w . j a v a2s . c o m footer.addComponent(save); footer.addComponent(cancel); setFooter(footer); }
From source file:com.anphat.list.ui.DialogAddMapStaffCustomer.java
private void buildMainLayout() { // common part: create layout horizontalLayout = new HorizontalLayout(); horizontalLayout.setImmediate(true); horizontalLayout.setWidth("100%"); horizontalLayout.setHeight("-1px"); horizontalLayout.setMargin(false);//from w ww . j ava 2s.co m // // top-level component properties // setWidth("100.0%"); // setHeight("-1px"); // leftLayout buildLeftLayout(); horizontalLayout.addComponent(leftLayout); horizontalLayout.setExpandRatio(leftLayout, 1.0f); // centerLayout buildCenterLayout(); horizontalLayout.addComponent(centerLayout); horizontalLayout.setComponentAlignment(centerLayout, new Alignment(48)); // rightLayout buildRightLayout(); horizontalLayout.addComponent(rightLayout); horizontalLayout.setExpandRatio(rightLayout, 1.0f); }
From source file:com.anphat.list.ui.DialogCreateDepartment.java
@AutoGenerated private HorizontalLayout buildHorizontalLayoutButton() { // common part: create layout horizontalLayoutButton = new HorizontalLayout(); horizontalLayoutButton.setImmediate(true); horizontalLayoutButton.setWidth("100.0%"); horizontalLayoutButton.setHeight("-1px"); horizontalLayoutButton.setMargin(true); horizontalLayoutButton.setSpacing(true); // btnSave// w w w . j a v a2 s. co m btnSave = new Button(); btnSave.setCaption(BundleUtils.getString("common.button.save")); btnSave.setImmediate(true); btnSave.setWidth("-1px"); btnSave.setHeight("-1px"); btnSave.setIcon(new ThemeResource("img/save_icon.png")); horizontalLayoutButton.addComponent(btnSave); horizontalLayoutButton.setComponentAlignment(btnSave, new Alignment(34)); // btnCancel btnCancel = new Button(); btnCancel.setCaption(BundleUtils.getString("common.button.cancel")); btnCancel.setImmediate(true); btnCancel.setWidth("-1px"); btnCancel.setHeight("-1px"); btnCancel.setIcon(new ThemeResource("img/cancel_icon.png")); horizontalLayoutButton.addComponent(btnCancel); horizontalLayoutButton.setComponentAlignment(btnCancel, new Alignment(33)); return horizontalLayoutButton; }
From source file:com.anphat.list.ui.DialogCreateStaff.java
@AutoGenerated private HorizontalLayout buildHorizontalLayoutButton() { // common part: create layout horizontalLayoutButton = new HorizontalLayout(); horizontalLayoutButton.setImmediate(false); horizontalLayoutButton.setWidth("100.0%"); horizontalLayoutButton.setHeight("-1px"); horizontalLayoutButton.setMargin(true); horizontalLayoutButton.setSpacing(true); // btnSave/* ww w.j av a 2 s . co m*/ btnSave = new Button(); btnSave.setCaption(BundleUtils.getString("common.button.save")); btnSave.setImmediate(true); btnSave.setWidth("-1px"); btnSave.setHeight("-1px"); btnSave.setIcon(new ThemeResource(Constants.ICON.SAVE)); horizontalLayoutButton.addComponent(btnSave); horizontalLayoutButton.setComponentAlignment(btnSave, new Alignment(34)); // btnCancel btnCancel = new Button(); btnCancel.setCaption(BundleUtils.getString("common.button.cancel")); btnCancel.setImmediate(true); btnCancel.setWidth("-1px"); btnCancel.setHeight("-1px"); btnCancel.setIcon(new ThemeResource(Constants.ICON.CANCEL)); horizontalLayoutButton.addComponent(btnCancel); horizontalLayoutButton.setComponentAlignment(btnCancel, new Alignment(33)); return horizontalLayoutButton; }
From source file:com.anphat.list.ui.MapStaffCustomerDialog.java
private void buildMapLayout() { // leftLayout mapLayout = new HorizontalLayout(); mapLayout.setWidth("100%"); mapLayout.setHeight("-1px"); mapLayout.setImmediate(true);//from w w w .j a va2s . c o m mapLayout.setMargin(true); mapLayout.setSpacing(true); buildFirstLayout(); mapLayout.addComponent(leftLayout); mapLayout.setExpandRatio(leftLayout, 1.0f); // centerLayout // buildCenterLayout(); // mapLayout.addComponent(centerLayout); // mapLayout.setComponentAlignment(centerLayout, Alignment.MIDDLE_CENTER); // rightLayout buildCustomerStatusLayout(); mapLayout.addComponent(rightLayout); mapLayout.setExpandRatio(rightLayout, 1.0f); }
From source file:com.antonjohansson.managementcenter.core.web.welcome.WelcomeView.java
License:Apache License
private Component getExistingConnectionLayout() { ComboBox connection = new ComboBox("Existing connection"); connection.addItem("SQL Server 01"); connection.addItem("Elasticsearch Server 01"); connection.setWidth("400"); connection.setNullSelectionAllowed(false); connection.setTextInputAllowed(false); Button connect = new Button("Connect"); connect.addStyleName(ValoTheme.BUTTON_PRIMARY); connect.setClickShortcut(KeyCode.ENTER); connect.setWidth("120"); HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true);//from w ww . j av a 2s . c o m layout.addComponents(connection, connect); layout.setComponentAlignment(connect, Alignment.BOTTOM_LEFT); return layout; }
From source file:com.antonjohansson.managementcenter.core.web.welcome.WelcomeView.java
License:Apache License
private Component getNewConnectionLayout() { engine = new ComboBox("New connection"); engine.setWidth("400"); engine.setNullSelectionAllowed(false); engine.setTextInputAllowed(false);// www.j av a2s. c om create = new Button("Create"); create.addStyleName(ValoTheme.BUTTON_PRIMARY); create.setClickShortcut(KeyCode.ENTER); create.setWidth("120"); HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.addComponents(engine, create); layout.setComponentAlignment(create, Alignment.BOTTOM_LEFT); return layout; }
From source file:com.application.modules.commercial.ClientListView.java
public void init() { //Recherche TextField rech = new ComboBox("Rechercher un Client :"); this.addComponent(rech); this.setComponentAlignment(rech, Alignment.TOP_RIGHT); //Panels/* ww w . j a v a 2 s . c o m*/ HorizontalLayout panels = new HorizontalLayout(); panels.setHeight("100%"); panels.setWidth("100%"); Panel panel_liste = new Panel("Liste des Clients"); Panel panel_license = new Panel("Liste des licenses"); panels.addComponent(panel_liste); panels.addComponent(panel_license); this.addComponent(panels); //Intervention Liste table Client_liste = new Table(); Client_liste.setHeight("550px"); License_liste = new Table(); License_liste.setHeight("550px"); Client_liste.setWidth("100%"); License_liste.setWidth("100%"); // selectable Client_liste.setSelectable(true); Client_liste.setMultiSelect(false); Client_liste.setImmediate(true); License_liste.setSelectable(true); License_liste.setMultiSelect(false); License_liste.setImmediate(true); // turn on column reordering and collapsing Client_liste.setColumnReorderingAllowed(true); Client_liste.setColumnCollapsingAllowed(true); License_liste.setColumnReorderingAllowed(true); License_liste.setColumnCollapsingAllowed(true); //Client Table Client_liste.addContainerProperty("Num", String.class, null); Client_liste.addContainerProperty("Nom client", String.class, null); Client_liste.addContainerProperty("Contact", String.class, null); Client_liste.addContainerProperty("Adresse", String.class, null); Client_liste.addContainerProperty("Tlephone", String.class, null); //License Table License_liste.addContainerProperty("Num", String.class, null); License_liste.addContainerProperty("Application", String.class, null); License_liste.addContainerProperty("Date Expiration", Date.class, null); panel_liste.addComponent(Client_liste); panel_license.addComponent(License_liste); rech.setImmediate(true); Property.ValueChangeListener listener = new Property.ValueChangeListener() { public void valueChange(ValueChangeEvent event) { presenter.load_ClientListe(); } }; Client_liste.addListener(new ItemClickEvent.ItemClickListener() { @Override public void itemClick(ItemClickEvent itemClickEvent) { System.out.println(itemClickEvent.getItemId().toString()); presenter.load_LicenseListe(itemClickEvent.getItemId()); } }); rech.addListener(listener); //Class Layout properties this.setWidth("100%"); this.setMargin(true); this.setSpacing(true); presenter.load_ClientListe(); presenter.list_client(); }
From source file:com.arcusys.liferay.vaadinplugin.ControlPanelUI.java
License:Apache License
private void createUI() { //create main layout mainLayout = new VerticalLayout(); mainLayout.setWidth("720px"); mainLayout.setSpacing(true);//from w w w . j av a2s .c o m setContent(mainLayout); //create Setting layout settingsPanel = new Panel("Settings"); settingsLayout = new FormLayout(); settingsPanel.setContent(settingsLayout); versionUpgradeProgressIndicator = createProgressIndicator(); changeVersionButton = createChangeVersionButton(); updateVaadinVersionButton = createUpdateVaadinVersionButton(); Version vaadinNewestVersion = newestDownloadInfo.getVersion(); //add details detailsButton = createDetailsButton(); vaadinVersionLayout = createVaadinVersionLayout(vaadinNewestVersion.toString(), changeVersionButton, updateVaadinVersionButton, versionUpgradeProgressIndicator, detailsButton); settingsLayout.addComponent(vaadinVersionLayout); activeWidgetsetLabel = createActiveWidgetsetLabel(); settingsLayout.addComponent(activeWidgetsetLabel); // Add-on selection HorizontalLayout addonDirectoryLayout = createAddonDirectoryLayout(); settingsLayout.addComponent(addonDirectoryLayout); //Add-on included includeAddonsOptionGroup = createIncludeAddonsList(); addonsListHolder = createIncludeAddonsListLayout(includeAddonsOptionGroup); settingsLayout.addComponent(addonsListHolder); //addition dependencies additionalDependenciesLabel = createAdditionalDependenciesLabel(); settingsLayout.addComponent(additionalDependenciesLabel); mainLayout.addComponent(settingsPanel); additionalDependenciesButton = createAdditionalDependenciesButton(); mainLayout.addComponent(additionalDependenciesButton); //Compilation layout HorizontalLayout compilationlayout = new HorizontalLayout(); compileWidgetsetButton = createCompileWidgetsetButton(); compilationlayout.addComponent(compileWidgetsetButton); terminateCompilationButton = createTerminateCompilationButton(); compilationlayout.addComponent(terminateCompilationButton); compilationProgressIndicator = createProgressIndicator(); compilationlayout.addComponent(compilationProgressIndicator); compilationlayout.setComponentAlignment(compilationProgressIndicator, Alignment.MIDDLE_LEFT); settingsLayout.addComponent(compilationlayout); //Output console outputConsole = createOutputConsole(); mainLayout.addComponent(outputConsole); addonsNotFoundLabel = createAddonsNotFoundLabel(); }
From source file:com.arcusys.liferay.vaadinplugin.ControlPanelUI.java
License:Apache License
private HorizontalLayout createVaadinVersionLayout(String newestVersion, Button changeVersionButton, Button updateVaadinVersionButton, ProgressIndicator versionUpgradeProgressIndicator, Button detailsButton) {/* www . j a v a 2 s . c o m*/ HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setCaption("Vaadin Jar Version"); Label vaadinVersionLabel = new Label(); vaadinVersionLabel.setSizeUndefined(); String version = null; try { version = ControlPanelPortletUtil.getPortalVaadinServerVersion(); } catch (FileNotFoundException e) { log.warn("vaadin-server.jar couldn't be read. file not found."); } catch (IOException e) { log.warn("vaadin-server.jar couldn't be read. ", e); } if (version == null) { try { version = ControlPanelPortletUtil.getPortalVaadin6Version(); } catch (IOException e) { log.warn("vaadin.jar couldn't be read."); } } if (version == null) { version = "could not be determined"; } vaadinVersionLabel.setValue(version); layout.addComponent(vaadinVersionLabel); if (version.startsWith("7")) { layout.addComponent(detailsButton); } layout.addComponent(changeVersionButton); Label newestVaadinVersionLabel = new Label(); newestVaadinVersionLabel.setSizeUndefined(); newestVaadinVersionLabel.setValue("(newest stable version: " + newestVersion + ")"); layout.addComponent(newestVaadinVersionLabel); if (!version.equals(newestVersion)) { layout.addComponent(updateVaadinVersionButton); } layout.addComponent(versionUpgradeProgressIndicator); return layout; }