Java Code Examples for com.vaadin.ui.Label#setImmediate()

The following examples show how to use com.vaadin.ui.Label#setImmediate() . 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: GroupsLegendLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private static Label createTotalTargetsLabel() {
    final Label label = new LabelBuilder().visible(false).name("").buildLabel();
    label.addStyleName("rollout-target-count-title");
    label.setImmediate(true);
    label.setSizeUndefined();
    return label;
}
 
Example 2
Source File: GroupsLegendLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private Label createLoadingLabel() {
    final Label label = new LabelBuilder().visible(false).name("").buildLabel();
    label.addStyleName("rollout-target-count-loading");
    label.setImmediate(true);
    label.setSizeUndefined();
    label.setValue(i18n.getMessage("label.rollout.calculating"));
    return label;
}
 
Example 3
Source File: AddUpdateRolloutWindowLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private static Label createCountLabel() {
    final Label groupSize = new LabelBuilder().visible(false).name("").buildLabel();
    groupSize.addStyleName(ValoTheme.LABEL_TINY + " " + "rollout-target-count-message");
    groupSize.setImmediate(true);
    groupSize.setSizeUndefined();
    return groupSize;
}
 
Example 4
Source File: AutoCompleteTextFieldComponent.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private static Label createStatusIcon() {
    final Label statusIcon = new Label();
    statusIcon.setImmediate(true);
    statusIcon.setContentMode(ContentMode.HTML);
    statusIcon.setSizeFull();
    setInitialStatusIconStyle(statusIcon);
    statusIcon.setId(UIComponentIdProvider.VALIDATION_STATUS_ICON_ID);
    return statusIcon;
}
 
Example 5
Source File: TargetBulkUpdateWindowLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private static Label getStatusCountLabel() {
    final Label countLabel = new Label();
    countLabel.setImmediate(true);
    countLabel.addStyleName("bulk-upload-label");
    countLabel.setVisible(false);
    countLabel.setCaptionAsHtml(true);
    countLabel.setId(UIComponentIdProvider.BULK_UPLOAD_COUNT);
    return countLabel;
}
 
Example 6
Source File: DefaultGridHeader.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Builds the title HorizontalLayout containing two labels.
 *
 * @return title as HorizontalLayout
 */
protected HorizontalLayout buildTitleHorizontalLayout() {

    prefixText = new Label();
    prefixText.setValue(titleText);
    prefixText.addStyleName(ValoTheme.LABEL_SMALL);
    prefixText.addStyleName(ValoTheme.LABEL_BOLD);
    prefixText.setSizeUndefined();

    title = new Label();
    title.setSizeFull();
    title.setImmediate(true);
    title.setWidth("100%");
    title.addStyleName(ValoTheme.LABEL_SMALL);
    title.addStyleName("text-bold");
    title.addStyleName("text-cut");
    title.addStyleName("header-caption-right");

    prefixWithTitle = new HorizontalLayout();
    prefixWithTitle.setMargin(false);
    prefixWithTitle.setSpacing(true);
    prefixWithTitle.setSizeFull();
    prefixWithTitle.addStyleName("header-caption");

    prefixWithTitle.addComponent(prefixText);
    prefixWithTitle.setComponentAlignment(prefixText, Alignment.TOP_LEFT);
    prefixWithTitle.setExpandRatio(prefixText, 0.0F);

    prefixWithTitle.addComponent(title);
    prefixWithTitle.setComponentAlignment(title, Alignment.TOP_LEFT);
    prefixWithTitle.setExpandRatio(title, 1.0F);

    return prefixWithTitle;
}
 
