List of usage examples for com.vaadin.ui Component setSizeUndefined
public void setSizeUndefined();
From source file:org.rapidpm.jumpstart.vaadin.ui.basics.MainWindowImpl.java
License:Apache License
@PostConstruct private void buildMainLayout() { this.setSizeFull(); workingAreaContainer.setSizeFull();//w w w .j a va2s. c om workingAreaContainer.setId(WORKING_AREA_CONTAINER); menubar.setSizeUndefined(); Component topPanel = this.topPanel.getComponent(); topPanel.setSizeUndefined(); topPanel.setWidth("100%"); menubar.setWidth("100%"); workingAreaContainer.setSizeFull(); this.setSpacing(false); this.addComponent(topPanel); this.addComponent(menubar); this.addComponent(workingAreaContainer); this.setExpandRatio(workingAreaContainer, 1); this.setComponentAlignment(workingAreaContainer, Alignment.MIDDLE_CENTER); this.setSpacing(false); }
From source file:org.semanticsoft.vaaclipse.presentation.renderers.TrimBarRenderer.java
License:Open Source License
@Override public void addChildGui(MUIElement child, MElementContainer<MUIElement> element) { if (!(child instanceof MTrimElement && (MElementContainer<?>) element instanceof MTrimBar)) return;/*from www . j a v a2s . c o m*/ MTrimBar trimBar = (MTrimBar) (MElementContainer<?>) element; final Component childWidget = (Component) child.getWidget(); childWidget.setVisible(child.isVisible()); childWidget.setSizeUndefined(); int orientation = trimBar.getSide().getValue(); if (orientation == SideValue.TOP_VALUE || orientation == SideValue.BOTTOM_VALUE) childWidget.addStyleName("horizontaltrimelement"); else childWidget.addStyleName("verticaltrimelement"); int index = indexOf(child, element); if (element.getWidget() instanceof CssLayout) { CssLayout trimWidget = (CssLayout) element.getWidget(); trimWidget.addComponent(childWidget, index); trimWidget.markAsDirty(); } else if (element.getWidget() instanceof AbstractOrderedLayout) { AbstractOrderedLayout trimWidget = (AbstractOrderedLayout) element.getWidget(); trimWidget.addComponent(childWidget, index); trimWidget.markAsDirty(); } refreshVisibility(trimBar); }
From source file:org.semanticsoft.vaaclipse.widgets.TopbarComponent.java
License:Open Source License
public void setContent(Component content) { layout.removeComponent(this.content); layout.addComponent(content, 1, 1);/* ww w. ja v a 2 s .c o m*/ this.content = content; content.setSizeUndefined(); content.setWidth("100%"); }
From source file:org.vaadin.easyuploads.MultiFileUploadExt.java
License:Open Source License
/** * Sets up DragAndDropWrapper to accept multi file drops. *//* w w w . j av a 2 s . com*/ private void prepareDropZone() { if (dropZone == null) { Component label = new Label(getAreaText(), ContentMode.HTML); label.setSizeUndefined(); dropZone = new DragAndDropWrapper(label); dropZone.setStyleName("v-multifileupload-dropzone"); dropZone.setSizeUndefined(); addComponent(dropZone, 1); dropZone.setDropHandler(this); addStyleName("no-horizontal-drag-hints"); addStyleName("no-vertical-drag-hints"); } }
From source file:org.vaadin.spring.sidebar.components.ValoSideBar.java
License:Apache License
/** * Adds a logo to the very top of the side bar, above the header. The logo's primary style is automatically * set to {@link ValoTheme#MENU_LOGO} ands its size to undefined. * * @param logo a {@link com.vaadin.ui.Label} or {@link com.vaadin.ui.Button} to use as the logo, or {@code null} to remove the logo completely. *///ww w.j av a 2 s .co m public void setLogo(Component logo) { if (getCompositionRoot() != null && this.logo != null) { getCompositionRoot().removeComponent(this.logo); } this.logo = logo; if (logo != null) { logo.setPrimaryStyleName(ValoTheme.MENU_LOGO); logo.setSizeUndefined(); if (getCompositionRoot() != null) { getCompositionRoot().addComponentAsFirst(logo); } } }
From source file:pt.ist.vaadinframework.ui.layout.FlowLayout.java
License:Open Source License
private void setStyle(Component c) { c.addStyleName("flow-part"); c.setSizeUndefined(); }
From source file:ro.zg.netcell.vaadin.action.application.LoadMainWindowHandler.java
License:Apache License
private void addUserHeaderActions(final OpenGroupsApplication app, final ActionContext ac) throws ContextAwareException { UserActionList actionList = getGlobalActions(ActionLocations.HEADER); if (actionList == null) { return;//from ww w .j a v a 2 s .c o m } Collection<UserAction> userActions = actionList.getActions().values(); OpenGroupsMainWindow window = ac.getWindow(); User user = app.getCurrentUser(); CssLayout header = window.getHeader(); header.removeAllComponents(); if (user != null) { Embedded usericon = new Embedded(null, OpenGroupsResources.getIcon(OpenGroupsIconsSet.USER, OpenGroupsIconsSet.MEDIUM)); usericon.addStyleName("middle-left right-margin-10"); header.addComponent(usericon); Label userInfo = new Label(/*app.getMessage("login.user.info") + ": " +*/ user.getUsername()); userInfo.setSizeUndefined(); header.addComponent(userInfo); userInfo.addStyleName("username-label"); } /* get the current user types */ // List<String> userTypes = UsersManager.getInstance().getCurrentUserTypes(null, app); for (final UserAction ua : userActions) { /* * if the current user is not allowed to read/view the current action then skip it */ // if (!ua.allowRead(userTypes)) { if (!ua.isVisible(ac)) { continue; } Button actButton = new Button(ua.getDisplayName()); actButton.addListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { // app.executeAction(ua, null); ua.executeHandler(null, app, null, ac); } }); header.addComponent(actButton); actButton.addStyleName("middle-right left-margin-10"); } Component rootLink = getRootEntityLink(app); Component metaLink = getMetaEntityLink(app); rootLink.setSizeUndefined(); metaLink.setSizeUndefined(); /* add quick links */ header.addComponent(rootLink); header.addComponent(metaLink); rootLink.addStyleName("middle-right left-margin-10"); metaLink.addStyleName("middle-right left-margin-10"); }
From source file:v7cr.vaadin.V7MultiFileUpload.java
License:Open Source License
/** * Sets up DragAndDropWrapper to accept multi file drops. *//* www . j ava 2s. co m*/ private void prepareDropZone() { if (dropZone == null) { Component label = new Label(getAreaText(), Label.CONTENT_XHTML); label.setSizeUndefined(); dropZone = new DragAndDropWrapper(label); dropZone.setStyleName("v-multifileupload-dropzone"); dropZone.setSizeUndefined(); addComponent(dropZone, 1); dropZone.setDropHandler(this); addStyleName("no-horizontal-drag-hints"); addStyleName("no-vertical-drag-hints"); } }