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

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

Introduction

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

Prototype

public Image(SafeUri url, int left, int top, int width, int height) 

Source Link

Document

Creates a clipped image with a specified URL and visibility rectangle.

Usage

From source file:at.ac.fhcampuswien.atom.client.gui.attributes.components.RichTextToolbar.java

License:Open Source License

/** Method to create a Toggle button for the toolbar **/
private ToggleButton createToggleButton(String url, Integer top, Integer left, Integer width, Integer height,
        String tip) {//from w w w.j  a v a 2  s  . c  o  m
    Image extract = new Image(url, left, top, width, height);
    ToggleButton tb = new ToggleButton(extract);
    tb.setHeight(height + "px");
    tb.setWidth(width + "px");
    tb.addClickHandler(evHandler);
    if (tip != null) {
        tb.setTitle(tip);
    }
    return tb;
}

From source file:at.ac.fhcampuswien.atom.client.gui.attributes.components.RichTextToolbar.java

License:Open Source License

/** Method to create a Push button for the toolbar **/
private PushButton createPushButton(String url, Integer top, Integer left, Integer width, Integer height,
        String tip) {/*ww  w  .  j  a  va 2s  .com*/
    Image extract = new Image(url, left, top, width, height);
    PushButton tb = new PushButton(extract);
    tb.setHeight(height + "px");
    tb.setWidth(width + "px");
    tb.addClickHandler(evHandler);
    if (tip != null) {
        tb.setTitle(tip);
    }
    return tb;
}

From source file:com.eaw1805.www.client.widgets.RichTextToolbar.java

License:Open Source License

/**
 * Method to create a Toggle button for the toolbar *
 *///from  w w  w .  j av  a  2 s.com
private ToggleButton createToggleButton(final String url, final Integer top, final Integer left,
        final Integer width, final Integer height, final String tip) {
    final Image extract = new Image(url, left, top, width, height);
    final ToggleButton tb = new ToggleButton(extract);
    tb.setHeight(height + "px");
    tb.setWidth(width + "px");
    tb.addClickHandler(evHandler);
    if (tip != null) {
        tb.setTitle(tip);
    }
    return tb;
}

From source file:com.eaw1805.www.client.widgets.RichTextToolbar.java

License:Open Source License

/**
 * Method to create a Push button for the toolbar *
 *//*from  w  ww  .jav  a 2 s.  com*/
private PushButton createPushButton(final String url, final Integer top, final Integer left,
        final Integer width, final Integer height, final String tip) {
    final Image extract = new Image(url, left, top, width, height);
    final PushButton tb = new PushButton(extract);
    tb.setHeight(height + "px");
    tb.setWidth(width + "px");
    tb.addClickHandler(evHandler);
    if (tip != null) {
        tb.setTitle(tip);
    }
    return tb;
}