List of usage examples for com.vaadin.ui AbsoluteLayout AbsoluteLayout
public AbsoluteLayout()
From source file:co.edu.icesi.academ.client.perfiles.propietario.PanelRubricas.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);//from w ww. j a v a 2 s . co m mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // lstResultados lstResultados = new ListSelect(); lstResultados.setImmediate(false); lstResultados.setWidth("420px"); lstResultados.setHeight("146px"); mainLayout.addComponent(lstResultados, "top:100.0px;left:40.0px;"); // lblResultados lblResultados = new Label(); lblResultados.setImmediate(false); lblResultados.setWidth("-1px"); lblResultados.setHeight("-1px"); lblResultados.setValue("Resultados de aprendizaje:"); mainLayout.addComponent(lblResultados, "top:22.0px;left:40.0px;"); // btnCrear btnCrear = new Button(); btnCrear.setCaption("Crear Rbria"); btnCrear.setImmediate(false); btnCrear.setWidth("-1px"); btnCrear.setHeight("-1px"); mainLayout.addComponent(btnCrear, "top:60.0px;left:40.0px;"); // btnEditar btnEditar = new Button(); btnEditar.setCaption("Editar Rbrica"); btnEditar.setImmediate(false); btnEditar.setWidth("-1px"); btnEditar.setHeight("-1px"); mainLayout.addComponent(btnEditar, "top:60.0px;left:160.0px;"); return mainLayout; }
From source file:co.shift.pcs.basic.web.client.ContentPanel.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);/*from www . j a va 2s . c om*/ mainLayout.setWidth("1024px"); mainLayout.setHeight("500px"); // top-level component properties setWidth("1024px"); setHeight("500px"); return mainLayout; }
From source file:co.shift.pcs.basic.web.client.MenuPanel.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);//from w w w .j a v a2 s. co m mainLayout.setWidth("1024px"); mainLayout.setHeight("23px"); // top-level component properties setWidth("1024px"); setHeight("23px"); // menuBar menuBar = new MenuBar(); menuBar.setImmediate(false); menuBar.setWidth("1024px"); menuBar.setHeight("23px"); mainLayout.addComponent(menuBar, "top:0.0px;left:0.0px;"); return mainLayout; }
From source file:com.esofthead.mycollab.vaadin.ui.AttachmentDisplayComponent.java
License:Open Source License
public static Component constructAttachmentRow(final Content attachment) { String docName = attachment.getPath(); int lastIndex = docName.lastIndexOf("/"); if (lastIndex != -1) { docName = docName.substring(lastIndex + 1, docName.length()); }//from w w w .ja v a 2 s . c o m final AbsoluteLayout attachmentLayout = new AbsoluteLayout(); attachmentLayout.setWidth(UIConstants.DEFAULT_ATTACHMENT_THUMBNAIL_WIDTH); attachmentLayout.setHeight(UIConstants.DEFAULT_ATTACHMENT_THUMBNAIL_HEIGHT); attachmentLayout.setStyleName("attachment-block"); CssLayout thumbnailWrap = new CssLayout(); thumbnailWrap.setSizeFull(); thumbnailWrap.setStyleName("thumbnail-wrap"); Image thumbnail = new Image(null); if (org.apache.commons.lang3.StringUtils.isBlank(attachment.getThumbnail())) { thumbnail.setSource(DEFAULT_SOURCE); } else { thumbnail.setSource(VaadinResourceManager.getResourceManager() .getImagePreviewResource(attachment.getThumbnail(), DEFAULT_SOURCE)); } thumbnail.setDescription(docName); thumbnail.setWidth(UIConstants.DEFAULT_ATTACHMENT_THUMBNAIL_WIDTH); thumbnailWrap.addComponent(thumbnail); attachmentLayout.addComponent(thumbnailWrap, "top: 0px; left: 0px; bottom: 0px; right: 0px; z-index: 0;"); if (MimeTypesUtil.isImageType(docName)) { thumbnail.addClickListener(new MouseEvents.ClickListener() { private static final long serialVersionUID = -2853211588120500523L; @Override public void click(MouseEvents.ClickEvent event) { Resource previewResource = VaadinResourceManager.getResourceManager() .getImagePreviewResource(attachment.getPath(), DEFAULT_SOURCE); UI.getCurrent().addWindow(new AttachmentPreviewWindow(previewResource)); } }); } CssLayout attachmentNameWrap = new CssLayout(); attachmentNameWrap.setWidth(UIConstants.DEFAULT_ATTACHMENT_THUMBNAIL_WIDTH); attachmentNameWrap.setStyleName("attachment-name-wrap"); Label attachmentName = new Label(StringUtils.trim(docName, 60, true)); attachmentName.setStyleName("attachment-name"); attachmentNameWrap.addComponent(attachmentName); attachmentLayout.addComponent(attachmentNameWrap, "bottom: 0px; left: 0px; right: 0px; z-index: 1;"); Button trashBtn = new Button(null, new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { ConfirmDialogExt.show(UI.getCurrent(), AppContext.getMessage(GenericI18Enum.DIALOG_DELETE_TITLE, SiteConfiguration.getSiteName()), AppContext.getMessage(GenericI18Enum.CONFIRM_DELETE_ATTACHMENT), AppContext.getMessage(GenericI18Enum.BUTTON_YES), AppContext.getMessage(GenericI18Enum.BUTTON_NO), new ConfirmDialog.Listener() { private static final long serialVersionUID = 1L; @Override public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { ResourceService attachmentService = ApplicationContextUtil .getSpringBean(ResourceService.class); attachmentService.removeResource(attachment.getPath(), AppContext.getUsername(), AppContext.getAccountId()); ((ComponentContainer) attachmentLayout.getParent()) .removeComponent(attachmentLayout); } } }); } }); trashBtn.setIcon(FontAwesome.TRASH_O); trashBtn.setStyleName("attachment-control"); attachmentLayout.addComponent(trashBtn, "top: 9px; left: 9px; z-index: 1;"); Button downloadBtn = new Button(); FileDownloader fileDownloader = new FileDownloader( VaadinResourceManager.getResourceManager().getStreamResource(attachment.getPath())); fileDownloader.extend(downloadBtn); downloadBtn.setIcon(FontAwesome.DOWNLOAD); downloadBtn.setStyleName("attachment-control"); attachmentLayout.addComponent(downloadBtn, "right: 9px; top: 9px; z-index: 1;"); return attachmentLayout; }
From source file:com.esofthead.mycollab.vaadin.web.ui.AttachmentDisplayComponent.java
License:Open Source License
public void addAttachmentRow(final Content attachment) { String docName = attachment.getPath(); int lastIndex = docName.lastIndexOf("/"); if (lastIndex != -1) { docName = docName.substring(lastIndex + 1, docName.length()); }// w ww . j a v a 2 s. c o m final AbsoluteLayout attachmentLayout = new AbsoluteLayout(); attachmentLayout.setWidth(UIConstants.DEFAULT_ATTACHMENT_THUMBNAIL_WIDTH); attachmentLayout.setHeight(UIConstants.DEFAULT_ATTACHMENT_THUMBNAIL_HEIGHT); attachmentLayout.setStyleName("attachment-block"); CssLayout thumbnailWrap = new CssLayout(); thumbnailWrap.setSizeFull(); thumbnailWrap.setStyleName("thumbnail-wrap"); Link thumbnail = new Link(); if (StringUtils.isBlank(attachment.getThumbnail())) { thumbnail.setIcon(FileAssetsUtil.getFileIconResource(attachment.getName())); } else { thumbnail.setIcon(VaadinResourceFactory.getInstance().getResource(attachment.getThumbnail())); } if (MimeTypesUtil.isImageType(docName)) { thumbnail.setResource(VaadinResourceFactory.getInstance().getResource(attachment.getPath())); new Fancybox(thumbnail).setPadding(0).setVersion("2.1.5").setEnabled(true).setDebug(true); } Div contentTooltip = new Div().appendChild(new Span().appendText(docName).setStyle("font-weight:bold")); Ul ul = new Ul() .appendChild(new Li().appendText("Size: " + FileUtils.getVolumeDisplay(attachment.getSize()))) .setStyle("line-height:1.5em"); ul.appendChild(new Li().appendText( "Last modified: " + AppContext.formatPrettyTime(attachment.getLastModified().getTime()))); contentTooltip.appendChild(ul); thumbnail.setDescription(contentTooltip.write()); thumbnail.setWidth(UIConstants.DEFAULT_ATTACHMENT_THUMBNAIL_WIDTH); thumbnailWrap.addComponent(thumbnail); attachmentLayout.addComponent(thumbnailWrap, "top: 0px; left: 0px; bottom: 0px; right: 0px; z-index: 0;"); CssLayout attachmentNameWrap = new CssLayout(); attachmentNameWrap.setWidth(UIConstants.DEFAULT_ATTACHMENT_THUMBNAIL_WIDTH); attachmentNameWrap.setStyleName("attachment-name-wrap"); Label attachmentName = new Label(StringUtils.trim(docName, 60, true)); attachmentName.setStyleName("attachment-name"); attachmentNameWrap.addComponent(attachmentName); attachmentLayout.addComponent(attachmentNameWrap, "bottom: 0px; left: 0px; right: 0px; z-index: 1;"); Button trashBtn = new Button(null, new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { ConfirmDialogExt.show(UI.getCurrent(), AppContext.getMessage(GenericI18Enum.DIALOG_DELETE_TITLE, AppContext.getSiteName()), AppContext.getMessage(GenericI18Enum.CONFIRM_DELETE_ATTACHMENT), AppContext.getMessage(GenericI18Enum.BUTTON_YES), AppContext.getMessage(GenericI18Enum.BUTTON_NO), new ConfirmDialog.Listener() { private static final long serialVersionUID = 1L; @Override public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { ResourceService attachmentService = AppContextUtil .getSpringBean(ResourceService.class); attachmentService.removeResource(attachment.getPath(), AppContext.getUsername(), AppContext.getAccountId()); ((ComponentContainer) attachmentLayout.getParent()) .removeComponent(attachmentLayout); } } }); } }); trashBtn.setIcon(FontAwesome.TRASH_O); trashBtn.setStyleName("attachment-control"); attachmentLayout.addComponent(trashBtn, "top: 9px; left: 9px; z-index: 1;"); Button downloadBtn = new Button(); FileDownloader fileDownloader = new FileDownloader( VaadinResourceFactory.getInstance().getStreamResource(attachment.getPath())); fileDownloader.extend(downloadBtn); downloadBtn.setIcon(FontAwesome.DOWNLOAD); downloadBtn.setStyleName("attachment-control"); attachmentLayout.addComponent(downloadBtn, "right: 9px; top: 9px; z-index: 1;"); this.addComponent(attachmentLayout); }
From source file:com.fatminds.vaadin_cmis_integration.demo.CMS_DataLists.java
License:Apache License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);//w ww.j av a2 s .c o m mainLayout.setWidth("400px"); mainLayout.setHeight("250px"); mainLayout.setMargin(false); // top-level component properties setWidth("400px"); setHeight("250px"); // txtDataItemToAddEdit txtDataItemToAddEdit = new TextField(); txtDataItemToAddEdit.setImmediate(false); txtDataItemToAddEdit.setWidth("324px"); txtDataItemToAddEdit.setHeight("24px"); txtDataItemToAddEdit.setInputPrompt("Enter New Data Item"); txtDataItemToAddEdit.setSecret(false); mainLayout.addComponent(txtDataItemToAddEdit, "top:170.0px;left:40.0px;"); // btnAddDataItem btnAddDataItem = new Button(); btnAddDataItem.setCaption("Add/Update Data Item"); btnAddDataItem.setImmediate(true); btnAddDataItem.setWidth("-1px"); btnAddDataItem.setHeight("-1px"); mainLayout.addComponent(btnAddDataItem, "top:200.0px;left:40.0px;"); // btnDeleteDataItem btnDeleteDataItem = new Button(); btnDeleteDataItem.setCaption("Delete Selected Data Item"); btnDeleteDataItem.setImmediate(true); btnDeleteDataItem.setWidth("-1px"); btnDeleteDataItem.setHeight("-1px"); mainLayout.addComponent(btnDeleteDataItem, "top:200.0px;left:200.0px;"); // tblDataItems tblDataItems = new Table(); tblDataItems.setImmediate(false); tblDataItems.setWidth("324px"); tblDataItems.setHeight("163px"); mainLayout.addComponent(tblDataItems, "left:40.0px;"); return mainLayout; }
From source file:com.foc.vaadin.gui.FocCustomComponent.java
License:Apache License
protected AbsoluteLayout buildMainLayout() { mainLayout = new AbsoluteLayout(); mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);/*from w w w .j a v a 2 s. c o m*/ // mainLayout.setMargin(false); setDimensions(width, height); return mainLayout; }
From source file:com.foc.vaadin.gui.RightPanel.java
License:Apache License
public void init() { tabSheet = new TabSheet(); tabSheet.setHeight("800px"); tabSheet.setWidth("100%"); addComponent(tabSheet);//w w w. ja va 2 s . c o m // tabSheet.addListener(new TabSheet.SelectedTabChangeListener() { // // @Override // public void selectedTabChange(SelectedTabChangeEvent event) { // Component tab = tabSheet.getSelectedTab(); // // if (getLayoutArray() != null) { // if (tab.equals(paletteTab)) { // for (FVLayout layout : getLayoutArray()){ // layout.setDragDrop(true); // } // } // } // } // }); firstTab = new AbsoluteLayout(); firstTab.setHeight("800px"); firstTab.setWidth("100%"); firstTab.setSizeFull(); firstTab.setCaption("Edit Panel"); paletteTab = new AbsoluteLayout(); paletteTab.setHeight("800px"); paletteTab.setWidth("100%"); paletteTab.setSizeFull(); paletteTab.setCaption("Palette"); paletteTreeContainer = new HierarchicalContainer(); paletteTreeContainer.addContainerProperty("name", String.class, null); Iterator<String> iter = FVGUIFactory.getInstance().keySet().iterator(); while (iter != null && iter.hasNext()) { String tag = iter.next(); paletteTreeContainer.addItem(tag); paletteTreeContainer.setChildrenAllowed(tag, false); } /* for (int i = 0; i < paletteLabels.length; i++) { paletteTreeContainer.addItem(paletteLabels[i]); paletteTreeContainer.setChildrenAllowed(paletteLabels[i], false); } */ paletteTree = new FVTree(); paletteTree.setContainerDataSource(paletteTreeContainer); paletteTab.addComponent(paletteTree); treeContainerPanel = new Panel(); treeContainerPanel.setStyleName(Reindeer.PANEL_LIGHT); treeContainerPanel.setHeight("400px"); save = new Button(); save.setIcon(FVIconFactory.getInstance().getFVIcon(FVIconFactory.ICON_SAVE)); save.setStyleName(BaseTheme.BUTTON_LINK); createField = new Button(); createField.setIcon(FVIconFactory.getInstance().getFVIcon(FVIconFactory.ICON_ADD)); createField.setStyleName(BaseTheme.BUTTON_LINK); // fieldTree = new FVTree(); INavigationWindow mainWindow = (INavigationWindow) FocWebApplication.getInstanceForThread() .getNavigationWindow(); DataModelNodeTree dataModelNodeTree = new DataModelNodeTree(new DataModelNodeList(getFocDesc(), 3)); XMLViewKey xmlViewKey = new XMLViewKey(AdminWebModule.RIGHT_PANEL_STORAGE, XMLViewKey.TYPE_TREE, XMLViewKey.CONTEXT_DEFAULT, XMLViewKey.VIEW_DEFAULT); setRightPanelTree((FocRightPanel_Tree) XMLViewDictionary.getInstance().newCentralPanel(mainWindow, xmlViewKey, dataModelNodeTree)); refreshTree(); tabSheet.addTab(firstTab, "Edit"); tabSheet.addTab(paletteTab, "Palette"); populate(); }
From source file:com.kohmiho.mpsr.Form_1_2_1.java
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);//w ww. jav a 2 s . com mainLayout.setWidth("800px"); mainLayout.setHeight("540px"); // top-level component properties setWidth("800px"); setHeight("540px"); // labelPrototype labelPrototype = new Label(); labelPrototype.setStyleName("prototype2"); labelPrototype.setImmediate(false); labelPrototype.setWidth("-1px"); labelPrototype.setHeight("-1px"); labelPrototype.setValue("Label"); mainLayout.addComponent(labelPrototype, "top:0.0px;right:29.0px;"); // projLabel projLabel = new Label(); projLabel.setImmediate(false); projLabel.setWidth("210px"); projLabel.setHeight("-1px"); projLabel.setValue("Project"); mainLayout.addComponent(projLabel, "top:40.0px;left:0.0px;"); // projStatus projStatus = new ComboBox(); projStatus.setCaption("Current Status"); projStatus.setImmediate(false); projStatus.setWidth("80px"); projStatus.setHeight("24px"); mainLayout.addComponent(projStatus, "top:40.0px;left:220.0px;"); // projTrend projTrend = new ComboBox(); projTrend.setCaption("Trend"); projTrend.setImmediate(false); projTrend.setWidth("90px"); projTrend.setHeight("24px"); mainLayout.addComponent(projTrend, "top:40.0px;left:310.0px;"); // projComment projComment = new TextArea(); projComment.setCaption("Comments"); projComment.setImmediate(false); projComment.setWidth("240px"); projComment.setHeight("40px"); mainLayout.addComponent(projComment, "top:40.0px;left:410.0px;"); // projPercentComplete projPercentComplete = new PercentCompleteSlider(); projPercentComplete.setCaption("% Completed"); projPercentComplete.setImmediate(false); projPercentComplete.setWidth("120px"); projPercentComplete.setHeight("40px"); mainLayout.addComponent(projPercentComplete, "top:40.0px;left:660.0px;"); // targetBudgetLabel targetBudgetLabel = new Label(); targetBudgetLabel.setImmediate(false); targetBudgetLabel.setWidth("210px"); targetBudgetLabel.setHeight("-1px"); targetBudgetLabel.setValue("Target Budget"); mainLayout.addComponent(targetBudgetLabel, "top:80.0px;left:0.0px;"); // targetBudgetStatus targetBudgetStatus = new ComboBox(); targetBudgetStatus.setImmediate(false); targetBudgetStatus.setWidth("80px"); targetBudgetStatus.setHeight("24px"); mainLayout.addComponent(targetBudgetStatus, "top:80.0px;left:220.0px;"); // targetBudgetTrend targetBudgetTrend = new ComboBox(); targetBudgetTrend.setImmediate(false); targetBudgetTrend.setWidth("90px"); targetBudgetTrend.setHeight("24px"); mainLayout.addComponent(targetBudgetTrend, "top:80.0px;left:310.0px;"); // targetBudgetComment targetBudgetComment = new TextArea(); targetBudgetComment.setImmediate(false); targetBudgetComment.setWidth("240px"); targetBudgetComment.setHeight("40px"); mainLayout.addComponent(targetBudgetComment, "top:80.0px;left:410.0px;"); // targetBudgetPercentComplete targetBudgetPercentComplete = new PercentCompleteSlider(); targetBudgetPercentComplete.setEnabled(false); targetBudgetPercentComplete.setImmediate(false); targetBudgetPercentComplete.setVisible(false); targetBudgetPercentComplete.setWidth("120px"); targetBudgetPercentComplete.setHeight("40px"); mainLayout.addComponent(targetBudgetPercentComplete, "top:80.0px;left:660.0px;"); // safetyLabel safetyLabel = new Label(); safetyLabel.setImmediate(false); safetyLabel.setWidth("210px"); safetyLabel.setHeight("-1px"); safetyLabel.setValue("Safety"); mainLayout.addComponent(safetyLabel, "top:120.0px;left:0.0px;"); // safetyStatus safetyStatus = new ComboBox(); safetyStatus.setImmediate(false); safetyStatus.setWidth("80px"); safetyStatus.setHeight("24px"); mainLayout.addComponent(safetyStatus, "top:120.0px;left:220.0px;"); // safetyTrend safetyTrend = new ComboBox(); safetyTrend.setImmediate(false); safetyTrend.setWidth("90px"); safetyTrend.setHeight("24px"); mainLayout.addComponent(safetyTrend, "top:120.0px;left:310.0px;"); // safetyComment safetyComment = new TextArea(); safetyComment.setImmediate(false); safetyComment.setWidth("240px"); safetyComment.setHeight("40px"); mainLayout.addComponent(safetyComment, "top:120.0px;left:410.0px;"); // safetyPercentComplete safetyPercentComplete = new PercentCompleteSlider(); safetyPercentComplete.setImmediate(false); safetyPercentComplete.setWidth("120px"); safetyPercentComplete.setHeight("40px"); mainLayout.addComponent(safetyPercentComplete, "top:120.0px;left:660.0px;"); // licenseLabel licenseLabel = new Label(); licenseLabel.setImmediate(false); licenseLabel.setWidth("210px"); licenseLabel.setHeight("-1px"); licenseLabel.setValue("Licensing & Permitting"); mainLayout.addComponent(licenseLabel, "top:160.0px;left:0.0px;"); // licenseStatus licenseStatus = new ComboBox(); licenseStatus.setImmediate(false); licenseStatus.setWidth("80px"); licenseStatus.setHeight("24px"); mainLayout.addComponent(licenseStatus, "top:160.0px;left:220.0px;"); // licenseTrend licenseTrend = new ComboBox(); licenseTrend.setImmediate(false); licenseTrend.setWidth("90px"); licenseTrend.setHeight("24px"); mainLayout.addComponent(licenseTrend, "top:160.0px;left:310.0px;"); // licenseComment licenseComment = new TextArea(); licenseComment.setImmediate(false); licenseComment.setWidth("240px"); licenseComment.setHeight("40px"); mainLayout.addComponent(licenseComment, "top:160.0px;left:410.0px;"); // licensePercentComplete licensePercentComplete = new PercentCompleteSlider(); licensePercentComplete.setImmediate(false); licensePercentComplete.setWidth("120px"); licensePercentComplete.setHeight("40px"); mainLayout.addComponent(licensePercentComplete, "top:160.0px;left:660.0px;"); // corpLabel corpLabel = new Label(); corpLabel.setImmediate(false); corpLabel.setWidth("210px"); corpLabel.setHeight("-1px"); corpLabel.setValue("Corporate Properties"); mainLayout.addComponent(corpLabel, "top:200.0px;left:0.0px;"); // corpStatus corpStatus = new ComboBox(); corpStatus.setImmediate(false); corpStatus.setWidth("80px"); corpStatus.setHeight("24px"); mainLayout.addComponent(corpStatus, "top:200.0px;left:220.0px;"); // corpTrend corpTrend = new ComboBox(); corpTrend.setImmediate(false); corpTrend.setWidth("90px"); corpTrend.setHeight("24px"); mainLayout.addComponent(corpTrend, "top:200.0px;left:310.0px;"); // corpComment corpComment = new TextArea(); corpComment.setImmediate(false); corpComment.setWidth("240px"); corpComment.setHeight("40px"); mainLayout.addComponent(corpComment, "top:200.0px;left:410.0px;"); // corpPercentComplete corpPercentComplete = new PercentCompleteSlider(); corpPercentComplete.setImmediate(false); corpPercentComplete.setWidth("120px"); corpPercentComplete.setHeight("40px"); mainLayout.addComponent(corpPercentComplete, "top:200.0px;left:660.0px;"); // ipdeLabel ipdeLabel = new Label(); ipdeLabel.setImmediate(false); ipdeLabel.setWidth("210px"); ipdeLabel.setHeight("-1px"); ipdeLabel.setValue("Inside Plant Design & Engineering"); mainLayout.addComponent(ipdeLabel, "top:240.0px;left:0.0px;"); // ipdeStatus ipdeStatus = new ComboBox(); ipdeStatus.setImmediate(false); ipdeStatus.setWidth("80px"); ipdeStatus.setHeight("24px"); mainLayout.addComponent(ipdeStatus, "top:240.0px;left:220.0px;"); // ipdeTrend ipdeTrend = new ComboBox(); ipdeTrend.setImmediate(false); ipdeTrend.setWidth("90px"); ipdeTrend.setHeight("24px"); mainLayout.addComponent(ipdeTrend, "top:240.0px;left:310.0px;"); // ipdeComment ipdeComment = new TextArea(); ipdeComment.setImmediate(false); ipdeComment.setWidth("240px"); ipdeComment.setHeight("40px"); mainLayout.addComponent(ipdeComment, "top:240.0px;left:410.0px;"); // ipdePercentComplete ipdePercentComplete = new PercentCompleteSlider(); ipdePercentComplete.setImmediate(false); ipdePercentComplete.setWidth("120px"); ipdePercentComplete.setHeight("40px"); mainLayout.addComponent(ipdePercentComplete, "top:240.0px;left:660.0px;"); // outreachLabel outreachLabel = new Label(); outreachLabel.setImmediate(false); outreachLabel.setWidth("210px"); outreachLabel.setHeight("-1px"); outreachLabel.setValue("Public Outreach"); mainLayout.addComponent(outreachLabel, "top:280.0px;left:0.0px;"); // outreachStatus outreachStatus = new ComboBox(); outreachStatus.setImmediate(false); outreachStatus.setWidth("80px"); outreachStatus.setHeight("24px"); mainLayout.addComponent(outreachStatus, "top:280.0px;left:220.0px;"); // outreachTrend outreachTrend = new ComboBox(); outreachTrend.setImmediate(false); outreachTrend.setWidth("90px"); outreachTrend.setHeight("24px"); mainLayout.addComponent(outreachTrend, "top:280.0px;left:310.0px;"); // outreachComment outreachComment = new TextArea(); outreachComment.setImmediate(false); outreachComment.setWidth("240px"); outreachComment.setHeight("40px"); mainLayout.addComponent(outreachComment, "top:280.0px;left:410.0px;"); // outreachPercentComplete outreachPercentComplete = new PercentCompleteSlider(); outreachPercentComplete.setImmediate(false); outreachPercentComplete.setWidth("120px"); outreachPercentComplete.setHeight("40px"); mainLayout.addComponent(outreachPercentComplete, "top:280.0px;left:660.0px;"); // procureLabel procureLabel = new Label(); procureLabel.setImmediate(false); procureLabel.setWidth("210px"); procureLabel.setHeight("-1px"); procureLabel.setValue("Procurement"); mainLayout.addComponent(procureLabel, "top:320.0px;left:0.0px;"); // procureStatus procureStatus = new ComboBox(); procureStatus.setImmediate(false); procureStatus.setWidth("80px"); procureStatus.setHeight("24px"); mainLayout.addComponent(procureStatus, "top:320.0px;left:220.0px;"); // procureTrend procureTrend = new ComboBox(); procureTrend.setImmediate(false); procureTrend.setWidth("90px"); procureTrend.setHeight("24px"); mainLayout.addComponent(procureTrend, "top:320.0px;left:310.0px;"); // procureComment procureComment = new TextArea(); procureComment.setImmediate(false); procureComment.setWidth("240px"); procureComment.setHeight("40px"); mainLayout.addComponent(procureComment, "top:320.0px;left:410.0px;"); // procurePercentComplete procurePercentComplete = new PercentCompleteSlider(); procurePercentComplete.setImmediate(false); procurePercentComplete.setWidth("120px"); procurePercentComplete.setHeight("40px"); mainLayout.addComponent(procurePercentComplete, "top:320.0px;left:660.0px;"); // constructLabel constructLabel = new Label(); constructLabel.setImmediate(false); constructLabel.setWidth("210px"); constructLabel.setHeight("-1px"); constructLabel.setValue("Construction"); mainLayout.addComponent(constructLabel, "top:360.0px;left:0.0px;"); // constructStatus constructStatus = new ComboBox(); constructStatus.setImmediate(false); constructStatus.setWidth("80px"); constructStatus.setHeight("24px"); mainLayout.addComponent(constructStatus, "top:360.0px;left:220.0px;"); // constructTrend constructTrend = new ComboBox(); constructTrend.setImmediate(false); constructTrend.setWidth("90px"); constructTrend.setHeight("24px"); mainLayout.addComponent(constructTrend, "top:360.0px;left:310.0px;"); // constructComment constructComment = new TextArea(); constructComment.setImmediate(false); constructComment.setWidth("240px"); constructComment.setHeight("40px"); mainLayout.addComponent(constructComment, "top:360.0px;left:410.0px;"); // constructPercentComplete constructPercentComplete = new PercentCompleteSlider(); constructPercentComplete.setImmediate(false); constructPercentComplete.setWidth("120px"); constructPercentComplete.setHeight("40px"); mainLayout.addComponent(constructPercentComplete, "top:360.0px;left:660.0px;"); // envLabel envLabel = new Label(); envLabel.setImmediate(false); envLabel.setWidth("210px"); envLabel.setHeight("-1px"); envLabel.setValue("Environmental - Resource Recovery"); mainLayout.addComponent(envLabel, "top:400.0px;left:0.0px;"); // envStatus envStatus = new ComboBox(); envStatus.setImmediate(false); envStatus.setWidth("80px"); envStatus.setHeight("24px"); mainLayout.addComponent(envStatus, "top:400.0px;left:220.0px;"); // envTrend envTrend = new ComboBox(); envTrend.setImmediate(false); envTrend.setWidth("90px"); envTrend.setHeight("24px"); mainLayout.addComponent(envTrend, "top:400.0px;left:310.0px;"); // envComment envComment = new TextArea(); envComment.setImmediate(false); envComment.setWidth("240px"); envComment.setHeight("40px"); mainLayout.addComponent(envComment, "top:400.0px;left:410.0px;"); // envPercentComplete envPercentComplete = new PercentCompleteSlider(); envPercentComplete.setImmediate(false); envPercentComplete.setWidth("120px"); envPercentComplete.setHeight("40px"); mainLayout.addComponent(envPercentComplete, "top:400.0px;left:660.0px;"); // salvLabel salvLabel = new Label(); salvLabel.setImmediate(false); salvLabel.setWidth("210px"); salvLabel.setHeight("-1px"); salvLabel.setValue("Salvage"); mainLayout.addComponent(salvLabel, "top:440.0px;left:0.0px;"); // salvStatus salvStatus = new ComboBox(); salvStatus.setImmediate(false); salvStatus.setWidth("80px"); salvStatus.setHeight("24px"); mainLayout.addComponent(salvStatus, "top:440.0px;left:220.0px;"); // salvTrend salvTrend = new ComboBox(); salvTrend.setImmediate(false); salvTrend.setWidth("90px"); salvTrend.setHeight("24px"); mainLayout.addComponent(salvTrend, "top:440.0px;left:310.0px;"); // salvComment salvComment = new TextArea(); salvComment.setImmediate(false); salvComment.setWidth("240px"); salvComment.setHeight("40px"); mainLayout.addComponent(salvComment, "top:440.0px;left:410.0px;"); // salvPercentComplete salvPercentComplete = new PercentCompleteSlider(); salvPercentComplete.setImmediate(false); salvPercentComplete.setWidth("120px"); salvPercentComplete.setHeight("40px"); mainLayout.addComponent(salvPercentComplete, "top:440.0px;left:660.0px;"); // withdrawLabel withdrawLabel = new Label(); withdrawLabel.setImmediate(false); withdrawLabel.setWidth("210px"); withdrawLabel.setHeight("-1px"); withdrawLabel.setValue("Withdrawal"); mainLayout.addComponent(withdrawLabel, "top:480.0px;left:0.0px;"); // withdrawStatus withdrawStatus = new ComboBox(); withdrawStatus.setImmediate(false); withdrawStatus.setWidth("80px"); withdrawStatus.setHeight("24px"); mainLayout.addComponent(withdrawStatus, "top:480.0px;left:220.0px;"); // withdrawTrend withdrawTrend = new ComboBox(); withdrawTrend.setImmediate(false); withdrawTrend.setWidth("90px"); withdrawTrend.setHeight("24px"); mainLayout.addComponent(withdrawTrend, "top:480.0px;left:310.0px;"); // withdrawComment withdrawComment = new TextArea(); withdrawComment.setImmediate(false); withdrawComment.setWidth("240px"); withdrawComment.setHeight("40px"); mainLayout.addComponent(withdrawComment, "top:480.0px;left:410.0px;"); // withdrawPercentComplete withdrawPercentComplete = new PercentCompleteSlider(); withdrawPercentComplete.setImmediate(false); withdrawPercentComplete.setWidth("120px"); withdrawPercentComplete.setHeight("40px"); mainLayout.addComponent(withdrawPercentComplete, "top:480.0px;left:660.0px;"); return mainLayout; }
From source file:com.m4gik.views.component.LibraryScreen.java
/** * @param audioFile/*from w w w.ja v a 2 s . c om*/ * @param cover * @return */ private Component createPlayImage(final AudioFile audioFile, ExternalResource cover) { AbsoluteLayout absoluteLayout = new AbsoluteLayout(); absoluteLayout.setWidth("120px"); absoluteLayout.setHeight("120px"); absoluteLayout.addComponent(createImageCover(cover)); final Image play = createImageCover( new ExternalResource("http://www.gelab.com.tr/interfaces/gelab/images/PlayButton.png")); play.setWidth("50px"); play.setHeight("50px"); play.addClickListener(new ClickListener() { private static final long serialVersionUID = -5184601350921707969L; @Override public void click(ClickEvent event) { MusicPlayerPanel musicPanel = MusicPlayerPanel.getInstance(getPlayerLayout()); watched.addObserver(musicPanel); MusicPlayerPanel.setAudio(audioFile); MusicPlayerPanel.runDefaultSetup(); if (isPlay.equals(false)) { watched.setValue(isPlay = true); play.setSource(new ExternalResource( "http://icons.iconarchive.com/icons/icons-land/play-stop-pause/256/Pause-Disabled-icon.png")); } else { watched.setValue(isPlay = false); play.setSource( new ExternalResource("http://www.gelab.com.tr/interfaces/gelab/images/PlayButton.png")); } } }); absoluteLayout.addComponent(play, "top: 30px; left: 30px;"); return absoluteLayout; }