Java Code Examples for com.google.gwt.user.client.ui.HTML#setHeight()

The following examples show how to use com.google.gwt.user.client.ui.HTML#setHeight() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DiagramTab.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
private HTML buildSliderPart(String width, String height, String cursor, String color, double transparancy) {
    HTML container = new HTML();
    container.setWidth(width);
    container.setHeight(height);
    DOM.setStyleAttribute(container.getElement(), "cursor", cursor);
    DOM.setStyleAttribute(container.getElement(), "backgroundColor", color);

    // transparency styling (see also bug#449 and http://www.quirksmode.org/css/opacity.html)
    // note: since GWT complains, '-msFilter' has to be in plain camelCase (w/o '-')
    // ordering is important here
    DOM.setStyleAttribute(container.getElement(), "opacity", Double.toString(transparancy));
    DOM.setStyleAttribute(container.getElement(), "mozOpacity", Double.toString(transparancy));
    String opacity = "(opacity=" +Double.toString(transparancy*100) + ")";
    DOM.setStyleAttribute(container.getElement(), "msFilter", "\"progid:DXImageTransform.Microsoft.Alpha"+ opacity + "\"");
    DOM.setStyleAttribute(container.getElement(), "filter", "alpha" + opacity);
    return container;
}
 
Example 2
Source File: WordCloudDetailApp.java    From swcv with MIT License 5 votes vote down vote up
private SimplePanel createPanel(String svg, int width, int height)
{
    SimplePanel panel = new SimplePanel();
    panel.setPixelSize(width, height);
    panel.addStyleName("center");
    HTML html = new HTML(svg);
    html.setWidth("100%");
    html.setHeight("100%");
    panel.add(html);
    return panel;
}
 
Example 3
Source File: Util.java    From document-management-system with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates an square spacer
 *
 * @param width  The desired width space
 * @param height The desired height space
 * @return an HTML element meaning the with and height
 */
public static HTML space(String width, String height) {
	HTML spacer = new HTML("");
	spacer.setWidth(width);
	spacer.setHeight(height);
	return spacer;
}
 
Example 4
Source File: Util.java    From document-management-system with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates an vertical spacer
 *
 * @param height The desired height space
 * @return an HTML element meaning the height
 */
public static HTML vSpace(String height) {
	HTML spacer = new HTML("");
	spacer.setHeight(height);
	return spacer;
}