当前位置: 首页>>代码示例>>Java>>正文


Java Window.center方法代码示例

本文整理汇总了Java中com.vaadin.ui.Window.center方法的典型用法代码示例。如果您正苦于以下问题:Java Window.center方法的具体用法?Java Window.center怎么用?Java Window.center使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.Window的用法示例。


在下文中一共展示了Window.center方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showBadgesInBrowser

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public void showBadgesInBrowser(List<Attendee> attendeeList) {
    if (attendeeList.size() > 0) {
        StreamResource.StreamSource source = handler.getBadgeFormatter(this, attendeeList);
        String filename = "testbadge" + System.currentTimeMillis() + ".pdf";
        StreamResource resource = new StreamResource(source, filename);

        resource.setMIMEType("application/pdf");
        resource.getStream().setParameter("Content-Disposition", "attachment; filename="+filename);

        Window window = new Window();
        window.setWidth(800, Sizeable.Unit.PIXELS);
        window.setHeight(600, Sizeable.Unit.PIXELS);
        window.setModal(true);
        window.center();
        BrowserFrame pdf = new BrowserFrame("test", resource);
        pdf.setSizeFull();

        window.setContent(pdf);
        getUI().addWindow(window);
    } else {
        Notification.show("No attendees selected");
    }
}
 
开发者ID:kumoregdev,项目名称:kumoreg,代码行数:24,代码来源:PrintBadgeWindow.java

