List of usage examples for com.vaadin.ui Alignment Alignment
public Alignment(int bitMask)
From source file:jcaster_vaadin.Gui2.java
License:Open Source License
@AutoGenerated private VerticalLayout buildVerticalLayout_2() { // common part: create layout verticalLayout_2 = new VerticalLayout(); verticalLayout_2.setWidth("100.0%"); verticalLayout_2.setHeight("100.0%"); verticalLayout_2.setImmediate(false); verticalLayout_2.setMargin(false);/*from ww w . j ava 2 s .co m*/ // gridLayout_3 gridLayout_3 = buildGridLayout_3(); verticalLayout_2.addComponent(gridLayout_3); verticalLayout_2.setComponentAlignment(gridLayout_3, new Alignment(48)); return verticalLayout_2; }
From source file:net.gvcc.jgoffice.components.CommandBar.java
License:Open Source License
private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false);//from www . j a v a 2 s .c om mainLayout.setWidth("100%"); mainLayout.setHeight("-1px"); mainLayout.setMargin(false); mainLayout.setSpacing(true); // top-level component properties setWidth("100.0%"); setHeight("-1px"); // horizontalLayout_2 horizontalLayout_2 = buildHorizontalLayout_2(); mainLayout.addComponent(horizontalLayout_2); mainLayout.setComponentAlignment(horizontalLayout_2, new Alignment(20)); // searchBar navigationBar = buildNavigationBar(); mainLayout.addComponent(navigationBar); mainLayout.setComponentAlignment(navigationBar, new Alignment(20)); return mainLayout; }
From source file:net.gvcc.jgoffice.components.CommandBar.java
License:Open Source License
private HorizontalLayout buildHorizontalLayout_2() { // common part: create layout horizontalLayout_2 = new HorizontalLayout(); horizontalLayout_2.setImmediate(false); horizontalLayout_2.setWidth("100.0%"); horizontalLayout_2.setHeight("-1px"); horizontalLayout_2.setMargin(false); horizontalLayout_2.setSpacing(true); // logoPicture logoPicture = new Embedded(); logoPicture.setImmediate(false);/* ww w .ja va2 s. c o m*/ logoPicture.setWidth("-1px"); logoPicture.setHeight("-1px"); logoPicture.setSource(new ThemeResource("img/LogoSgvV1.png")); logoPicture.setType(1); logoPicture.setMimeType("image/png"); horizontalLayout_2.addComponent(logoPicture); // lblApplicationTitle lblApplicationTitle = new Label(); lblApplicationTitle.setStyleName("g-applicationtitle"); lblApplicationTitle.setImmediate(false); lblApplicationTitle.setWidth("-1px"); lblApplicationTitle.setHeight("-1px"); lblApplicationTitle.setValue("Label"); horizontalLayout_2.addComponent(lblApplicationTitle); horizontalLayout_2.setComponentAlignment(lblApplicationTitle, new Alignment(33)); // programList programList = new HorizontalLayout(); programList.setImmediate(false); programList.setWidth("-1px"); programList.setHeight("-1px"); programList.setMargin(false); programList.setSpacing(true); horizontalLayout_2.addComponent(programList); horizontalLayout_2.setExpandRatio(programList, 1.0f); horizontalLayout_2.setComponentAlignment(programList, new Alignment(34)); // btnLogout btnLogout = new Button(); btnLogout.setCaption("Logout"); btnLogout.setImmediate(true); btnLogout.setWidth("-1px"); btnLogout.setHeight("-1px"); horizontalLayout_2.addComponent(btnLogout); horizontalLayout_2.setComponentAlignment(btnLogout, new Alignment(34)); return horizontalLayout_2; }
From source file:net.gvcc.jgoffice.components.CommandBar.java
License:Open Source License
private HorizontalLayout buildNavigationBar() { // common part: create layout navigationBar = new HorizontalLayout(); navigationBar.setStyleName("g-commandBar"); navigationBar.setImmediate(false);//ww w.j a v a 2 s. c o m navigationBar.setWidth("100.0%"); navigationBar.setHeight("-1px"); navigationBar.setMargin(true); // menuBar_1 menuBar_1 = new MenuBar(); menuBar_1.setImmediate(false); menuBar_1.setWidth("-1px"); menuBar_1.setHeight("-1px"); navigationBar.addComponent(menuBar_1); navigationBar.setComponentAlignment(menuBar_1, new Alignment(33)); // searchComponent searchComponent = SearchBarFactory.getInstance(); searchComponent.setWidth("100%"); navigationBar.addComponent(searchComponent); navigationBar.setExpandRatio(searchComponent, 1); return navigationBar; }
From source file:net.gvcc.jgoffice.searchcomponent.SearchComponent.java
public SearchComponent() { //this.setStyleName("g-commandBar"); this.setImmediate(true); this.setWidth("100.0%"); this.setHeight("-1px"); this.setMargin(false); // searchField searchField = new TextField(); searchField.setImmediate(true);/* www . j a v a2 s. com*/ searchField.setInputPrompt("Press F2 to activate..."); searchField.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { String value = (String) searchField.getValue(); if (value.equals("#")) { searchField.setValue("#START:"); } } }); searchField.setWidth("100.0%"); searchField.setHeight("-1px"); this.addComponent(searchField); this.setExpandRatio(searchField, 1.0f); this.setComponentAlignment(searchField, new Alignment(48)); searchField.addShortcutListener(new AbstractField.FocusShortcut(searchField, KeyCode.F2)); searchButton = new Button(); searchButton.setCaption("Start"); searchButton.setImmediate(true); searchButton.setHeight("-1px"); searchButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { searchButtonHandler(event); } }); this.addComponent(searchButton); }
From source file:nl.amc.biolab.nsg.display.component.MainUI.java
License:Open Source License
private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false);/*from www. j av a 2 s . c om*/ mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); mainLayout.setMargin(false); mainLayout.setSpacing(true); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // topPanel topPanel = buildTopPanel(); mainLayout.addComponent(topPanel); mainLayout.setExpandRatio(topPanel, 1.0f); mainLayout.setComponentAlignment(topPanel, new Alignment(33)); // horizontal rule Label hr = new Label("<hr/>", Label.CONTENT_XHTML); hr.addStyleName("horizontal-separator"); hr.setWidth("100%"); hr.setHeight("2px"); mainLayout.addComponent(hr); mainLayout.setComponentAlignment(hr, new Alignment(33)); // mainSplitPanel mainSplitPanel = buildMainSplitPanel(); mainLayout.addComponent(mainSplitPanel); mainLayout.setExpandRatio(mainSplitPanel, 1.0f); return mainLayout; }
From source file:nl.amc.biolab.nsg.display.component.MainUI.java
License:Open Source License
private HorizontalLayout buildTopPanelRight() { // common part: create layout pagePanel = new HorizontalLayout(); pagePanel.setStyleName("topPanel"); pagePanel.setImmediate(false);// w w w . j av a 2s .c om pagePanel.setWidth("-1px"); pagePanel.setHeight("-1px"); pagePanel.setSpacing(true); // dataElementButton dataElementButton = new NativeButton(); dataElementButton.setCaption("view"); dataElementButton.setImmediate(true); dataElementButton.setWidth("-1px"); dataElementButton.setHeight("-1px"); pagePanel.addComponent(dataElementButton); pagePanel.setComponentAlignment(dataElementButton, new Alignment(34)); dataElementButton.setVisible(false); // processingButton processingButton = new NativeButton(); processingButton.setCaption("use data"); processingButton.setImmediate(true); processingButton.setWidth("-1px"); processingButton.setHeight("-1px"); pagePanel.addComponent(processingButton); pagePanel.setComponentAlignment(processingButton, new Alignment(34)); return pagePanel; }
From source file:org.apache.openaz.xacml.admin.components.AttributeDictionary.java
License:Apache License
@AutoGenerated private HorizontalLayout buildHorizontalLayoutToolbar() { // common part: create layout horizontalLayoutToolbar = new HorizontalLayout(); horizontalLayoutToolbar.setImmediate(false); horizontalLayoutToolbar.setWidth("-1px"); horizontalLayoutToolbar.setHeight("-1px"); horizontalLayoutToolbar.setMargin(false); horizontalLayoutToolbar.setSpacing(true); // buttonNew// w w w . j a v a2s . c o m buttonNew = new Button(); buttonNew.setCaption("New"); buttonNew.setImmediate(true); buttonNew.setDescription("Create a new attribute"); buttonNew.setWidth("70px"); buttonNew.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonNew); horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(9)); // buttonRemove buttonRemove = new Button(); buttonRemove.setCaption("Remove"); buttonRemove.setImmediate(true); buttonRemove.setDescription("Remove the selected attribute(s)"); buttonRemove.setWidth("-1px"); buttonRemove.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonRemove); horizontalLayoutToolbar.setComponentAlignment(buttonRemove, new Alignment(9)); // buttonClone buttonClone = new Button(); buttonClone.setCaption("Clone"); buttonClone.setImmediate(true); buttonClone.setDescription("Clone an attribute."); buttonClone.setWidth("-1px"); buttonClone.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonClone); horizontalLayoutToolbar.setComponentAlignment(buttonClone, new Alignment(9)); // comboBoxFilterCategory comboBoxFilterCategory = new ComboBox(); comboBoxFilterCategory.setCaption("Filter By Category"); comboBoxFilterCategory.setImmediate(false); comboBoxFilterCategory.setWidth("-1px"); comboBoxFilterCategory.setHeight("-1px"); horizontalLayoutToolbar.addComponent(comboBoxFilterCategory); // comboBoxFilterDatatype comboBoxFilterDatatype = new ComboBox(); comboBoxFilterDatatype.setCaption("Filter By Data Type"); comboBoxFilterDatatype.setImmediate(false); comboBoxFilterDatatype.setWidth("-1px"); comboBoxFilterDatatype.setHeight("-1px"); horizontalLayoutToolbar.addComponent(comboBoxFilterDatatype); return horizontalLayoutToolbar; }
From source file:org.apache.openaz.xacml.admin.components.ObadviceDictionary.java
License:Apache License
@AutoGenerated private HorizontalLayout buildHorizontalLayoutToolbar() { // common part: create layout horizontalLayoutToolbar = new HorizontalLayout(); horizontalLayoutToolbar.setImmediate(false); horizontalLayoutToolbar.setWidth("-1px"); horizontalLayoutToolbar.setHeight("-1px"); horizontalLayoutToolbar.setMargin(false); horizontalLayoutToolbar.setSpacing(true); // buttonNew/* w ww . ja v a 2 s . co m*/ buttonNew = new Button(); buttonNew.setCaption("New"); buttonNew.setImmediate(true); buttonNew.setDescription("Add a new advice or obligation to the dictionary."); buttonNew.setWidth("-1px"); buttonNew.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonNew); horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(24)); // buttonRemove buttonRemove = new Button(); buttonRemove.setCaption("Remove"); buttonRemove.setImmediate(true); buttonRemove.setDescription("Remove the selected advice or obligation from the dictionary."); buttonRemove.setWidth("-1px"); buttonRemove.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonRemove); horizontalLayoutToolbar.setComponentAlignment(buttonRemove, new Alignment(24)); // buttonClone buttonClone = new Button(); buttonClone.setCaption("Clone"); buttonClone.setImmediate(true); buttonClone.setDescription("Clone the selected obligation/advice."); buttonClone.setWidth("-1px"); buttonClone.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonClone); horizontalLayoutToolbar.setComponentAlignment(buttonClone, new Alignment(24)); // comboBoxFilter comboBoxFilter = new ComboBox(); comboBoxFilter.setCaption("Filter By Type"); comboBoxFilter.setImmediate(false); comboBoxFilter.setWidth("-1px"); comboBoxFilter.setHeight("-1px"); horizontalLayoutToolbar.addComponent(comboBoxFilter); return horizontalLayoutToolbar; }
From source file:org.apache.openaz.xacml.admin.components.PolicyWorkspace.java
License:Apache License
@AutoGenerated private HorizontalLayout buildHorizontalLayoutLeftToolbar() { // common part: create layout horizontalLayoutLeftToolbar = new HorizontalLayout(); horizontalLayoutLeftToolbar.setImmediate(false); horizontalLayoutLeftToolbar.setWidth("100.0%"); horizontalLayoutLeftToolbar.setHeight("-1px"); horizontalLayoutLeftToolbar.setMargin(false); horizontalLayoutLeftToolbar.setSpacing(true); // horizontalLayoutLeftToolbarLeft horizontalLayoutLeftToolbarLeft = buildHorizontalLayoutLeftToolbarLeft(); horizontalLayoutLeftToolbar.addComponent(horizontalLayoutLeftToolbarLeft); // buttonLeft buttonLeft = new Button(); buttonLeft.setCaption("<<"); buttonLeft.setImmediate(true);//from w ww. jav a 2 s . c o m buttonLeft.setDescription("Minimize left panel."); buttonLeft.setWidth("-1px"); buttonLeft.setHeight("-1px"); horizontalLayoutLeftToolbar.addComponent(buttonLeft); horizontalLayoutLeftToolbar.setComponentAlignment(buttonLeft, new Alignment(34)); return horizontalLayoutLeftToolbar; }