List of usage examples for com.vaadin.ui Window setResizeLazy
public void setResizeLazy(boolean resizeLazy)
From source file:annis.gui.controlpanel.CorpusListPanel.java
License:Apache License
public void initCorpusBrowser(String topLevelCorpusName, final Button l) { AnnisCorpus c = ui.getQueryState().getAvailableCorpora().getItem(topLevelCorpusName).getBean(); MetaDataPanel meta = new MetaDataPanel(c.getName()); CorpusBrowserPanel browse = new CorpusBrowserPanel(c, ui.getQueryController()); GridLayout infoLayout = new GridLayout(2, 2); infoLayout.setSizeFull();//from w w w. j a va 2 s .c o m String corpusURL = Helper.generateCorpusLink(Sets.newHashSet(topLevelCorpusName)); Label lblLink = new Label("Link to corpus: <a href=\"" + corpusURL + "\">" + corpusURL + "</a>", ContentMode.HTML); lblLink.setHeight("-1px"); lblLink.setWidth("-1px"); infoLayout.addComponent(meta, 0, 0); infoLayout.addComponent(browse, 1, 0); infoLayout.addComponent(lblLink, 0, 1, 1, 1); infoLayout.setRowExpandRatio(0, 1.0f); infoLayout.setColumnExpandRatio(0, 0.5f); infoLayout.setColumnExpandRatio(1, 0.5f); infoLayout.setComponentAlignment(lblLink, Alignment.MIDDLE_CENTER); Window window = new Window("Corpus information for " + c.getName() + " (ID: " + c.getId() + ")", infoLayout); window.setWidth(70, UNITS_EM); window.setHeight(45, UNITS_EM); window.setResizable(true); window.setModal(false); window.setResizeLazy(true); window.addCloseListener(new Window.CloseListener() { @Override public void windowClose(Window.CloseEvent e) { l.setEnabled(true); } }); UI.getCurrent().addWindow(window); window.center(); }
From source file:com.mymita.vaadlets.VaadletsBuilder.java
License:Apache License
private static void setWindowAttributes(final com.vaadin.ui.Component vaadinComponent, final com.mymita.vaadlets.core.Component vaadletsComponent) { if (vaadletsComponent instanceof com.mymita.vaadlets.ui.Window) { final com.vaadin.ui.Window vaadinWindow = (com.vaadin.ui.Window) vaadinComponent; final com.mymita.vaadlets.ui.Window vaadletsWindow = (com.mymita.vaadlets.ui.Window) vaadletsComponent; if (vaadletsWindow.isCenter()) { vaadinWindow.center();/*from www . ja v a 2 s . c o m*/ } final Short positionX = vaadletsWindow.getPositionX(); if (positionX != null) { vaadinWindow.setPositionX(positionX); } final Short positionY = vaadletsWindow.getPositionY(); if (positionY != null) { vaadinWindow.setPositionY(positionY); } vaadinWindow.setBorder(vaadletsWindow.getBorder().ordinal()); vaadinWindow.setModal(vaadletsWindow.isModal()); vaadinWindow.setClosable(vaadletsWindow.isCloseable()); vaadinWindow.setDraggable(vaadletsWindow.isDraggable()); vaadinWindow.setResizable(vaadletsWindow.isResizeable()); vaadinWindow.setResizeLazy(vaadletsWindow.isResizeLazy()); } }
From source file:pl.exsio.frameset.vaadin.ui.support.component.data.common.DataComponent.java
License:Open Source License
protected Window createFormWindow(String title) { final Window formWindow = new Window(title); formWindow.center();//from w ww . ja va 2 s . co m formWindow.setSizeUndefined(); formWindow.setModal(true); formWindow.setResizable(false); formWindow.setDraggable(false); formWindow.setResizeLazy(false); formWindow.setStyleName("frameset-dc-window"); return formWindow; }