示例2: buttonClick

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
public void buttonClick(ClickEvent event) {
	Button b = event.getButton();
	if (b == btnJobQueueStatus) {
		Window subWindow = new Window("Job Manager");
		subWindow.setWidth("500px");
		subWindow.center();
		getApplication().getMainWindow().addWindow(subWindow);

		Panel p = new Panel(new JobsStatusViewComponent(getApplication().getURL()));
		p.getContent().setWidth("100%");
		p.setWidth("100%");
		subWindow.addComponent(p);
		subWindow.setModal(true);
	} else if (b == help) {
		String HelpURL = getApplication().getURL().toExternalForm() + "doc";
		getApplication().getMainWindow().open(new ExternalResource(HelpURL), "_blank");
	} else if (b == restart) {
		((ExpressZipWindow) getApplication().getMainWindow()).getApplication().close();
	}
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:22,代码来源:MapToolbarViewComponent.java

示例3: attach

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@Override
public void attach() {

	super.attach();

	loginWindow = new Window();
	
	// create view bound form
	VerticalLayout content = buildMainLayout();
	content.setMargin(false);
	loginWindow.setContent(content);
	loginWindow.center();
	loginWindow.setCaption(getI18N().getMessage("com.thingtrack.konekti.view.web.workbench.SecurityAccessView.loginWindow.caption"));		
	loginWindow.setModal(true);
	loginWindow.setResizable(false);
	loginWindow.setClosable(false);

	User loginUser = new User();
	BeanItem<User> userBean = new BeanItem<User>(loginUser);
	viewBoundForm.setItemDataSource(userBean);
	
	getWindow().addWindow(loginWindow);
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:24,代码来源:SecurityAccessView.java

示例4: openLogWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void openLogWindow() {
	Window w = new Window("Log");
	w.center();
	w.setWidth("80%");
	w.setHeight("80%");
	w.setContent(logView);
	logView.setSizeFull();
	UI.getCurrent().addWindow(w);
	setEnabled(false);
	w.addCloseListener(new CloseListener() {
		@Override
		public void windowClose(CloseEvent e) {
			ShowLogButton.this.setEnabled(true);
		}
	});
}
 
开发者ID:ahn,项目名称:mideaas,代码行数:17,代码来源:ShowLogButton.java

示例5: showPopup

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showPopup(String eintrag) {
	Window modalWin = new Window("E-Mail is being sent...");
	modalWin.setContent(new Label("<div style=\"margin: 10px; \">"
			+ "<h2>Season's greetings</h2>" + "<p>" + eintrag + "</p>"
			+ "</div>", ContentMode.HTML));
	modalWin.setModal(true);
	modalWin.setWidth("400px");
	modalWin.setHeight("250px");
	modalWin.center();
	UI.getCurrent().addWindow(modalWin);
}
 
开发者ID:akquinet,项目名称:vaangular,代码行数:12,代码来源:VaangularUI.java

示例6: openTestWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void openTestWindow() {
    Window testWindow = new Window();
    DemoOverlayTest test = new DemoOverlayTest();
    test.setSuggestionProvider(suggestionProvider);
    testWindow.setContent(test);
    testWindow.setCaption("Window Demo");
    testWindow.center();
    getUI().addWindow(testWindow);
}
 
开发者ID:maxschuster,项目名称:Vaadin-AutocompleteTextField,代码行数:10,代码来源:DemoUI.java

示例7: startProcessor

import com.vaadin.ui.Window; //导入方法依赖的package包/类
protected void startProcessor() {
  final ProgressBar progressBar = new ProgressBar();
  progressBar.setWidth(400, Unit.PIXELS);
  final Window progressWindow = new Window("Progress", progressBar);
  progressWindow.setClosable(false);
  progressWindow.setResizable(false);
  progressWindow.center();
  new Thread(new Runnable() {

    @Override
    public void run() {
      new Processor(new ProgressListener() {

        @Override
        public void onProgress(final long progress) {
          UI.getCurrent().access(new Runnable() {

            @Override
            public void run() {
              // 0 .. 1
              final float progressBarValue = (float) progress / Processor.MAX_PROGRESS;
              progressBar.setValue(progressBarValue);
              if (progress == Processor.MAX_PROGRESS) {
                UI.getCurrent().setPollInterval(-1);
                UI.getCurrent().removeWindow(progressWindow);
              }
            }
          });
        }
      }).run();
    }
  }).start();
  UI.getCurrent().setPollInterval(250);
  UI.getCurrent().addWindow(progressWindow);
}
 
开发者ID:ahoehma,项目名称:vaadin-examples,代码行数:36,代码来源:ProgressbarDialogDemoUI.java

示例8: init

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public void init(String title, String message){
   	Label messageLabel=new Label(message);	    		
   	Window window = new Window(title);
	
	VerticalLayout windowContent = new VerticalLayout();
	windowContent.addComponent(messageLabel);
	windowContent.setMargin(true);
	windowContent.setComponentAlignment(messageLabel, Alignment.MIDDLE_CENTER);
	window.setContent(windowContent);
	window.setSizeUndefined(); //sets window to be the size of the content
	
	window.center();
	UI.getCurrent().addWindow(window);
}
 
开发者ID:alternativeTime,项目名称:GlycanBuilderVaadin7Version,代码行数:15,代码来源:MessageDialogBox.java

示例9: showMessage

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public void showMessage(String message,String width, String height,String caption){
   	Label messageLabel=new Label(message);	    		
   	Window window = new Window(caption);
	
	VerticalLayout windowContent = new VerticalLayout();
	windowContent.addComponent(messageLabel);
	windowContent.setMargin(true);
	windowContent.setComponentAlignment(messageLabel, Alignment.MIDDLE_CENTER);
	window.setContent(windowContent);
	window.setWidth(width);
	window.setHeight(height);
	
	window.center();
	UI.getCurrent().addWindow(window);
}
 
开发者ID:alternativeTime,项目名称:GlycanBuilderVaadin7Version,代码行数:16,代码来源:VaadinGlycanCanvas.java

示例10: GridContainerCSVExport

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public GridContainerCSVExport(final String fileName, final Grid grid, final GridHeadingPropertySet<E> headingsSet)
{

	this.grid = grid;
	this.headingsSet = headingsSet;
	final Window window = new Window();
	window.setCaption("Download " + fileName + " CSV data");
	window.center();
	window.setHeight("100");
	window.setWidth("300");
	window.setResizable(false);
	window.setModal(true);

	final HorizontalLayout layout = new HorizontalLayout();
	layout.setSizeFull();
	layout.setMargin(true);

	window.setContent(layout);

	UI.getCurrent().addWindow(window);
	window.setVisible(true);

	final Button downloadButton = createDownloadButton(fileName, window);

	layout.addComponent(downloadButton);
	layout.setComponentAlignment(downloadButton, Alignment.MIDDLE_CENTER);
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:28,代码来源:GridContainerCSVExport.java

示例11: ContainerCSVExport

import com.vaadin.ui.Window; //导入方法依赖的package包/类
public ContainerCSVExport(final String fileName, final Table table, final HeadingPropertySet headingsSet)
{

	this.table = table;
	this.headingsSet = headingsSet;
	final Window window = new Window();
	window.setCaption("Download " + fileName + " CSV data");
	window.center();
	window.setHeight("100");
	window.setWidth("300");
	window.setModal(true);

	HorizontalLayout layout = new HorizontalLayout();
	layout.setMargin(true);

	window.setContent(layout);

	UI.getCurrent().addWindow(window);
	window.setVisible(true);

	final Button downloadButton = createDownloadButton(fileName, window);

	layout.addComponent(downloadButton);
	layout.setComponentAlignment(downloadButton, Alignment.MIDDLE_CENTER);

	layout.addComponent(downloadButton);

}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:29,代码来源:ContainerCSVExport.java

示例12: showTextWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showTextWindow(String caption, String content) {
	
	Label textComponent = new Label(content);
	textComponent.setContentMode(ContentMode.PREFORMATTED);
	
	Window subWindow = new Window(caption);
	subWindow.setContent(textComponent);
	
	subWindow.setWidth(70, Unit.PERCENTAGE);
	subWindow.setHeight(90, Unit.PERCENTAGE);
	subWindow.center();
	
	this.getUI().addWindow(subWindow);
}
 
开发者ID:chipster,项目名称:chipster,代码行数:15,代码来源:JobLogView.java

示例13: showMailForm

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showMailForm(final TextField emailField)
{
	final Window mailWindow = new Window("Send Email");
	mailWindow.setWidth("80%");
	mailWindow.setHeight("80%");
	final User sender = (User) getSession().getAttribute("user");
	mailWindow.setContent(new EmailForm(mailWindow, sender, getCurrent(), emailField.getValue()));
	mailWindow.setVisible(true);
	mailWindow.center();
	UI.getCurrent().addWindow(mailWindow);

}
 
开发者ID:bsutton,项目名称:scoutmaster,代码行数:13,代码来源:ContactView.java

示例14: showMailForm

import com.vaadin.ui.Window; //导入方法依赖的package包/类
private void showMailForm(EmailContact emailContact)
{
	final Window mailWindow = new Window("Send Email");
	mailWindow.setWidth("80%");
	mailWindow.setHeight("80%");
	final User sender = (User) getSession().getAttribute("user");
	mailWindow.setContent(
			new EmailForm(mailWindow, sender, emailContact.getContact(), emailContact.getContact().getEmail()));
	mailWindow.setVisible(true);
	mailWindow.center();
	UI.getCurrent().addWindow(mailWindow);

}
 
开发者ID:bsutton,项目名称:scoutmaster,代码行数:14,代码来源:SchoolView.java

示例15: openSendWindow

import com.vaadin.ui.Window; //导入方法依赖的package包/类
@SuppressWarnings("serial")
private void openSendWindow() {
	final Window w = new Window("Feedback");
	w.setWidth("60%");
	w.setHeight("60%");
	w.center();
	
	VerticalLayout la = new VerticalLayout();
	la.setSizeFull();
	la.setMargin(true);
	w.setContent(la);
	final TextArea area = new TextArea();
	Button bu = new Button("Send");
	bu.addClickListener(new ClickListener() {

		@Override
		public void buttonClick(ClickEvent event) {
			String s = area.getValue();
			if (s!=null && !s.isEmpty()) {
				send(s, w);
			}
		}
		
	});

	area.setSizeFull();
	la.addComponent(area);
	bu.setWidth("100%");
	la.addComponent(bu);
	la.setExpandRatio(area, 1);
	
	UI.getCurrent().addWindow(w);
	
}
 
开发者ID:ahn,项目名称:mideaas,代码行数:35,代码来源:FeedbackPlugin.java


注:本文中的com.vaadin.ui.Window.center方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。