List of usage examples for com.vaadin.ui GridLayout addComponent
@Override public void addComponent(Component component)
From source file:org.activiti.kickstart.ui.panel.KickstartWorkflowPanel.java
License:Apache License
protected void initNameField(GridLayout layout) { nameField = new TextField(); nameField.setWriteThrough(true);//from w w w.j a v a 2 s . c o m nameField.setImmediate(true); if (existingAdhocWorkflow != null) { nameField.setValue(existingAdhocWorkflow.getName()); } layout.addComponent(new Label(NAME_FIELD)); layout.addComponent(nameField); }
From source file:org.activiti.kickstart.ui.panel.KickstartWorkflowPanel.java
License:Apache License
protected void initDescriptionField(GridLayout layout) { descriptionField = new TextField(); descriptionField.setRows(4);/*from w w w. j a v a2 s.c o m*/ descriptionField.setColumns(35); if (existingAdhocWorkflow != null) { descriptionField.setValue(existingAdhocWorkflow.getDescription()); } layout.addComponent(new Label(DESCRIPTION_FIELD)); layout.addComponent(descriptionField); }
From source file:org.activiti.kickstart.ui.panel.KickstartWorkflowPanel.java
License:Apache License
protected void initTaskTable(GridLayout layout) { taskTable = new TaskTable(viewManager); if (existingAdhocWorkflow == null) { taskTable.addDefaultTaskRow();//from w w w . jav a2 s . c o m } else { for (BaseTaskDto task : existingAdhocWorkflow.getTasks()) { if (task instanceof UserTaskDto) { taskTable.addTaskRow((UserTaskDto) task); } } } layout.addComponent(new Label("Tasks")); layout.addComponent(taskTable); }
From source file:org.activiti.kickstart.ui.panel.KickstartWorkflowPanel.java
License:Apache License
protected void initButtons(GridLayout layout) { final Button saveButton = new Button("Save"); saveButton.setEnabled(nameField.getValue() != null && !"".equals((String) nameField.getValue())); saveButton.setIcon(saveImage);/*w ww.j a va 2 s . c om*/ saveButton.addListener(new Button.ClickListener() { private static final long serialVersionUID = 3546324122090420533L; public void buttonClick(ClickEvent event) { try { adhocWorkflowService.deployKickstartWorkflow(createAdhocWorkflow()); Panel successPanel = new Panel(); successPanel.setStyleName(Reindeer.PANEL_LIGHT); Label successLabel = new Label("Process successfully deployed"); successPanel.addComponent(successLabel); viewManager.switchWorkArea(ViewManager.PROCESS_SUCESSFULLY_DEPLOYED, successPanel); } catch (Exception e) { e.printStackTrace(); viewManager.showPopupWindow(new ErrorPopupWindow(e)); } } }); // Dependending on namefield value, save button is enabled nameField.addListener(new ValueChangeListener() { private static final long serialVersionUID = -4357300368046546003L; public void valueChange(ValueChangeEvent event) { if (nameField.getValue() != null && !"".equals((String) nameField.getValue())) { saveButton.setEnabled(true); } else { saveButton.setEnabled(false); } } }); Button generateImageButton = new Button("View image"); generateImageButton.setIcon(generateImageImage); generateImageButton.addListener(new Button.ClickListener() { private static final long serialVersionUID = 5671158538486627690L; public void buttonClick(ClickEvent event) { viewManager.showPopupWindow(new ProcessImagePopupWindow(viewManager, createAdhocWorkflow())); } }); HorizontalLayout footer = new HorizontalLayout(); footer.setSpacing(true); footer.addComponent(saveButton); footer.addComponent(generateImageButton); layout.addComponent(new Label()); layout.addComponent(footer); }
From source file:org.activiti.kickstart.ui.popup.FormPopupWindow.java
License:Apache License
protected void initUi() { GridLayout layout = new GridLayout(2, 4); layout.setSpacing(true);//from w w w . j a v a 2 s .c o m addComponent(layout); // Title layout.addComponent(new Label(FORM_TITLE)); titleField = new TextField(); layout.addComponent(titleField); // Description layout.addComponent(new Label(DESCRIPTION)); descriptionField = new TextField(); descriptionField.setRows(2); descriptionField.setColumns(25); layout.addComponent(descriptionField); // Property table propertyTable = new PropertyTable(); layout.addComponent(new Label(DATA)); layout.addComponent(propertyTable); fillFormFields(); // Buttons HorizontalLayout buttons = new HorizontalLayout(); buttons.setSpacing(true); // Save button Button saveButton = new Button("Save"); buttons.addComponent(saveButton); saveButton.addListener(new Button.ClickListener() { private static final long serialVersionUID = -2906886872414089331L; public void buttonClick(ClickEvent event) { FormDto form = createForm(); formModel.addForm(taskItemId, form); close(); } }); // Delete button Button deleteButton = new Button("Delete"); buttons.addComponent(deleteButton); deleteButton.addListener(new Button.ClickListener() { private static final long serialVersionUID = 5267967369680365653L; public void buttonClick(ClickEvent event) { formModel.removeForm(taskItemId); close(); } }); layout.addComponent(new Label("")); layout.addComponent(buttons); }
From source file:org.apache.ace.target.management.ui.TargetManagementExtension.java
License:Apache License
public Component create(Map<String, Object> context) { GridLayout result = new GridLayout(1, 4); result.setCaption(CAPTION);/*www . ja v a 2 s . co m*/ result.setMargin(true); result.setSpacing(true); result.setSizeFull(); final StatefulTargetObject target = getRepositoryObjectFromContext(context); final CheckBox registerCB = new CheckBox("Registered?"); registerCB.setImmediate(true); registerCB.setEnabled(!target.isRegistered()); registerCB.setValue(Boolean.valueOf(target.isRegistered())); result.addComponent(registerCB); final CheckBox autoApproveCB = new CheckBox("Auto approve?"); autoApproveCB.setImmediate(true); autoApproveCB.setEnabled(target.isRegistered()); autoApproveCB.setValue(Boolean.valueOf(target.getAutoApprove())); result.addComponent(autoApproveCB); final Button approveButton = new Button("Approve changes"); approveButton.setImmediate(true); approveButton.setEnabled(getApproveButtonEnabledState(target)); result.addComponent(approveButton); // Add a spacer that fill the remainder of the available space... result.addComponent(new Label(" ")); result.setRowExpandRatio(3, 1.0f); // Add all listeners... registerCB.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { if (event.getButton().booleanValue()) { target.register(); registerCB.setEnabled(!target.isRegistered()); autoApproveCB.setEnabled(target.isRegistered()); } } }); autoApproveCB.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { target.setAutoApprove(event.getButton().booleanValue()); approveButton.setEnabled(getApproveButtonEnabledState(target)); } }); approveButton.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { target.approve(); approveButton.setEnabled(getApproveButtonEnabledState(target)); } }); return result; }
From source file:org.apache.ace.webui.vaadin.component.ConfirmationDialog.java
License:Apache License
/** * Adds all components to this dialog./*from w w w.j a va 2s . co m*/ * * @param message * the optional message to display, can be <code>null</code>; * @param buttonNames * the names of the buttons to add, never <code>null</code> or empty. */ protected void addComponents(String message, String defaultButton, String... buttonNames) { if (message != null) { addComponent(new Label(message)); } GridLayout gl = new GridLayout(buttonNames.length + 1, 1); gl.setSpacing(true); gl.setWidth("100%"); gl.addComponent(new Label(" ")); gl.setColumnExpandRatio(0, 1.0f); for (String buttonName : buttonNames) { Button button = new Button(buttonName, this); button.setData(buttonName); if (defaultButton != null && defaultButton.equals(buttonName)) { button.setStyleName(Reindeer.BUTTON_DEFAULT); button.setClickShortcut(KeyCode.ENTER); // Request focus in this window... button.focus(); } gl.addComponent(button); } addComponent(gl); }
From source file:org.azrul.langkuik.framework.webgui.SearchDataTableLayout.java
protected void createSearchPanel(final Class<C> classOfBean, final Configuration config, final Set<String> currentUserRoles, final EntityRight entityRight) throws UnsupportedOperationException, SecurityException, FieldGroup.BindException { final BeanFieldGroup fieldGroup = new BeanFieldGroup(classOfBean); final FindAnyEntityParameter searchQuery = (FindAnyEntityParameter) parameter; //collect all activechoices Map<com.vaadin.ui.ComboBox, ActiveChoiceTarget> activeChoicesWithFieldAsKey = new HashMap<>(); Map<String, com.vaadin.ui.ComboBox> activeChoicesFieldWithHierarchyAsKey = new HashMap<>(); BeanUtils beanUtils = new BeanUtils(); Map<Integer, FieldContainer> fieldContainers = beanUtils.getOrderedFieldsByRank(classOfBean); final Map<Integer, com.vaadin.ui.Field> searchableFieldsByRank = new TreeMap<>(); final Map<String, com.vaadin.ui.Field> searchableFieldsByName = new TreeMap<>(); //Construct search form for (FieldContainer fieldContainer : fieldContainers.values()) { Field pojoField = fieldContainer.getPojoField(); WebField webField = fieldContainer.getWebField(); if (pojoField.isAnnotationPresent(org.hibernate.search.annotations.Field.class)) { if (webField.choices().length > 0) { //deal with choices com.vaadin.ui.ComboBox searchComboBox = new com.vaadin.ui.ComboBox(webField.name()); searchComboBox.setImmediate(true); fieldGroup.bind(searchComboBox, pojoField.getName()); for (Choice choice : webField.choices()) { if (choice.value() == -1) { searchComboBox.addItem(choice.textValue()); searchComboBox.setItemCaption(choice.textValue(), choice.display()); } else { searchComboBox.addItem(choice.value()); searchComboBox.setItemCaption(choice.value(), choice.display()); }/* w w w . j ava 2s . co m*/ } //allDataSearchForm.addComponent(searchComboBox); searchableFieldsByRank.put(webField.rank(), searchComboBox); searchableFieldsByName.put(pojoField.getName(), searchComboBox); } else if (webField.activeChoice().enumTree() != EmptyEnum.class) { //collect active choices - com.vaadin.ui.ComboBox searchComboBox = new com.vaadin.ui.ComboBox(webField.name()); searchComboBox.setImmediate(true); fieldGroup.bind(searchComboBox, pojoField.getName()); String hierarchy = webField.activeChoice().hierarchy(); Class<ActiveChoiceEnum> enumTree = (Class<ActiveChoiceEnum>) webField.activeChoice().enumTree(); ActiveChoiceTarget activeChoiceTarget = ActiveChoiceUtils.build(enumTree, hierarchy); for (String choice : activeChoiceTarget.getSourceChoices()) { searchComboBox.addItem(choice); activeChoicesWithFieldAsKey.put(searchComboBox, activeChoiceTarget); activeChoicesFieldWithHierarchyAsKey.put(hierarchy, searchComboBox); } searchableFieldsByRank.put(webField.rank(), searchComboBox); searchableFieldsByName.put(pojoField.getName(), searchComboBox); } else { com.vaadin.ui.Field searchField = fieldGroup.buildAndBind(webField.name(), pojoField.getName()); if (pojoField.getType().equals(Date.class)) { DateField dateField = (DateField) searchField; dateField.setDateFormat(config.get("dateFormat")); dateField.setWidth(100f, Sizeable.Unit.PIXELS); } //allDataSearchForm.addComponent(searchField); searchableFieldsByRank.put(webField.rank(), searchField); searchableFieldsByName.put(pojoField.getName(), searchField); } } } //build form int rowCount = (int) (Math.ceil(searchableFieldsByRank.size() / 2)); rowCount = rowCount < 1 ? 1 : rowCount; GridLayout allDataSearchForm = new GridLayout(2, rowCount); allDataSearchForm.setSpacing(true); for (com.vaadin.ui.Field searchField : searchableFieldsByRank.values()) { allDataSearchForm.addComponent(searchField); searchField.setId(searchField.getCaption()); } this.addComponent(allDataSearchForm); //deal with active choice for (final com.vaadin.ui.ComboBox sourceField : activeChoicesWithFieldAsKey.keySet()) { final ActiveChoiceTarget target = activeChoicesWithFieldAsKey.get(sourceField); final com.vaadin.ui.ComboBox targetField = activeChoicesFieldWithHierarchyAsKey .get(target.getTargetHierarchy()); sourceField.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { List<String> targetValues = target.getTargets().get(sourceField.getValue()); if (targetValues != null && !targetValues.isEmpty() && targetField != null) { targetField.removeAllItems(); for (String targetValue : targetValues) { targetField.addItem(targetValue); } } } }); } //search button Button searchBtn = new Button("Search", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { //reset previous searches searchQuery.getSearchTerms().clear(); //read search terms from form try { for (Map.Entry<String, com.vaadin.ui.Field> entry : searchableFieldsByName.entrySet()) { com.vaadin.ui.Field searchField = entry.getValue(); if (searchField.getValue() != null) { if (searchField.getValue() instanceof String) { String searchTerm = ((String) searchField.getValue()).trim(); if (!"".equals(searchTerm)) { searchQuery.getSearchTerms().add(new SearchTerm(entry.getKey(), classOfBean.getDeclaredField(entry.getKey()), searchField.getValue())); } } else { searchQuery.getSearchTerms().add(new SearchTerm(entry.getKey(), classOfBean.getDeclaredField(entry.getKey()), searchField.getValue())); } } } } catch (NoSuchFieldException | SecurityException ex) { Logger.getLogger(SearchDataTableLayout.class.getName()).log(Level.SEVERE, null, ex); } //do query Collection<C> allData = dao.runQuery(parameter, orderBy, asc, currentTableIndex, itemCountPerPage); if (allData.isEmpty()) { allData = new ArrayList<>(); allData.add(dao.createNew()); } bigTotal = dao.countQueryResult(parameter); itemContainer.setBeans(allData); itemContainer.refreshItems(); table.setPageLength(itemCountPerPage); table.setPageLength(itemCountPerPage); currentTableIndex = 0; int lastPage = (int) Math.floor(bigTotal / itemCountPerPage); if (bigTotal % itemCountPerPage == 0) { lastPage--; } int currentUpdatedPage = currentTableIndex / itemCountPerPage; pageLabel.setCaption(" " + (currentUpdatedPage + 1) + " of " + (lastPage + 1) + " "); } }); searchBtn.setId(searchBtn.getCaption()); this.addComponent(searchBtn); }
From source file:org.diretto.web.richwebclient.view.sections.ContactSection.java
License:Open Source License
@Override public synchronized void addComponents() { if (!componentsAdded) { GridLayout mainLayout = new GridLayout(2, 1); addComponent(mainLayout);//from w w w . j a v a2s .c om setExpandRatio(mainLayout, 1.0f); VerticalLayout contactDetailsLayout = new VerticalLayout(); contactDetailsLayout.setStyleName(Reindeer.LAYOUT_BLACK); contactDetailsLayout.setWidth("280px"); contactDetailsLayout.setMargin(true); contactDetailsLayout.setSpacing(true); contactDetailsLayout.addComponent(StyleUtils.getLabelH2("Contact Details")); contactDetailsLayout.addComponent(StyleUtils.getHorizontalLine()); contactDetailsLayout.addComponent(StyleUtils.getLabelBold("Project Team")); contactDetailsLayout.addComponent(StyleUtils.getLabel("Benjamin Erb & Tobias Schlecht")); contactDetailsLayout.addComponent(StyleUtils.getHorizontalLine()); contactDetailsLayout.addComponent(StyleUtils.getLabelBold("Address")); contactDetailsLayout .addComponent(StyleUtils.getLabel("Institute of Media Informatics, Ulm University")); contactDetailsLayout.addComponent(StyleUtils.getLabel("James-Franck-Ring, 89073 Ulm, Germany")); contactDetailsLayout.addComponent(StyleUtils.getHorizontalLine()); contactDetailsLayout.addComponent(StyleUtils.getLabelBold("Project Website")); contactDetailsLayout .addComponent(new Link("www.diretto.org", new ExternalResource("http://www.diretto.org/"))); contactDetailsLayout.addComponent(StyleUtils.getVerticalSpaceSmall()); contactDetailsLayout.addComponent(StyleUtils.getLabelBold("GitHub Profile")); contactDetailsLayout.addComponent( new Link("github.com/diretto", new ExternalResource("https://github.com/diretto"))); contactDetailsLayout.addComponent(StyleUtils.getVerticalSpaceSmall()); contactDetailsLayout.addComponent(StyleUtils.getLabelBold("Twitter Account")); contactDetailsLayout.addComponent(new Link("twitter.com/diretto_project", new ExternalResource("http://twitter.com/diretto_project"))); contactDetailsLayout.addComponent(StyleUtils.getHorizontalLine()); contactDetailsLayout.addComponent(StyleUtils.getLabelBold("Email Address")); contactDetailsLayout.addComponent( new Link("diretto@googlegroups.com", new ExternalResource("mailto:diretto@googlegroups.com"))); mainLayout.addComponent(contactDetailsLayout); VerticalLayout wrapperLayout = new VerticalLayout(); wrapperLayout.setWidth("600px"); wrapperLayout.setMargin(false, true, false, true); VerticalLayout termsOfUseLayout = new VerticalLayout(); termsOfUseLayout.setWidth("520px"); termsOfUseLayout.setMargin(true); termsOfUseLayout.setSpacing(true); termsOfUseLayout.addComponent(StyleUtils.getLabelH2("Terms of Use")); termsOfUseLayout.addComponent(StyleUtils.getHorizontalLine()); termsOfUseLayout.addComponent(StyleUtils.getLabelBold("Terms")); termsOfUseLayout.addComponent(StyleUtils.getLabelHTML( "By accessing this website, you are agreeing to be bound by these website <i>Terms of Use</i>, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this web site are protected by applicable copyright and trade mark law.")); termsOfUseLayout.addComponent(StyleUtils.getHorizontalLine()); termsOfUseLayout.addComponent(StyleUtils.getLabelBold("Use License")); termsOfUseLayout.addComponent(StyleUtils.getLabelHTML( "Permission is granted to temporarily download one copy of the materials (information or software) on this website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:<br /><br />" + "• modify or copy the materials<br />" + "• use the materials for any commercial purpose, or for any public display<br />" + "• attempt to decompile or reverse engineer any software contained on this website<br />" + "• remove any copyright or other proprietary notations from the materials<br />" + "• transfer the materials to another person or any other server<br />" + "<br />This license shall automatically terminate if you violate any of these restrictions and may be terminated by the <i>diretto</i> Project Team at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.")); termsOfUseLayout.addComponent(StyleUtils.getHorizontalLine()); termsOfUseLayout.addComponent(StyleUtils.getLabelBold("Disclaimer")); termsOfUseLayout.addComponent(StyleUtils.getLabelHTML( "The materials on this website are provided <i>as is</i>. The <i>diretto</i> Project Team makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties, including without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights. Further, the <i>diretto</i> Project Team does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its Internet website or otherwise relating to such materials or on any sites linked to this site.")); termsOfUseLayout.addComponent(StyleUtils.getHorizontalLine()); termsOfUseLayout.addComponent(StyleUtils.getLabelBold("Limitations")); termsOfUseLayout.addComponent(StyleUtils.getLabelHTML( "In no event shall the <i>diretto</i> Project Team be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on this website, even if the <i>diretto</i> Project Team has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you. ")); termsOfUseLayout.addComponent(StyleUtils.getHorizontalLine()); termsOfUseLayout.addComponent(StyleUtils.getLabelBold("Revisions and Errata")); termsOfUseLayout.addComponent(StyleUtils.getLabelHTML( "The materials appearing on this website could include technical, typographical, or photographic errors. The <i>diretto</i> Project Team does not warrant that any of the materials on its website are accurate, complete, or current. The <i>diretto</i> Project Team may make changes to the materials contained on its website at any time without notice. The <i>diretto</i> Project Team does not, however, make any commitment to update the materials. ")); termsOfUseLayout.addComponent(StyleUtils.getHorizontalLine()); termsOfUseLayout.addComponent(StyleUtils.getLabelBold("Links")); termsOfUseLayout.addComponent(StyleUtils.getLabelHTML( "The <i>diretto</i> Project Team has not reviewed all of the sites linked to its Internet website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by the <i>diretto</i> Project Team of the site. Use of any such linked website is at the user's own risk. ")); termsOfUseLayout.addComponent(StyleUtils.getHorizontalLine()); termsOfUseLayout.addComponent(StyleUtils.getLabelBold("Site Terms of Use Modifications")); termsOfUseLayout.addComponent(StyleUtils.getLabelHTML( "The <i>diretto</i> Project Team may revise these terms of use for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these <i>Terms of Use</i>.")); termsOfUseLayout.addComponent(StyleUtils.getHorizontalLine()); termsOfUseLayout.addComponent(StyleUtils.getLabelBold("Governing Law")); termsOfUseLayout.addComponent(StyleUtils.getLabelHTML( "Any claim relating to this website shall be governed by the laws of <i>Germany</i> without regard to its conflict of law provisions. General terms and conditions are applicable to the use of this website.")); wrapperLayout.addComponent(termsOfUseLayout); wrapperLayout.setComponentAlignment(termsOfUseLayout, Alignment.TOP_CENTER); mainLayout.addComponent(wrapperLayout); componentsAdded = true; } }
From source file:org.hip.vif.forum.usersettings.ui.ShowCompletedRatingView.java
License:Open Source License
/** Constructor for view to display the completed ratings given. * * @param inRatings {@link QueryResult} the participants involved in the review and rating process * @param inQuestions {@link QueryResult} the reviewed questions * @param inCompletions {@link QueryResult} the reviewed completions * @param inTexts {@link QueryResult} the reviewed texts * @param inTask {@link IPluggableWithLookup} the controlling task * @throws VException//from ww w . ja v a2 s.c om * @throws SQLException */ public ShowCompletedRatingView(final QueryResult inRatings, final QueryResult inQuestions, final QueryResult inCompletions, final QueryResult inTexts, final IPluggableWithLookup inTask) throws VException, SQLException { final VerticalLayout lLayout = new VerticalLayout(); setCompositionRoot(lLayout); final IMessages lMessages = Activator.getMessages(); lLayout.setStyleName("vif-view"); //$NON-NLS-1$ lLayout.addComponent(new Label(String.format(VIFViewHelper.TMPL_TITLE, "vif-title", //$NON-NLS-1$ lMessages.getMessage("ratings.completed.title")), ContentMode.HTML)); //$NON-NLS-1$ lLayout.addComponent(new Label(lMessages.getMessage("ui.rated.subtitle"), ContentMode.HTML)); //$NON-NLS-1$ listContributions(inQuestions, inCompletions, inTexts, inTask, lLayout, lMessages); lLayout.addComponent(RiplaViewHelper.createSpacer()); final GridLayout lRatings = new GridLayout(5, 3); lRatings.setStyleName("vif-rating"); //$NON-NLS-1$ lRatings.setWidth("100%"); //$NON-NLS-1$ lRatings.setColumnExpandRatio(4, 1); lLayout.addComponent(lRatings); // headers lRatings.addComponent(new Label("")); //$NON-NLS-1$ addComponentSized(new Label(lMessages.getMessage("ui.rated.column.correctness"), ContentMode.HTML), //$NON-NLS-1$ lRatings); addComponentSized(new Label(lMessages.getMessage("ui.rated.column.efficiency"), ContentMode.HTML), //$NON-NLS-1$ lRatings); addComponentSized(new Label(lMessages.getMessage("ui.rated.column.etiquette"), ContentMode.HTML), lRatings); //$NON-NLS-1$ Label lRemark = new Label(lMessages.getMessage("ui.rated.column.remark"), ContentMode.HTML); //$NON-NLS-1$ lRemark.setStyleName("vif-colhead vif-padding-left"); //$NON-NLS-1$ lRatings.addComponent(lRemark); lRatings.getComponent(0, 0).setWidth(350, Unit.PIXELS); // ratings final Map<Long, String> lParticipants = new HashMap<Long, String>(); final List<Line> lLines = new Vector<ShowCompletedRatingView.Line>(); while (inRatings.hasMoreElements()) { final GeneralDomainObject lRating = inRatings.nextAsDomainObject(); setParticipant(lRating, lParticipants); lLines.add(new Line(lRating)); } for (final Line lLine : lLines) { lRatings.addComponent(new Label(lLine.getInvolved(lParticipants, lMessages), ContentMode.HTML)); addComponentAligened(lLine.getCorrectness(), lRatings); addComponentAligened(lLine.getEfficiency(), lRatings); addComponentAligened(lLine.getEtiquette(), lRatings); lRemark = new Label(lLine.getRemark(), ContentMode.HTML); lRemark.setStyleName("vif-padding-left"); //$NON-NLS-1$ lRatings.addComponent(lRemark); } }