Java Code Examples for com.vaadin.ui.TextArea#setValue()

The following examples show how to use com.vaadin.ui.TextArea#setValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActionStatusMsgGrid.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public Component getDetails(final RowReference rowReference) {
    // Find the bean to generate details for
    final Item item = rowReference.getItem();
    final String message = (String) item.getItemProperty(ProxyMessage.PXY_MSG_VALUE).getValue();

    final TextArea textArea = new TextArea();
    textArea.addStyleName(ValoTheme.TEXTAREA_BORDERLESS);
    textArea.addStyleName(ValoTheme.TEXTAREA_TINY);
    textArea.addStyleName("inline-icon");
    textArea.setHeight(120, Unit.PIXELS);
    textArea.setWidth(100, Unit.PERCENTAGE);
    textArea.setValue(message);
    textArea.setReadOnly(Boolean.TRUE);
    return textArea;
}
 
Example 2
Source File: DecisionFlowChartManagerImpl.java    From cia with Apache License 2.0 6 votes vote down vote up
@Override
public TextArea createCommitteeeDecisionSummary(final Map<String, List<ViewRiksdagenCommittee>> committeeMap,final String rm) {		
	final TextArea area = new TextArea("Summary");
	final StringBuilder stringBuilder = new StringBuilder();
	final List<ProposalCommitteeeSummary> createCommitteeSummary = decisionDataFactory.createCommitteeSummary(rm);
	
	final Map<String, List<ProposalCommitteeeSummary>> orgProposalMap = createCommitteeSummary.stream()
			.collect(Collectors.groupingBy(ProposalCommitteeeSummary::getOrg));

	for (final Entry<String, List<ProposalCommitteeeSummary>> entry : orgProposalMap.entrySet()) {			
		if (committeeMap.containsKey(entry.getKey())) {
			addCommiteeSummary(stringBuilder, entry, committeeMap.get(entry.getKey()).stream().findFirst());
		}
	}
	area.setValue(stringBuilder.toString());
	return area;
}
 
Example 3
Source File: ProjectMemberInviteViewImpl.java    From mycollab with GNU Affero General Public License v3.0 5 votes vote down vote up
private void initContent() {
    this.removeAllComponents();

    roleComboBox = new ProjectRoleComboBox();
    roleComboBox.addValueChangeListener(valueChangeEvent -> {
        SimpleProjectRole role = roleComboBox.getValue();
        displayRolePermission(role);
    });

    AddViewLayout userAddLayout = new AddViewLayout(UserUIContext.getMessage(ProjectMemberI18nEnum.FORM_INVITE_MEMBERS), VaadinIcons.USER);
    userAddLayout.addHeaderRight(createButtonControls());

    GridFormLayoutHelper informationLayout = GridFormLayoutHelper.defaultFormLayoutHelper(LayoutType.ONE_COLUMN);

    inviteUserTokenField = new InviteUserTokenField();
    informationLayout.addComponent(new MVerticalLayout(inviteUserTokenField, new ELabel(UserUIContext.getMessage
                    (ProjectMemberI18nEnum.USER_TOKEN_INVITE_HINT)).withFullWidth().withStyleName(WebThemes.META_INFO)).withMargin(false),
            UserUIContext.getMessage(ProjectMemberI18nEnum.FORM_INVITEES_EMAIL), 0, 0);
    informationLayout.addComponent(roleComboBox, UserUIContext.getMessage(ProjectMemberI18nEnum.FORM_ROLE), 0, 1);

    messageArea = new TextArea();
    messageArea.setValue(UserUIContext.getMessage(ProjectMemberI18nEnum.MSG_DEFAULT_INVITATION_COMMENT));
    informationLayout.addComponent(messageArea, UserUIContext.getMessage(ProjectMemberI18nEnum.FORM_MESSAGE), 0, 2);

    userAddLayout.addBody(informationLayout.getLayout());
    userAddLayout.addBottom(createBottomPanel());
    this.addComponent(userAddLayout);

    roleComboBox.setDefaultValue();
}
 
Example 4
Source File: PDPStatusWindow.java    From XACML with MIT License 5 votes vote down vote up
protected TextArea	createTextArea(String value, int lines) {
	TextArea area = new TextArea();
	area.setValue(value);
	area.setNullRepresentation("");
	area.setSizeFull();
	area.setReadOnly(true);
	area.setRows(lines);
	return area;
}