List of usage examples for com.vaadin.ui Window getHeightUnits
@Override
public Unit getHeightUnits()
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 2 s .c o m*/ } 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);// ww w . jav a 2 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(); } }