Example usage for com.vaadin.client.ui VButton setEnabled

List of usage examples for com.vaadin.client.ui VButton setEnabled

Introduction

In this page you can find the example usage for com.vaadin.client.ui VButton setEnabled.

Prototype


@Override
public final void setEnabled(boolean enabled) 

Source Link

Document

Sets whether this button is enabled.

Usage

From source file:org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRenderer.java

License:Open Source License

@Override
public void render(RendererCellReference cell, RolloutRendererData text, VButton button) {
    final String creating = "CREATING";
    button.setText(text.getName());//from   www . j a v a  2 s .co m
    applystyle(button);
    // this is to allow the button to disappear, if the text is null
    button.setVisible(text.getName() != null);
    button.getElement().setId(new StringBuilder("link").append(".").append(text.getName()).toString());
    /*
     * checking Rollout Status for applying button style. If Rollout status
     * is not "CREATING", then the Rollout button is applying hyperlink
     * style
     */
    final boolean isStatusCreate = text.getStatus() != null && creating.equalsIgnoreCase(text.getStatus());
    if (isStatusCreate) {
        button.addStyleName(getStyle("boldhide"));
        button.setEnabled(false);
    } else {
        button.setEnabled(true);
    }
}