Java Code Examples for com.vaadin.ui.Button#setDescription()

The following examples show how to use com.vaadin.ui.Button#setDescription() . 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: RolloutGroupTargetsListHeader.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
@Override
protected HorizontalLayout getHeaderCaptionLayout() {
    headerCaption = new LabelBuilder().name("").buildCaptionLabel();
    headerCaption.setStyleName(ValoTheme.LABEL_BOLD + " " + ValoTheme.LABEL_SMALL);
    final Button rolloutsListViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null,
            SPUIButtonStyleNoBorder.class);
    rolloutsListViewLink.setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links");
    rolloutsListViewLink.setDescription(i18n.getMessage("message.rollouts"));
    rolloutsListViewLink.setCaption(i18n.getMessage("message.rollouts"));
    rolloutsListViewLink.addClickListener(value -> showRolloutListView());

    rolloutNameLink = SPUIComponentProvider.getButton(null, "", "", null, false, null,
            SPUIButtonStyleNoBorder.class);
    rolloutNameLink.setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links");
    rolloutNameLink.setDescription(i18n.getMessage("dashboard.rollouts.caption"));
    rolloutNameLink.addClickListener(value -> showRolloutGroupListView());

    final HorizontalLayout headerCaptionLayout = new HorizontalLayout();
    headerCaptionLayout.addComponent(rolloutsListViewLink);
    headerCaptionLayout.addComponent(new Label(">"));
    headerCaptionLayout.addComponent(rolloutNameLink);
    headerCaptionLayout.addComponent(new Label("> "));
    headerCaptionLayout.addComponent(headerCaption);

    return headerCaptionLayout;
}
 
Example 2
Source File: RolloutGroupsListHeader.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
@Override
protected HorizontalLayout getHeaderCaptionLayout() {
    headerCaption = new LabelBuilder().id(UIComponentIdProvider.ROLLOUT_GROUP_HEADER_CAPTION).name("")
            .buildCaptionLabel();
    final Button rolloutsListViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null,
            SPUIButtonStyleNoBorder.class);
    rolloutsListViewLink.setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links");
    rolloutsListViewLink.setDescription(i18n.getMessage("message.rollouts"));
    rolloutsListViewLink.setCaption(i18n.getMessage("message.rollouts"));
    rolloutsListViewLink.addClickListener(value -> showRolloutListView());

    final HorizontalLayout headerCaptionLayout = new HorizontalLayout();
    headerCaptionLayout.addComponent(rolloutsListViewLink);
    headerCaptionLayout.addComponent(new Label(">"));
    headerCaption.addStyleName("breadcrumbPaddingLeft");
    headerCaptionLayout.addComponent(headerCaption);

    return headerCaptionLayout;
}
 
Example 3
Source File: DistributionTable.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private Button createPinBtn(final Object itemId) {

        final Item item = getContainerDataSource().getItem(itemId);
        final String name = (String) item.getItemProperty(SPUILabelDefinitions.VAR_NAME).getValue();

        final String version = (String) item.getItemProperty(SPUILabelDefinitions.VAR_VERSION).getValue();
        final DistributionSetIdName distributionSetIdName = new DistributionSetIdName((Long) itemId, name, version);

        final Button pinBtn = new Button();
        pinBtn.setIcon(FontAwesome.THUMB_TACK);
        pinBtn.setHeightUndefined();
        pinBtn.addStyleName(getPinStyle());
        pinBtn.setData(distributionSetIdName);
        pinBtn.setId(getPinButtonId(name, version));
        pinBtn.setImmediate(true);
        pinBtn.setDescription(getI18n().getMessage(UIMessageIdProvider.TOOLTIP_DISTRIBUTION_SET_PIN));
        return pinBtn;
    }
 
Example 4
Source File: TargetTable.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private Button getTagetPinButton(final Object itemId) {
    final Button pinBtn = new Button();
    final String controllerId = (String) getContainerDataSource().getItem(itemId)
            .getItemProperty(SPUILabelDefinitions.VAR_CONT_ID).getValue();
    final TargetIdName pinnedTarget = new TargetIdName((Long) itemId, controllerId);
    final StringBuilder pinBtnStyle = new StringBuilder(ValoTheme.BUTTON_BORDERLESS_COLORED);
    pinBtnStyle.append(' ');
    pinBtnStyle.append(ValoTheme.BUTTON_SMALL);
    pinBtnStyle.append(' ');
    pinBtnStyle.append(ValoTheme.BUTTON_ICON_ONLY);
    pinBtn.setStyleName(pinBtnStyle.toString());
    pinBtn.setHeightUndefined();
    pinBtn.setData(pinnedTarget);
    pinBtn.setId(UIComponentIdProvider.TARGET_PIN_ICON + controllerId);
    pinBtn.addClickListener(this::addPinClickListener);
    pinBtn.setDescription(getI18n().getMessage(UIMessageIdProvider.TOOLTIP_TARGET_PIN));
    if (isPinned(pinnedTarget)) {
        pinBtn.addStyleName(TARGET_PINNED);
        targetPinned = Boolean.TRUE;
        targetPinnedBtn = pinBtn;
        getEventBus().publish(this, PinUnpinEvent.PIN_TARGET);
    }
    pinBtn.addStyleName(SPUIStyleDefinitions.TARGET_STATUS_PIN_TOGGLE);
    HawkbitCommonUtil.applyStatusLblStyle(this, pinBtn, itemId);
    return pinBtn;
}
 
