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

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

Introduction

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

Prototype

public void setText(String text) 

Source Link

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());
    applystyle(button);/*from   w  w w  .j a v a  2s . c o m*/
    // 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);
    }
}