List of usage examples for com.vaadin.ui Window getHeight
@Override public float getHeight()
From source file:de.catma.ui.repository.RepositoryManagerWindow.java
License:Open Source License
@Override public void setPosition() { Window mainWindow = getApplication().getMainWindow(); if ((mainWindow.getWidthUnits() == UNITS_PIXELS) && (mainWindow.getWidth() > 0)) { setPositionX(Float.valueOf(Math.min(mainWindow.getWidth(), 50)).intValue()); if ((mainWindow.getHeightUnits() == UNITS_PIXELS) && (mainWindow.getHeight() > 0)) { setPositionY(Float.valueOf(Math.min(mainWindow.getHeight(), 50)).intValue()); }/*from w w w.j a v a 2s . c om*/ } else { super.setPosition(); } }
From source file:de.catma.ui.tagmanager.TagManagerWindow.java
License:Open Source License
@Override public void setPosition() { Window mainWindow = getApplication().getMainWindow(); if ((mainWindow.getWidthUnits() == UNITS_PIXELS) && (mainWindow.getWidth() > 0)) { int posX = Float.valueOf(mainWindow.getWidth() - (mainWindow.getWidth() * 38 / 100)).intValue(); if (posX > 0) { setPositionX(posX);/* w ww .j a va2 s. co m*/ if ((mainWindow.getHeightUnits() == UNITS_PIXELS) && (mainWindow.getHeight() > 0)) { setPositionY(Float.valueOf(Math.min(mainWindow.getHeight(), 20)).intValue()); } } else { super.setPosition(); } } else { super.setPosition(); } }
From source file:org.semanticsoft.vaaclipse.presentation.renderers.WorkbenchWindowRenderer.java
License:Open Source License
@Override public void hookControllerLogic(final MUIElement element) { if (element instanceof MWindow) { final MWindow mWindow = (MWindow) element; if (!element.getTags().contains(Tags.MAIN_WINDOW)) {// only for child windows (main window not need that) final Window window = (Window) mWindow.getWidget(); window.addListener(new Window.ResizeListener() { @Override/*from www.j av a2 s. c o m*/ public void windowResized(ResizeEvent e) { mWindow.setWidth((int) window.getWidth()); mWindow.setHeight((int) window.getHeight()); } }); // TODO: there are no window move listener in vaadin, implement // it later } } }