Example usage for com.google.gwt.widgetideas.graphics.client GWTCanvas TRANSPARENT

List of usage examples for com.google.gwt.widgetideas.graphics.client GWTCanvas TRANSPARENT

Introduction

In this page you can find the example usage for com.google.gwt.widgetideas.graphics.client GWTCanvas TRANSPARENT.

Prototype

Color TRANSPARENT

To view the source code for com.google.gwt.widgetideas.graphics.client GWTCanvas TRANSPARENT.

Click Source Link

Document

Use this constant as a parameter for the #setBackgroundColor(Color) method.

Usage

From source file:com.google.appinventor.client.editor.simple.components.MockBall.java

License:Open Source License

/**
 * Creates a new MockBall component.//from  w  w  w.  j  av  a  2s .  co m
 *
 * @param editor  editor of source file the component belongs to
 */
public MockBall(SimpleEditor editor) {
    super(editor, TYPE, images.ball());

    // Initialize mock ball UI
    ballWidget = new SimplePanel();
    ballWidget.setStylePrimaryName("ode-SimpleMockComponent");

    // Create an appropriately sized ball
    canvas = new GWTCanvas(diameter, diameter);
    canvas.setPixelSize(diameter, diameter);
    canvas.setBackgroundColor(GWTCanvas.TRANSPARENT);
    fillCircle();
    ballWidget.setWidget(canvas);

    initComponent(ballWidget);
}

From source file:com.google.gwt.demos.gwtcanvas.client.SuiteDemo.java

License:Apache License

@Override
public void stopDemo() {
    canvas.setBackgroundColor(GWTCanvas.TRANSPARENT);
    if (timer != null) {
        timer.cancel();
    }
}