Example 5
Source File: TargetDetails.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private Button buildRequestAttributesUpdateButton(final String controllerId, final boolean isRequestAttributes) {
    final Button requestAttributesUpdateButton = SPUIComponentProvider.getButton(
            UIComponentIdProvider.TARGET_ATTRIBUTES_UPDATE, "", "", "", false, FontAwesome.REFRESH,
            SPUIButtonStyleNoBorder.class);

    requestAttributesUpdateButton.addClickListener(e -> targetManagement.requestControllerAttributes(controllerId));

    if (isRequestAttributes) {
        requestAttributesUpdateButton
                .setDescription(getI18n().getMessage("tooltip.target.attributes.update.requested"));
        requestAttributesUpdateButton.setEnabled(false);
    } else {
        requestAttributesUpdateButton
                .setDescription(getI18n().getMessage("tooltip.target.attributes.update.request"));
        requestAttributesUpdateButton.setEnabled(true);
    }

    return requestAttributesUpdateButton;
}
 
Example 6
Source File: AbstractFilterButtons.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private Button addUpdateCell(final Object itemId) {
    if (itemId instanceof TagIdName && noTagLabel.equals(((TagIdName) itemId).getName())) {
        return null;
    }

    final Button editButton = SPUIComponentProvider.getButton("", "", "", "", true, FontAwesome.EDIT,
            SPUIButtonStyleNoBorder.class);
    if (itemId instanceof TagIdName) {
        editButton.setId(UIComponentIdProvider.UPDATE_TAG_ID + ((TagIdName) itemId).getName());
    } else {
        editButton.setId(UIComponentIdProvider.UPDATE_TAG_ID + itemId.toString());
    }
    editButton.setDescription(SPUIDefinitions.EDIT);
    editButton.addClickListener(this::addEditButtonClickListener);
    return editButton;
}
 
Example 7
Source File: PolicyWorkspace.java    From XACML with MIT License 6 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutRightToolbar() {
	// common part: create layout
	horizontalLayoutRightToolbar = new HorizontalLayout();
	horizontalLayoutRightToolbar.setImmediate(false);
	horizontalLayoutRightToolbar.setWidth("100.0%");
	horizontalLayoutRightToolbar.setHeight("-1px");
	horizontalLayoutRightToolbar.setMargin(false);
	horizontalLayoutRightToolbar.setSpacing(true);
	
	// buttonRight
	buttonRight = new Button();
	buttonRight.setCaption(">>");
	buttonRight.setImmediate(true);
	buttonRight.setDescription("Restore left panel.");
	buttonRight.setWidth("-1px");
	buttonRight.setHeight("-1px");
	horizontalLayoutRightToolbar.addComponent(buttonRight);
	
	return horizontalLayoutRightToolbar;
}
 
Example 8
Source File: CreateOrUpdateFilterHeader.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private Button createBreadcrumbButton() {
    final Button createFilterViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null,
            SPUIButtonStyleNoBorder.class);
    createFilterViewLink.setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links");
    createFilterViewLink.setDescription(i18n.getMessage(BREADCRUMB_CUSTOM_FILTERS));
    createFilterViewLink.setCaption(i18n.getMessage(BREADCRUMB_CUSTOM_FILTERS));
    createFilterViewLink.addClickListener(value -> showCustomFiltersView());

    return createFilterViewLink;
}
 
Example 9
Source File: TargetFilterQueryButtons.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private Button createFilterButton(final Long id, final String name, final Object itemId) {
    final Button button = SPUIComponentProvider.getButton("", name, name, "", false, null,
            SPUITagButtonStyle.class);
    button.addStyleName("custom-filter-button");
    button.setId(name);
    if (id != null) {
        button.setCaption(name);
    }
    //After Vaadin 8 migration: Enable tooltip again, currently it is set to [null] to avoid cross site scripting.
    button.setDescription(null);
    button.setData(itemId);
    button.addClickListener(event -> customTargetTagFilterButtonClick.processButtonClick(event));
    return button;
}
 
