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

The following examples show how to use com.vaadin.ui.Button#setVisible() . 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: WebPopupButton.java    From cuba with Apache License 2.0 6 votes vote down vote up
protected void actionPropertyChanged(PropertyChangeEvent evt) {
    Action action = (Action) evt.getSource();
    Button button = actionButtons.get(action);

    if (Action.PROP_ICON.equals(evt.getPropertyName())) {
        if (showActionIcons) {
            setPopupButtonIcon(button, action.getIcon());
        } else {
            setPopupButtonIcon(button, null);
        }
    } else if (Action.PROP_CAPTION.equals(evt.getPropertyName())) {
        button.setCaption(action.getCaption());
    } else if (Action.PROP_DESCRIPTION.equals(evt.getPropertyName())) {
        button.setDescription(action.getDescription());
    } else if (Action.PROP_ENABLED.equals(evt.getPropertyName())) {
        button.setEnabled(action.isEnabled());
    } else if (Action.PROP_VISIBLE.equals(evt.getPropertyName())) {
        button.setVisible(action.isVisible());
    }
}
 
Example 2
Source File: DefineGroupsLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private Button createAddButton() {
    final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.ROLLOUT_GROUP_ADD_ID,
            i18n.getMessage("button.rollout.add.group"), "", "", true, FontAwesome.PLUS,
            SPUIButtonStyleNoBorderWithIcon.class);
    button.setSizeUndefined();
    button.addStyleName("default-color");
    button.setEnabled(true);
    button.setVisible(true);
    button.addClickListener(event -> addGroupRowAndValidate());
    return button;

}
 
Example 3
Source File: DefineGroupsLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private Button createRemoveButton() {
    final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.ROLLOUT_GROUP_REMOVE_ID, "", "",
            "", true, FontAwesome.MINUS, SPUIButtonStyleNoBorderWithIcon.class);
    button.setSizeUndefined();
    button.addStyleName("default-color");
    button.setEnabled(true);
    button.setVisible(true);
    button.addClickListener(event -> onRemove());
    return button;
}
 
Example 4
Source File: AbstractTableHeader.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private Button createShowFilterButtonLayout() {
    final Button button = SPUIComponentProvider.getButton(getShowFilterButtonLayoutId(), null,
            i18n.getMessage(UIMessageIdProvider.TOOLTIP_SHOW_TAGS), null, false, FontAwesome.TAGS,
            SPUIButtonStyleNoBorder.class);
    button.setVisible(false);
    button.addClickListener(event -> showFilterButtonsIconClicked());
    return button;
}
 
Example 5
Source File: ChartLayout.java    From usergrid with Apache License 2.0 5 votes vote down vote up
private void addChartItems() {

        UIUtil.addLayout( this, chartId, "left: 270px; top: 20px;", "720px", "550px" );

        nextChartButton = new Button( "..." );
        nextChartButton.setWidth( "150px" );
        nextChartButton.setVisible( false );
        nextChartButton.addClickListener( new Button.ClickListener() {
            public void buttonClick( Button.ClickEvent event ) {
                nextChartButtonClicked();
            }
        } );

        addComponent( nextChartButton, "left: 565px; top: 580px;" );
    }
 
Example 6
Source File: NoteLayout.java    From usergrid with Apache License 2.0 5 votes vote down vote up
private Button createButton(String caption, String position, boolean visible) {

        Button button = UIUtil.addButton(this, caption, position, "50px");
        button.setStyleName(Reindeer.BUTTON_LINK);
        button.setVisible(visible);

        return button;
    }