Example usage for com.google.gwt.user.client.ui CustomButton CustomButton

List of usage examples for com.google.gwt.user.client.ui CustomButton CustomButton

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui CustomButton CustomButton.

Prototype

protected CustomButton() 

Source Link

Document

Constructor for CustomButton.

Usage

From source file:org.pentaho.gwt.widgets.client.colorpicker.ColorPalette.java

License:Open Source License

protected void refreshDisplay() {
    // VerticalPanel tempPalettePanel = new VerticalPanel();

    Widget paletteItem = null;/*from ww w . j a  va2 s. c  om*/
    while (mainPanel.getWidgetCount() > 0) {
        mainPanel.remove(0);
    }

    // Generate the palette panel
    for (int row = 0; row < rows; row++) {
        for (int col = 0; col < cols; col++) {
            paletteItem = new CustomButton() {
                {
                    this.setHTML("<div style=\"color: #ff0000; background-color: #ff0000;\">test</div>"); //$NON-NLS-1$

                }
            };
            mainPanel.add(paletteItem);
        }
    }
}