Example 7
Source File: AbstractTableDetailsLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
protected void createComponents() {
    captionPrefix = new Label(getDefaultCaption());
   captionPrefix.setImmediate(true);
    captionPrefix.addStyleName(ValoTheme.LABEL_SMALL);
    captionPrefix.addStyleName(ValoTheme.LABEL_BOLD);
    captionPrefix.setSizeUndefined();

    captionNameVersion = new Label();
    captionNameVersion.setImmediate(true);
    captionNameVersion.setId(getDetailsHeaderCaptionId());
    captionNameVersion.setWidth("100%");
    captionNameVersion.addStyleName(ValoTheme.LABEL_SMALL);
    captionNameVersion.addStyleName("text-bold");
    captionNameVersion.addStyleName("text-cut");
    captionNameVersion.addStyleName("header-caption-right");

    editButton = SPUIComponentProvider.getButton("", "", i18n.getMessage(UIMessageIdProvider.TOOLTIP_UPDATE), null,
            false, FontAwesome.PENCIL_SQUARE_O, SPUIButtonStyleNoBorder.class);
    editButton.setId(getEditButtonId());
    editButton.addClickListener(this::onEdit);
    editButton.setEnabled(false);

    manageMetadataBtn = SPUIComponentProvider.getButton("", "",
            i18n.getMessage(UIMessageIdProvider.TOOLTIP_METADATA_ICON), null, false, FontAwesome.LIST_ALT,
            SPUIButtonStyleNoBorder.class);
    manageMetadataBtn.setId(getMetadataButtonId());
    manageMetadataBtn.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_METADATA_ICON));
    manageMetadataBtn.addClickListener(this::showMetadata);
    manageMetadataBtn.setEnabled(false);

    detailsTab = SPUIComponentProvider.getDetailsTabSheet();
    detailsTab.setImmediate(true);
    detailsTab.setWidth(98, Unit.PERCENTAGE);
    detailsTab.setHeight(90, Unit.PERCENTAGE);
    detailsTab.addStyleName(SPUIStyleDefinitions.DETAILS_LAYOUT_STYLE);
    detailsTab.setId(getTabSheetId());
}
 
Example 8
Source File: LabelBuilder.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Build label.
 * 
 * @return Label
 */
public Label buildLabel() {
    final Label label = createLabel();
    label.setImmediate(false);
    label.setWidth("-1px");
    label.setHeight("-1px");
    if (StringUtils.hasText(caption)) {
        label.setCaption(caption);
    }

    return label;
}
 
Example 9
Source File: XacmlErrorHandler.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100%");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("100.0%");
	setHeight("-1px");
	
	// labelError
	labelError = new Label();
	labelError.setImmediate(false);
	labelError.setWidth("100.0%");
	labelError.setHeight("80px");
	labelError.setValue("This holds error messages.");
	mainLayout.addComponent(labelError);
	
	// buttonGo
	buttonGo = new Button();
	buttonGo.setCaption("Ok");
	buttonGo.setImmediate(true);
	buttonGo.setWidth("-1px");
	buttonGo.setHeight("-1px");
	mainLayout.addComponent(buttonGo);
	mainLayout.setComponentAlignment(buttonGo, new Alignment(48));
	
	return mainLayout;
}
 
Example 10
Source File: XacmlAdminConsole.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100%");
	mainLayout.setHeight("100%");
	mainLayout.setMargin(true);
	
	// top-level component properties
	setWidth("100.0%");
	setHeight("100.0%");
	
	// horizontalLayout_1
	horizontalLayout_1 = buildHorizontalLayout_1();
	mainLayout.addComponent(horizontalLayout_1);
	
	// tabSheet
	tabSheet = new TabSheet();
	tabSheet.setImmediate(false);
	tabSheet.setWidth("100.0%");
	tabSheet.setHeight("100.0%");
	mainLayout.addComponent(tabSheet);
	mainLayout.setExpandRatio(tabSheet, 1.0f);
	
	// labelCopyright
	labelCopyright = new Label();
	labelCopyright.setImmediate(false);
	labelCopyright.setWidth("-1px");
	labelCopyright.setHeight("40px");
	labelCopyright
			.setValue("<center>&copy; 2013-2014 AT&T Intellectual Property. All rights reserved.</center>");
	mainLayout.addComponent(labelCopyright);
	mainLayout.setComponentAlignment(labelCopyright, new Alignment(48));
	
	return mainLayout;
}
 