Example 10
Source File: JobLogTable.java    From chipster with MIT License 5 votes vote down vote up
public Component generateCell(Table source, final Object itemId,
		Object columnId) {

	Property<?> prop = source.getItem(itemId).getItemProperty(JobLogContainer.ERROR_MESSAGE);
	if (prop != null && prop.getType() != null && prop.getType().equals(String.class)) {

		String errorMessage = (String) prop.getValue();

		if (errorMessage != null) {

			Button link = new Button();
			link.setIcon(new ThemeResource("../admin/crystal/agt_update_critical.png"));
			link.setStyleName(BaseTheme.BUTTON_LINK);
			link.setDescription("Show job error message");

			link.addClickListener(new Button.ClickListener() {

				public void buttonClick(ClickEvent event) {

					select(itemId);
					view.showErrorOutput(itemId);
				}
			});

			return link;
		}
	}

	return null;
}
 
Example 11
Source File: OaExpressionsEditorComponent.java    From XACML with MIT License 5 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("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// buttonadd
	buttonadd = new Button();
	buttonadd.setCaption("Add");
	buttonadd.setImmediate(true);
	buttonadd.setWidth("-1px");
	buttonadd.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonadd);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove selected expression(s).");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonRemove);
	
	return horizontalLayout_1;
}
 
Example 12
Source File: AdminUI.java    From sensorhub with Mozilla Public License 2.0 5 votes vote down vote up
protected Component buildToolbar()
{
    HorizontalLayout toolbar = new HorizontalLayout();
    toolbar.setWidth(100.0f, Unit.PERCENTAGE);
    
    // apply changes button
    Button saveButton = new Button("Save Config");
    saveButton.setDescription("Save Config");
    saveButton.setIcon(UIConstants.APPLY_ICON);
    saveButton.addStyleName(UIConstants.STYLE_SMALL);
    saveButton.setWidth(100.0f, Unit.PERCENTAGE);
    
    // apply button action
    saveButton.addClickListener(new Button.ClickListener() {
        private static final long serialVersionUID = 1L;
        public void buttonClick(ClickEvent event)
        {
            try
            {
                SensorHub.getInstance().getModuleRegistry().saveModulesConfiguration();
            }
            catch (Exception e)
            {
                AdminUI.log.error("Error while saving SensorHub configuration", e);
                Notification.show("Error", e.getMessage(), Notification.Type.ERROR_MESSAGE);
            }
        }
    });        

    toolbar.addComponent(saveButton);
    return toolbar;
}
 
Example 13
Source File: PolicyWorkspace.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutLeftToolbar() {
	// common part: create layout
	horizontalLayoutLeftToolbar = new HorizontalLayout();
	horizontalLayoutLeftToolbar.setImmediate(false);
	horizontalLayoutLeftToolbar.setWidth("100.0%");
	horizontalLayoutLeftToolbar.setHeight("-1px");
	horizontalLayoutLeftToolbar.setMargin(false);
	horizontalLayoutLeftToolbar.setSpacing(true);
	
	// horizontalLayoutLeftToolbarLeft
	horizontalLayoutLeftToolbarLeft = buildHorizontalLayoutLeftToolbarLeft();
	horizontalLayoutLeftToolbar
			.addComponent(horizontalLayoutLeftToolbarLeft);
	
	// buttonLeft
	buttonLeft = new Button();
	buttonLeft.setCaption("<<");
	buttonLeft.setImmediate(true);
	buttonLeft.setDescription("Minimize left panel.");
	buttonLeft.setWidth("-1px");
	buttonLeft.setHeight("-1px");
	horizontalLayoutLeftToolbar.addComponent(buttonLeft);
	horizontalLayoutLeftToolbar.setComponentAlignment(buttonLeft,
			new Alignment(34));
	
	return horizontalLayoutLeftToolbar;
}
 
