List of usage examples for com.vaadin.ui VerticalLayout setWidth
@Override public void setWidth(String width)
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.DynQueueMemberManagement.java
/** * ?(??)/*w w w. j a v a2 s. c om*/ * @return */ private VerticalLayout createLeftComponents() { VerticalLayout leftVLayout = new VerticalLayout(); leftVLayout.setSpacing(true); leftVLayout.setWidth("100%"); // ? HorizontalLayout searchHLayout = new HorizontalLayout(); searchHLayout.setSpacing(true); leftVLayout.addComponent(searchHLayout); Label caption = new Label(""); caption.setWidth("-1px"); searchHLayout.addComponent(caption); searchHLayout.setComponentAlignment(caption, Alignment.MIDDLE_CENTER); leftKeyword = new TextField(); leftKeyword.setImmediate(true); leftKeyword.setInputPrompt("?"); leftKeyword.setDescription("??????????"); leftKeyword.setStyleName("search"); leftKeyword.addListener(this); searchHLayout.addComponent(leftKeyword); searchHLayout.setComponentAlignment(leftKeyword, Alignment.MIDDLE_CENTER); leftSearch = new Button("?", this); leftSearch.setImmediate(true); searchHLayout.addComponent(leftSearch); searchHLayout.setComponentAlignment(leftSearch, Alignment.MIDDLE_CENTER); // // leftTable = new Table("??"); leftTable.setStyleName("striped"); leftTable.setSelectable(true); leftTable.setMultiSelect(true); leftTable.setWidth("100%"); leftTable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX); leftVLayout.addComponent(leftTable); leftTableContainer = new BeanItemContainer<User>(User.class); leftTableContainer.addNestedContainerProperty("department.name"); leftTable.setContainerDataSource(leftTableContainer); leftTable.setPageLength(20); leftTable.setVisibleColumns(VISIBLE_PROPERTIES); leftTable.setColumnHeaders(COL_HEADERS); return leftVLayout; }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.DynQueueMemberManagement.java
/** * ??(????)//from w w w. java2s . c om * return */ private VerticalLayout createRightComponents() { VerticalLayout rightVLayout = new VerticalLayout(); rightVLayout.setSpacing(true); rightVLayout.setWidth("100%"); // ? HorizontalLayout searchHLayout = new HorizontalLayout(); searchHLayout.setSpacing(true); rightVLayout.addComponent(searchHLayout); Label caption = new Label(""); caption.setWidth("-1px"); searchHLayout.addComponent(caption); searchHLayout.setComponentAlignment(caption, Alignment.MIDDLE_CENTER); rightKeyword = new TextField(); rightKeyword.setImmediate(true); rightKeyword.setInputPrompt("?"); rightKeyword.setDescription("??????????"); rightKeyword.setStyleName("search"); rightKeyword.addListener(this); searchHLayout.addComponent(rightKeyword); searchHLayout.setComponentAlignment(rightKeyword, Alignment.MIDDLE_CENTER); rightSearch = new Button("?", this); rightSearch.setImmediate(true); searchHLayout.addComponent(rightSearch); searchHLayout.setComponentAlignment(rightSearch, Alignment.MIDDLE_CENTER); // // rightTable = new Table("?"); rightTable.setStyleName("striped"); rightTable.setSelectable(true); rightTable.setMultiSelect(true); rightTable.setWidth("100%"); rightTable.setPageLength(16); rightTable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX); rightVLayout.addComponent(rightTable); rightTableContainer = new BeanItemContainer<User>(User.class); rightTableContainer.addNestedContainerProperty("department.name"); rightTable.setContainerDataSource(rightTableContainer); rightTable.setVisibleColumns(VISIBLE_PROPERTIES); rightTable.setColumnHeaders(COL_HEADERS); rightTable.addGeneratedColumn("priority", new PriorityColumnGenerate()); rightTable.setColumnHeader("priority", ""); return rightVLayout; }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java
public MgrPhone2PhoneSettingView() { this.setMargin(true); this.setWidth("100%"); this.setSpacing(true); domain = SpringContextHolder.getDomain(); loginUser = SpringContextHolder.getLoginUser(); userService = SpringContextHolder.getBean("userService"); queueService = SpringContextHolder.getBean("queueService"); userQueueService = SpringContextHolder.getBean("userQueueService"); queueMemberRelationService = SpringContextHolder.getBean("queueMemberRelationService"); phone2PhoneSettingService = SpringContextHolder.getBean("phone2PhoneSettingService"); staticQueueMemberService = SpringContextHolder.getBean("staticQueueMemberService"); notification = new Notification(""); notification.setDelayMsec(1000);/*from www . j ava 2 s. c om*/ notification.setHtmlContentAllowed(true); VerticalLayout panelContent = new VerticalLayout(); panelContent.setSpacing(true); panelContent.setMargin(true); panelContent.setWidth("100%"); panel = new Panel("?"); panel.setContent(panelContent); panel.setStyleName("light"); this.addComponent(panel); // ? createStartSetting(panelContent); // ?CSR ? createLicensed2Csr(panelContent); // createDaysOfWeekType(panelContent); // createDayOfWeek(panelContent); // createRunRedirectTime(panelContent); // createRedirectType(panelContent); // ?? createNoanwserTimeout(panelContent); // ?? createSpecifiedPhone(panelContent); // ?? createPhoneArea(panelContent); // ???? createCsrSelectTables(panelContent); // ? makeTableDragAble(new SourceIs(rightTable), leftTable, true); makeTableDragAble(new SourceIs(leftTable), rightTable, false); // ? HorizontalLayout operators = createOperatorButtons(); this.addComponent(operators); }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java
/** * ?(??)/* www .j ava 2 s .c o m*/ * @return */ private VerticalLayout createLeftComponents() { VerticalLayout leftVLayout = new VerticalLayout(); leftVLayout.setSpacing(true); leftVLayout.setWidth("100%"); // ? HorizontalLayout searchHLayout = new HorizontalLayout(); searchHLayout.setSpacing(true); leftVLayout.addComponent(searchHLayout); Label caption = new Label(""); caption.setWidth("-1px"); searchHLayout.addComponent(caption); searchHLayout.setComponentAlignment(caption, Alignment.MIDDLE_CENTER); leftKeyword = new TextField(); leftKeyword.setImmediate(true); leftKeyword.setInputPrompt("?"); leftKeyword.setDescription("?????????????"); leftKeyword.setStyleName("search"); leftKeyword.addListener(this); leftKeyword.setEnabled(false); searchHLayout.addComponent(leftKeyword); searchHLayout.setComponentAlignment(leftKeyword, Alignment.MIDDLE_CENTER); leftSearch = new Button("?", this); leftSearch.setImmediate(true); leftSearch.setEnabled(false); searchHLayout.addComponent(leftSearch); searchHLayout.setComponentAlignment(leftSearch, Alignment.MIDDLE_CENTER); // leftTable = new Table("?"); leftTable.addStyleName("striped"); leftTable.addStyleName("mydisabled"); leftTable.setSelectable(true); leftTable.setMultiSelect(true); leftTable.setWidth("100%"); leftTable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX); leftVLayout.addComponent(leftTable); leftTableContainer = new BeanItemContainer<User>(User.class); leftTableContainer.addNestedContainerProperty("department.name"); leftTable.setContainerDataSource(leftTableContainer); leftTable.setPageLength(10); leftTable.setVisibleColumns(VISIBLE_PROPERTIES); leftTable.setColumnHeaders(COL_HEADERS); return leftVLayout; }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java
/** * ??(????)/* w ww . j av a2 s.co m*/ * return */ private VerticalLayout createRightComponents() { VerticalLayout rightVLayout = new VerticalLayout(); rightVLayout.setSpacing(true); rightVLayout.setWidth("100%"); // ? HorizontalLayout searchHLayout = new HorizontalLayout(); searchHLayout.setSpacing(true); rightVLayout.addComponent(searchHLayout); Label caption = new Label(""); caption.setWidth("-1px"); searchHLayout.addComponent(caption); searchHLayout.setComponentAlignment(caption, Alignment.MIDDLE_CENTER); rightKeyword = new TextField(); rightKeyword.setImmediate(true); rightKeyword.setInputPrompt("?"); rightKeyword.setDescription("?????????????"); rightKeyword.setStyleName("search"); rightKeyword.addListener(this); rightKeyword.setEnabled(false); searchHLayout.addComponent(rightKeyword); searchHLayout.setComponentAlignment(rightKeyword, Alignment.MIDDLE_CENTER); rightSearch = new Button("?", this); rightSearch.setImmediate(true); rightSearch.setEnabled(false); searchHLayout.addComponent(rightSearch); searchHLayout.setComponentAlignment(rightSearch, Alignment.MIDDLE_CENTER); // rightTable = new Table(""); rightTable.addStyleName("striped"); rightTable.addStyleName("mydisabled"); rightTable.setSelectable(true); rightTable.setMultiSelect(true); rightTable.setWidth("100%"); rightTable.setPageLength(10); rightTable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX); rightVLayout.addComponent(rightTable); rightTableContainer = new BeanItemContainer<User>(User.class); rightTableContainer.addNestedContainerProperty("department.name"); rightTable.setContainerDataSource(rightTableContainer); rightTable.setVisibleColumns(VISIBLE_PROPERTIES); rightTable.setColumnHeaders(COL_HEADERS); return rightVLayout; }
From source file:com.klwork.explorer.ui.task.ProcessInstanceEventsPanel.java
License:Apache License
protected void addTaskEventText(final Comment taskEvent, final GridLayout eventGrid) { VerticalLayout layout = new VerticalLayout(); layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT); layout.setWidth("100%"); eventGrid.addComponent(layout);//w w w. j a v a2 s . c o m // Actual text Label text = taskEventTextResolver.resolveText(taskEvent); text.setWidth("100%"); layout.addComponent(text); // Time String human = new HumanTime(i18nManager).format(taskEvent.getTime()); Label time = new Label(human + "(" + ")"); time.setSizeUndefined(); time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME); layout.addComponent(time); }
From source file:com.klwork.explorer.ui.task.TaskEventsPanel.java
License:Apache License
protected void addTaskEventText(final org.activiti.engine.task.Event taskEvent, final GridLayout eventGrid) { VerticalLayout layout = new VerticalLayout(); layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT); layout.setWidth("100%"); eventGrid.addComponent(layout);/* ww w .ja v a2 s. c om*/ // Actual text Label text = taskEventTextResolver.resolveText(taskEvent); text.setWidth("100%"); layout.addComponent(text); // Time Label time = new Label(new HumanTime(i18nManager).format(taskEvent.getTime())); time.setSizeUndefined(); time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME); layout.addComponent(time); }
From source file:com.klwork.explorer.ui.user.UserEventsPanel.java
License:Apache License
protected void addTaskEventText(final org.activiti.engine.task.Event taskEvent, final GridLayout eventGrid) { VerticalLayout layout = new VerticalLayout(); layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT); layout.setWidth("100%"); eventGrid.addComponent(layout);//from ww w. j av a 2s . c om // Actual text Label text = taskEventTextResolver.resolveText(taskEvent); text.setWidth("100%"); layout.addComponent(text); // Time String humFormat = new HumanTime(i18nManager).format(taskEvent.getTime()); Label time = new Label(humFormat + " (" + StringDateUtil.dateToString(taskEvent.getTime(), 4) + ")"); time.setSizeUndefined(); time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME); layout.addComponent(time); }
From source file:com.lizardtech.expresszip.vaadin.ExportOptionsViewComponent.java
License:Apache License
public ExportOptionsViewComponent(ExportProps exportProps) { this.exportProps = exportProps; listeners = new ArrayList<ExportOptionsViewListener>(); txtJobName = new TextField(JOB_NAME); txtEmail = new TextField(EMAIL_ADDRESS); txtUserNotation = new TextField(JOB_USER_NOTATION); numTilesLabel = new Label(); exportSizeEstimate = new Label(); outputFormatComboBox = new ComboBox(OUTPUT_FORMAT, OUTPUT_FORMATS); outputFormatComboBox.setTextInputAllowed(false); outputFormatComboBox.addListener(griddingValuesChangeListener); setSizeFull();/*ww w. ja v a 2s . c om*/ /** * Setup output resolution */ exportSizeComboBox = new ComboBox(null, exportSizes); exportSizeComboBox.setNullSelectionAllowed(false); exportSizeComboBox.setNewItemsAllowed(false); exportSizeComboBox.setTextInputAllowed(false); exportSizeComboBox.setImmediate(true); exportSizeComboBox.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { Object choice = event.getProperty().getValue(); String value = ""; if (SMALL.equals(choice)) { gridCheckbox.setValue(Boolean.FALSE); gridCheckbox.setEnabled(false); value = "512"; } else if (MEDIUM.equals(choice)) { gridCheckbox.setValue(Boolean.FALSE); gridCheckbox.setEnabled(false); value = "1280"; } else if (LARGE.equals(choice)) { gridCheckbox.setValue(Boolean.FALSE); gridCheckbox.setEnabled(false); value = "5000"; } boolean custom = CUSTOM.equals(choice); if (!custom) { if (NATIVE.equals(choice)) { txtGroundResolution.setValue(Double.toString(maximumResolution)); } else { if (getExportProps().getAspectRatio() > 1.0d) { txtDimHeight.setValue(value); } else txtDimWidth.setValue(value); } } txtDimWidth.setEnabled(custom); txtDimHeight.setEnabled(custom); txtGroundResolution.setEnabled(custom); } }); // Add Output Resolution to view HorizontalLayout dimensionsLayout = new HorizontalLayout(); dimensionsLayout.addComponent(txtDimWidth); dimensionsLayout.addComponent(txtDimHeight); dimensionsLayout.setSpacing(true); dimensionsLayout.setWidth("100%"); // Format dimensions layout txtDimHeight.setMaxLength(10); txtDimHeight.setWidth("100%"); txtDimHeight.setImmediate(true); txtDimHeight.addListener(heightValChangeListener); txtDimHeight.setRequired(true); txtDimHeight.addValidator(new WidthHeightValidator()); txtDimWidth.setMaxLength(10); txtDimWidth.setWidth("100%"); txtDimWidth.setImmediate(true); txtDimWidth.addListener(widthValChangeListener); txtDimWidth.setRequired(true); txtDimWidth.addValidator(new WidthHeightValidator()); // Format Ground Resolution layout txtGroundResolution.setValue("0"); txtGroundResolution.setImmediate(true); txtGroundResolution.addListener(groundResValChangeListener); txtGroundResolution.setRequired(true); txtGroundResolution.addValidator(new GroundResolutionValidator()); vrtOutputResolution = new VerticalLayout(); vrtOutputResolution.setSpacing(true); vrtOutputResolution.addComponent(exportSizeComboBox); vrtOutputResolution.addComponent(dimensionsLayout); txtGroundResolution.setWidth("75%"); vrtOutputResolution.addComponent(txtGroundResolution); vrtOutputResolution.setComponentAlignment(txtGroundResolution, Alignment.BOTTOM_CENTER); /** * Setup Gridding options */ // Add Gridding option to view griddingLayout = new VerticalLayout(); griddingLayout.setSpacing(true); // Format GridCheckbox layout griddingLayout.addComponent(gridCheckbox); gridCheckbox.setImmediate(true); gridCheckbox.setValue(false); gridCheckbox.addListener(griddingModeChangeListener); xPixelsTextBox.setWidth("100%"); xPixelsTextBox.setImmediate(true); xPixelsTextBox.addValidator(new TileWidthValidator()); xPixelsTextBox.addListener(griddingValuesChangeListener); yPixelsTextBox.setWidth("100%"); yPixelsTextBox.setImmediate(true); yPixelsTextBox.addValidator(new TileHeightValidator()); yPixelsTextBox.addListener(griddingValuesChangeListener); xDistanceTextBox.setWidth("100%"); xDistanceTextBox.setImmediate(true); xDistanceTextBox.addValidator(new TileGeoXValidator()); xDistanceTextBox.addListener(griddingValuesChangeListener); yDistanceTextBox.setWidth("100%"); yDistanceTextBox.setImmediate(true); yDistanceTextBox.addValidator(new TileGeoYValidator()); yDistanceTextBox.addListener(griddingValuesChangeListener); // Format gridding options xTilesTextBox.setWidth("100%"); xTilesTextBox.setImmediate(true); xTilesTextBox.addValidator(new TileXDivisorValidator()); xTilesTextBox.addListener(griddingValuesChangeListener); yTilesTextBox.setWidth("100%"); yTilesTextBox.setImmediate(true); yTilesTextBox.addValidator(new TileYDivisorValidator()); yTilesTextBox.addListener(griddingValuesChangeListener); optGridOpt.setValue(GRID_TILE_DIMENSIONS); optGridOpt.setImmediate(true); optGridOpt.addListener(griddingModeChangeListener); HorizontalLayout hznGridOptions = new HorizontalLayout(); griddingLayout.addComponent(hznGridOptions); hznGridOptions.setWidth("100%"); hznGridOptions.setSpacing(true); hznGridOptions.addComponent(optGridOpt); VerticalLayout vrtGridComboFields = new VerticalLayout(); hznGridOptions.addComponent(vrtGridComboFields); vrtGridComboFields.setWidth("100%"); hznGridOptions.setExpandRatio(vrtGridComboFields, 1.0f); HorizontalLayout hznTileDim = new HorizontalLayout(); hznTileDim.setWidth("100%"); vrtGridComboFields.addComponent(hznTileDim); hznTileDim.addComponent(xPixelsTextBox); hznTileDim.addComponent(yPixelsTextBox); HorizontalLayout hznDistanceDim = new HorizontalLayout(); hznDistanceDim.setWidth("100%"); vrtGridComboFields.addComponent(hznDistanceDim); hznDistanceDim.addComponent(xDistanceTextBox); hznDistanceDim.addComponent(yDistanceTextBox); HorizontalLayout hznDivideGrid = new HorizontalLayout(); hznDivideGrid.setWidth("100%"); vrtGridComboFields.addComponent(hznDivideGrid); hznDivideGrid.addComponent(xTilesTextBox); hznDivideGrid.addComponent(yTilesTextBox); hznDivideGrid.setSpacing(true); hznTileDim.setSpacing(true); hznDistanceDim.setSpacing(true); /** * Format options panel */ // Add Format options to view formatOptionsLayout = new VerticalLayout(); formatOptionsLayout.setWidth("100%"); formatOptionsLayout.setSpacing(true); formatOptionsLayout.setMargin(true); // Format outputformat formatOptionsLayout.addComponent(outputFormatComboBox); outputFormatComboBox.setNullSelectionAllowed(false); formatOptionsLayout.addComponent(packageComboBox); packageComboBox.addItem(ExportProps.OutputPackageFormat.TAR); packageComboBox.addItem(ExportProps.OutputPackageFormat.ZIP); packageComboBox.setNullSelectionAllowed(false); packageComboBox.setTextInputAllowed(false); packageComboBox.setValue(ExportProps.OutputPackageFormat.ZIP); /** * Job Details */ // Set Jobname panel jobDetailsLayout = new VerticalLayout(); jobDetailsLayout.setSpacing(true); jobDetailsLayout.setMargin(true); jobDetailsLayout.addComponent(txtJobName); txtJobName.setRequired(true); txtJobName.setRequiredError("Please enter a job name."); txtJobName.setWidth("100%"); txtJobName.setImmediate(true); String jobname_regexp = "^[ A-Za-z0-9._-]{1,128}$"; txtJobName.addValidator(new RegexpValidator(jobname_regexp, "Job names should be alpha-numeric, less than 128 characters and may include spaces, dashes and underscores")); txtJobName.addValidator(new JobNameUniqueValidator( "A job by that name already exists in your configured export directory")); txtJobName.addListener(resolutionValuesChangeListener); jobDetailsLayout.addComponent(txtUserNotation); txtUserNotation.setWidth("100%"); txtUserNotation.setImmediate(true); String usernotation_regexp = "^[ A-Za-z0-9_-]{0,32}$"; txtUserNotation.addValidator(new RegexpValidator(usernotation_regexp, "User names should be alpha-numeric, less than 32 characters and may include spaces, dashes and underscores")); txtUserNotation.addListener(resolutionValuesChangeListener); // Format Email boolean enableEmail = new BackgroundExecutor.Factory().getBackgroundExecutor().getMailServices() .isValidEmailConfig(); txtEmail.setEnabled(enableEmail); if (enableEmail) { jobDetailsLayout.addComponent(txtEmail); txtEmail.setWidth("100%"); txtEmail.setInputPrompt("enter your email address"); txtEmail.setImmediate(true); txtEmail.addValidator(new EmailValidator("Invalid format for email address.")); txtEmail.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { updateSubmitEnabledState(); } }); } VerticalLayout exportSummary = new VerticalLayout(); exportSummary.addComponent(numTilesLabel); exportSummary.addComponent(exportSizeEstimate); jobDetailsLayout.addComponent(new Panel(("Export summary"), exportSummary)); // Set submit and back buttons // Add listeners to all fields backButton = new ExpressZipButton("Back", Style.STEP); backButton.addListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { ((ExpressZipWindow) getApplication().getMainWindow()).regressToPrev(); } }); submitButton = new ExpressZipButton("Submit", Style.STEP); submitButton.addListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { try { txtJobName.validate(); } catch (InvalidValueException e) { txtJobName.requestRepaint(); updateSubmitEnabledState(); return; } for (ExportOptionsViewListener listener : listeners) { listener.submitJobEvent(getExportProps()); } } }); accordian = new Accordion(); accordian.addStyleName("expresszip"); accordian.setImmediate(true); accordian.addTab(jobDetailsLayout, JOB_DETAILS); accordian.addTab(formatOptionsLayout, FORMAT_OPTIONS); accordian.setSizeFull(); outputDetails = new VerticalLayout(); outputDetails.setMargin(true); outputDetails.setSpacing(true); outputDetails.addComponent(new Panel(DIMENSIONS, vrtOutputResolution)); outputDetails.addComponent(new Panel(TILING, griddingLayout)); accordian.addTab(outputDetails, EXPORT_CONFIGURATION); HorizontalLayout backSubmitLayout = new HorizontalLayout(); backSubmitLayout.setWidth("100%"); backSubmitLayout.addComponent(backButton); backSubmitLayout.addComponent(submitButton); backSubmitLayout.setComponentAlignment(backButton, Alignment.BOTTOM_LEFT); backSubmitLayout.setComponentAlignment(submitButton, Alignment.BOTTOM_RIGHT); VerticalLayout navLayout = new VerticalLayout(); navLayout.addComponent(backSubmitLayout); navLayout.setSpacing(true); ThemeResource banner = new ThemeResource("img/ProgressBar3.png"); navLayout.addComponent(new Embedded(null, banner)); // add scrollbars around formLayout VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSizeFull(); layout.setSpacing(true); Label step = new Label("Step 3: Configure Export Options"); step.addStyleName("step"); layout.addComponent(step); layout.addComponent(accordian); layout.setExpandRatio(accordian, 1.0f); layout.addComponent(navLayout); layout.setComponentAlignment(navLayout, Alignment.BOTTOM_CENTER); setCompositionRoot(layout); outputFormatComboBox.select(OUTPUT_FORMATS.get(0)); forceGriddingCheck(); updateGriddingEnabledState(); }
From source file:com.lizardtech.expresszip.vaadin.JobsStatusViewComponent.java
License:Apache License
public JobsStatusViewComponent(URL appUrl) { VerticalLayout mainLayout = new VerticalLayout(); mainLayout.setSpacing(true);//w ww. j a v a 2 s .c o m mainLayout.setMargin(true); mainLayout.setWidth("100%"); // Refresher will update UI as progress is made final Refresher refresher = new Refresher(); refresher.setRefreshInterval(UPDATE_STATUS_INTERVAL); refresher.addListener(this); mainLayout.addComponent(refresher); mainLayout.addComponent(buildTableControls()); form = new Form(); form.setCaption("Selected Job"); form.setWidth("420px"); form.setFormFieldFactory(new ExpressZipFieldFactory()); form.setVisible(true); form.setImmediate(true); table = new Table(null); table.addStyleName("expresszip"); table.setWidth("100%"); table.setSelectable(true); table.setImmediate(true); table.setNullSelectionAllowed(false); table.setPageLength(0); table.setHeight("250px"); container = new BeanItemContainer<Job>(Job.class, Job.getJobQueue()); container.addNestedContainerProperty("exportProps.jobName"); container.addNestedContainerProperty("exportProps.userNotation"); table.setContainerDataSource(container); table.setVisibleColumns(new String[] { "exportProps.jobName", "exportProps.userNotation", "status" }); table.setColumnHeaders(new String[] { "Job Name", "User Name", "Status" }); table.sort(new Object[] { "exportProps.jobName", "exportProps.userNotation" }, new boolean[] { true, true }); table.setColumnExpandRatio("status", 0.8f); // use green bar to highlight selected row ExpressZipTreeTable.enableFirstColumnHighlighter(table); updateTableData(); mainLayout.addComponent(table); mainLayout.setExpandRatio(table, 1.0f); mainLayout.addComponent(form); Link browseExports = new Link("Browse Archived Jobs", new ExternalResource(appUrl.getProtocol() + "://" + appUrl.getAuthority() + "/exportdir/")); // Open the URL in a new window/tab browseExports.setTargetName("_blank"); mainLayout.addComponent(browseExports); // setContent(mainLayout); setCompositionRoot(mainLayout); }