Example 11
Source File: BasicModel.java    From chipster with MIT License 5 votes vote down vote up
private void initHeadeer() {
	lbTitle = new Label();
	lbTitle.setContentMode(ContentMode.HTML);
	lbTitleDescription = new Label();
	lbTitleDescription.setContentMode(ContentMode.HTML);
	lbTitleDescription.setImmediate(true);
	addRow(lbTitle, lbTitleDescription);
}
 
Example 12
Source File: ArtifactDetailsLayout.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
private void createComponents() {
    prefixTitleOfArtifactDetails = new Label();
    prefixTitleOfArtifactDetails.addStyleName(ValoTheme.LABEL_SMALL);
    prefixTitleOfArtifactDetails.addStyleName(ValoTheme.LABEL_BOLD);
    prefixTitleOfArtifactDetails.setSizeUndefined();

    titleOfArtifactDetails = new Label();
    titleOfArtifactDetails.setId(UIComponentIdProvider.ARTIFACT_DETAILS_HEADER_LABEL_ID);
    titleOfArtifactDetails.setSizeFull();
    titleOfArtifactDetails.setImmediate(true);
    titleOfArtifactDetails.setWidth("100%");
    titleOfArtifactDetails.addStyleName(ValoTheme.LABEL_SMALL);
    titleOfArtifactDetails.addStyleName("text-bold");
    titleOfArtifactDetails.addStyleName("text-cut");
    titleOfArtifactDetails.addStyleName("header-caption-right");

    headerCaptionLayout = new HorizontalLayout();
    headerCaptionLayout.setMargin(false);
    headerCaptionLayout.setSpacing(true);
    headerCaptionLayout.setSizeFull();
    headerCaptionLayout.addStyleName("header-caption");

    headerCaptionLayout.addComponent(prefixTitleOfArtifactDetails);
    headerCaptionLayout.setComponentAlignment(prefixTitleOfArtifactDetails, Alignment.TOP_LEFT);
    headerCaptionLayout.setExpandRatio(prefixTitleOfArtifactDetails, 0.0F);

    headerCaptionLayout.addComponent(titleOfArtifactDetails);
    headerCaptionLayout.setComponentAlignment(titleOfArtifactDetails, Alignment.TOP_LEFT);
    headerCaptionLayout.setExpandRatio(titleOfArtifactDetails, 1.0F);

    maxMinButton = createMaxMinButton();

    artifactDetailsTable = createArtifactDetailsTable();

    artifactDetailsTable.setContainerDataSource(createArtifactLazyQueryContainer());
    addGeneratedColumn(artifactDetailsTable);
    if (!readOnly) {
        addGeneratedColumnButton(artifactDetailsTable);
    }
    setTableColumnDetails(artifactDetailsTable);
}
 
Example 13
Source File: RuleEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// labelRuleID
	labelRuleID = new Label();
	labelRuleID.setCaption("Rule ID");
	labelRuleID.setImmediate(false);
	labelRuleID.setWidth("100.0%");
	labelRuleID.setHeight("-1px");
	labelRuleID.setValue("Label");
	mainLayout.addComponent(labelRuleID);
	mainLayout.setExpandRatio(labelRuleID, 1.0f);
	
	// optionGroupEffect
	optionGroupEffect = new OptionGroup();
	optionGroupEffect.setCaption("Choose the effect.");
	optionGroupEffect.setImmediate(false);
	optionGroupEffect.setWidth("-1px");
	optionGroupEffect.setHeight("-1px");
	optionGroupEffect.setInvalidAllowed(false);
	optionGroupEffect.setRequired(true);
	mainLayout.addComponent(optionGroupEffect);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter a description for the Rule.");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	textAreaDescription.setNullSettingAllowed(true);
	textAreaDescription.setNullRepresentation("");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 14