Example 14
Source File: JobLogFilter.java    From chipster with MIT License 4 votes vote down vote up
public JobLogFilter(final JobLogView view, String column, String search) {
	this.view = view;

	searchStringField = new TextField();
	if (search != null) {
		searchStringField.setValue(search);
	}
	searchStringField.setDescription("Search for values starting with this string. Question mark (?) is a wildcard for a single character and asterisk (*) for any number of characters.");  
	searchStringField.addShortcutListener(new ShortcutListener("Search", ShortcutAction.KeyCode.ENTER, null) {

		@Override
		public void handleAction(Object sender, Object target) {
			view.update();
		}
	});

	columnToSearch = new NativeSelect();

	Button clearButton = new Button();
	clearButton.setIcon(new ThemeResource("crystal/button_cancel-bw.png"));
	clearButton.setDescription("Remove filter");
	clearButton.addStyleName("search-button");

	for (int i = 0; i < JobLogContainer.NATURAL_COL_ORDER.length; i++) {

		//Do not search from generated columns
		if (SEARCH_COLUMNS.contains(JobLogContainer.NATURAL_COL_ORDER[i])) {
			columnToSearch.addItem(JobLogContainer.NATURAL_COL_ORDER[i]);
			columnToSearch.setItemCaption(JobLogContainer.NATURAL_COL_ORDER[i],
					JobLogContainer.COL_HEADERS_ENGLISH[i]);
		}
	}

	if (column != null) {
		columnToSearch.setValue(column);
	} else {
		columnToSearch.setValue(JobLogContainer.USERNAME);
	}
	columnToSearch.setNullSelectionAllowed(false);

	clearButton.addClickListener(new Button.ClickListener() {
		public void buttonClick(ClickEvent event) {
			getView().clearFilter(JobLogFilter.this);
		}
	});

	addComponent(columnToSearch);
	addComponent(searchStringField);
	addComponent(clearButton);

	addStyleName("search-filter-bg");
	addStyleName("search-filter");
}
 
Example 15
Source File: EnumerationEditorComponent.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("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// buttonAdd
	buttonAdd = new Button();
	buttonAdd.setCaption("Add");
	buttonAdd.setImmediate(true);
	buttonAdd.setDescription("Add a new enumeration value.");
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonAdd);
	horizontalLayout_1.setComponentAlignment(buttonAdd, new Alignment(9));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove the selected enumeration value.");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonRemove);
	horizontalLayout_1.setComponentAlignment(buttonRemove,
			new Alignment(10));
	
	// buttonClearAll
	buttonClearAll = new Button();
	buttonClearAll.setCaption("Clear All");
	buttonClearAll.setImmediate(false);
	buttonClearAll.setDescription("Clears all the values out.");
	buttonClearAll.setWidth("-1px");
	buttonClearAll.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonClearAll);
	
	return horizontalLayout_1;
}
 
Example 16
Source File: WinLogin.java    From primecloud-controller with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void attach() {
    // Window
    setIcon(Icons.LOGIN.resource());
    setCaption(ViewProperties.getCaption("window.login"));
    setModal(true);
    setWidth("300px");
    setResizable(false);
    setClosable(false);

    // Layout
    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setMargin(true);
    layout.setSpacing(true);

    // Form
    Form form = new Form();
    form.addStyleName("form-login");

    // ユーザ名
    usernameField = new TextField(ViewProperties.getCaption("field.userName"));
    usernameField.setWidth("90%");
    usernameField.focus(); // フォーカスを設定
    usernameField.setRequired(true);
    usernameField.setRequiredError(ViewMessages.getMessage("IUI-000019"));
    form.getLayout().addComponent(usernameField);

    // パスワード
    passwordField = new TextField(ViewProperties.getCaption("field.password"));
    passwordField.setSecret(true);
    passwordField.setWidth("90%");
    passwordField.setRequired(true);
    passwordField.setRequiredError(ViewMessages.getMessage("IUI-000020"));
    form.getLayout().addComponent(passwordField);

    layout.addComponent(form);

    // ログインボタン
    Button loginButton = new Button(ViewProperties.getCaption("button.login"));
    loginButton.setDescription(ViewProperties.getCaption("description.login"));
    loginButton.addListener(new ClickListener() {
        public void buttonClick(ClickEvent event) {
            loginButtonClick(event);
        }
    });
    loginButton.setClickShortcut(KeyCode.ENTER);

    layout.addComponent(loginButton);
    layout.setComponentAlignment(loginButton, "right");
}
 
