List of usage examples for com.vaadin.ui Window setPosition
public void setPosition(int x, int y)
From source file:com.vaadHL.utl.state.ScreenInfo.java
License:Apache License
/** * Changes size and position of a window. * /*from w ww.j a v a 2s . co m*/ * @param wi * the window */ public void applyToWin(Window wi) { applyTo((Sizeable) wi); wi.setPosition(getPositionX(), getPositionY()); }
From source file:org.opencms.ui.actions.CmsUserInfoDialogAction.java
License:Open Source License
/** * @see org.opencms.ui.actions.I_CmsWorkplaceAction#executeAction(org.opencms.ui.I_CmsDialogContext) *///from w w w. j a va2s . c om public void executeAction(final I_CmsDialogContext context) { CmsUserInfo dialog = new CmsUserInfo(new I_UploadListener() { public void onUploadFinished(List<String> uploadedFiles) { handleUpload(uploadedFiles, context); } }, context); Multimap<String, String> params = A_CmsUI.get().getParameters(); int top = 55; int left = 0; if (params.containsKey("left")) { String buttonLeft = params.get("left").iterator().next(); left = Integer.parseInt(buttonLeft) - 290; } final Window window = new Window(); window.setModal(false); window.setClosable(true); window.setResizable(false); window.setContent(dialog); context.setWindow(window); window.addStyleName(OpenCmsTheme.DROPDOWN); UI.getCurrent().addWindow(window); window.setPosition(left, top); }