Source File: PolicyEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// labelID
	labelID = new Label();
	labelID.setCaption("Policy Set ID");
	labelID.setImmediate(false);
	labelID.setWidth("100.0%");
	labelID.setHeight("-1px");
	labelID.setValue("Label");
	mainLayout.addComponent(labelID);
	
	// textFieldVersion
	textFieldVersion = new TextField();
	textFieldVersion.setCaption("Version");
	textFieldVersion.setImmediate(false);
	textFieldVersion
			.setDescription("The format is numbers only separated by decimal point.");
	textFieldVersion.setWidth("-1px");
	textFieldVersion.setHeight("-1px");
	textFieldVersion.setInvalidAllowed(false);
	textFieldVersion.setRequired(true);
	textFieldVersion.setInputPrompt("Eg. 1 or 1.0 or 1.0.0 etc.");
	mainLayout.addComponent(textFieldVersion);
	
	// listSelectAlgorithm
	listSelectAlgorithm = new ListSelect();
	listSelectAlgorithm.setCaption("Policy Combining Algorithm");
	listSelectAlgorithm.setImmediate(false);
	listSelectAlgorithm.setWidth("100.0%");
	listSelectAlgorithm.setHeight("-1px");
	listSelectAlgorithm.setInvalidAllowed(false);
	listSelectAlgorithm.setRequired(true);
	mainLayout.addComponent(listSelectAlgorithm);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 15
Source File: PolicySetEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// labelID
	labelID = new Label();
	labelID.setCaption("Policy Set ID");
	labelID.setImmediate(false);
	labelID.setWidth("100.0%");
	labelID.setHeight("-1px");
	labelID.setValue("Label");
	mainLayout.addComponent(labelID);
	
	// textFieldVersion
	textFieldVersion = new TextField();
	textFieldVersion.setCaption("Version");
	textFieldVersion.setImmediate(false);
	textFieldVersion
			.setDescription("The format is numbers only separated by decimal point.");
	textFieldVersion.setWidth("-1px");
	textFieldVersion.setHeight("-1px");
	textFieldVersion.setInvalidAllowed(false);
	textFieldVersion.setRequired(true);
	textFieldVersion.setInputPrompt("Eg. 1 or 1.0 or 1.0.0 etc.");
	mainLayout.addComponent(textFieldVersion);
	
	// listSelectAlgorithm
	listSelectAlgorithm = new ListSelect();
	listSelectAlgorithm.setCaption("Policy Combining Algorithm");
	listSelectAlgorithm.setImmediate(false);
	listSelectAlgorithm.setWidth("100.0%");
	listSelectAlgorithm.setHeight("-1px");
	listSelectAlgorithm.setInvalidAllowed(false);
	listSelectAlgorithm.setRequired(true);
	mainLayout.addComponent(listSelectAlgorithm);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 16
Source File: XacmlAdminConsole.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("100.0%");
	horizontalLayout_1.setHeight("40px");
	horizontalLayout_1.setMargin(false);
	
	// embedded_1
	embedded_1 = new Embedded();
	embedded_1.setImmediate(false);
	embedded_1.setWidth("30px");
	embedded_1.setHeight("30px");
	embedded_1.setSource(new ThemeResource("img/att.png"));
	embedded_1.setType(1);
	embedded_1.setMimeType("image/png");
	horizontalLayout_1.addComponent(embedded_1);
	horizontalLayout_1.setComponentAlignment(embedded_1, new Alignment(33));
	
	// caption
	caption = new Label();
	caption.setImmediate(false);
	caption.setWidth("-1px");
	caption.setHeight("-1px");
	caption.setValue("AT&T Policy Engine Admin Console");
	horizontalLayout_1.addComponent(caption);
	horizontalLayout_1.setExpandRatio(caption, 1.0f);
	horizontalLayout_1.setComponentAlignment(caption, new Alignment(33));
	
	// labelWelcome
	labelWelcome = new Label();
	labelWelcome.setImmediate(false);
	labelWelcome.setWidth("-1px");
	labelWelcome.setHeight("40px");
	labelWelcome.setValue("Label");
	horizontalLayout_1.addComponent(labelWelcome);
	horizontalLayout_1.setComponentAlignment(labelWelcome,
			new Alignment(34));
	
	return horizontalLayout_1;
}