Example 17
Source File: SensorAdminPanel.java    From sensorhub with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public void build(final MyBeanItem<ModuleConfig> beanItem, final ISensorModule<?> module)
{
    super.build(beanItem, module);       
    
    // add section label
    final GridLayout form = new GridLayout();
    form.setWidth(100.0f, Unit.PERCENTAGE);
    form.setMargin(false);
    form.setSpacing(true);
    
    // section title
    form.addComponent(new Label(""));
    HorizontalLayout titleBar = new HorizontalLayout();
    titleBar.setSpacing(true);
    Label sectionLabel = new Label("Inputs/Outputs");
    sectionLabel.addStyleName(STYLE_H3);
    sectionLabel.addStyleName(STYLE_COLORED);
    titleBar.addComponent(sectionLabel);
    titleBar.setComponentAlignment(sectionLabel, Alignment.MIDDLE_LEFT);
    
    // refresh button to show latest record
    Button refreshButton = new Button("Refresh");
    refreshButton.setDescription("Load latest data from sensor");
    refreshButton.setIcon(REFRESH_ICON);
    refreshButton.addStyleName(STYLE_QUIET);
    titleBar.addComponent(refreshButton);
    titleBar.setComponentAlignment(refreshButton, Alignment.MIDDLE_LEFT);
    refreshButton.addClickListener(new ClickListener() {
        private static final long serialVersionUID = 1L;
        @Override
        public void buttonClick(ClickEvent event)
        {
            rebuildSwePanels(form, module);
        }
    });
            
    form.addComponent(titleBar);
    
    // add I/O panel
    rebuildSwePanels(form, module);
    addComponent(form);
}
 
Example 18
Source File: StorageAdminPanel.java    From sensorhub with Mozilla Public License 2.0 4 votes vote down vote up
@Override
public void build(final MyBeanItem<ModuleConfig> beanItem, final IRecordStorageModule<?> storage)
{
    super.build(beanItem, storage);       
    
    if (storage != null)
    {            
        // section layout
        final GridLayout form = new GridLayout();
        form.setWidth(100.0f, Unit.PERCENTAGE);
        form.setMargin(false);
        form.setSpacing(true);
        
        // section title
        form.addComponent(new Label(""));
        HorizontalLayout titleBar = new HorizontalLayout();
        titleBar.setSpacing(true);
        Label sectionLabel = new Label("Data Store Content");
        sectionLabel.addStyleName(STYLE_H3);
        sectionLabel.addStyleName(STYLE_COLORED);
        titleBar.addComponent(sectionLabel);
        titleBar.setComponentAlignment(sectionLabel, Alignment.MIDDLE_LEFT);
        
        // refresh button to show latest record
        Button refreshButton = new Button("Refresh");
        refreshButton.setDescription("Reload data from storage");
        refreshButton.setIcon(REFRESH_ICON);
        refreshButton.addStyleName(STYLE_QUIET);
        titleBar.addComponent(refreshButton);
        titleBar.setComponentAlignment(refreshButton, Alignment.MIDDLE_LEFT);
        refreshButton.addClickListener(new ClickListener() {
            private static final long serialVersionUID = 1L;
            @Override
            public void buttonClick(ClickEvent event)
            {
                buildDataPanel(form, storage);
            }
        });
                
        form.addComponent(titleBar);
        
        // add I/O panel
        buildDataPanel(form, storage);
        addComponent(form);
    }
}
 
Example 19
Source File: ObadviceDictionary.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(false);
	horizontalLayoutToolbar.setSpacing(true);
	
	// buttonNew
	buttonNew = new Button();
	buttonNew.setCaption("New");
	buttonNew.setImmediate(true);
	buttonNew
			.setDescription("Add a new advice or obligation to the dictionary.");
	buttonNew.setWidth("-1px");
	buttonNew.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonNew);
	horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(
			24));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove
			.setDescription("Remove the selected advice or obligation from the dictionary.");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	horizontalLayoutToolbar.setComponentAlignment(buttonRemove,
			new Alignment(24));
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(true);
	buttonClone.setDescription("Clone the selected obligation/advice.");
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	horizontalLayoutToolbar.setComponentAlignment(buttonClone,
			new Alignment(24));
	
	// comboBoxFilter
	comboBoxFilter = new ComboBox();
	comboBoxFilter.setCaption("Filter By Type");
	comboBoxFilter.setImmediate(false);
	comboBoxFilter.setWidth("-1px");
	comboBoxFilter.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilter);
	
	return horizontalLayoutToolbar;
}
 
Example 20
Source File: PIPManagement.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(false);
	horizontalLayoutToolbar.setSpacing(true);
	
	// buttonAdd
	buttonAdd = new Button();
	buttonAdd.setCaption("Add Configuration");
	buttonAdd.setImmediate(true);
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonAdd);
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone Configuration");
	buttonClone.setImmediate(true);
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove Configuration");
	buttonRemove.setImmediate(true);
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	
	// buttonImport
	buttonImport = new Button();
	buttonImport.setCaption("Import Configuration");
	buttonImport.setImmediate(false);
	buttonImport
			.setDescription("Imports a configuration from a properties file.");
	buttonImport.setWidth("-1px");
	buttonImport.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonImport);
	
	return horizontalLayoutToolbar;
}