Java Code Examples for com.google.gwt.dom.client.Style.clearWidth()

The following are Jave code examples for showing how to use clearWidth() of the com.google.gwt.dom.client.Style class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: empiria.player   File: ElementScaler.java   View Source Code Vote up 5 votes
public void setRatio() {
    Style style = element.getStyle();

    style.clearWidth();
    style.clearHeight();

    style.setPaddingTop(initialRatio, Style.Unit.PCT);
}
 
Example 2
Project: appinventor-extensions   File: MockImageBase.java   View Source Code Vote up 5 votes
private void unclipImage() {
  Style style = image.getElement().getStyle();
  style.clearLeft();
  style.clearTop();
  style.clearWidth();
  style.clearHeight();
}
 
Example 3
Project: cuba   File: CubaSuggestPopup.java   View Source Code Vote up 5 votes
public CubaSuggestPopup() {
    Style style = loadingImage.getElement().getStyle();

    style.clearWidth();
    style.clearHeight();
    style.setDisplay(Style.Display.BLOCK);
}
 
Example 4
Project: Wiab.pro   File: ImageThumbnailWidget.java   View Source Code Vote up 5 votes
private void setImageSize() {
  int width = isFullSize?attachmentWidth:thumbnailWidth;
  int height = isFullSize?attachmentHeight:thumbnailHeight;
  image.setPixelSize(width, height);
  //TODO(user,danilatos): Whinge about how declarative UI doesn't let us avoid this hack:
  Style pstyle = image.getElement().getParentElement().getParentElement().getStyle();
  if (width == 0) {
    image.setWidth("");
    pstyle.clearWidth();
  } else {
    pstyle.setWidth(width, Unit.PX);
  }
  if (height == 0) {
    image.setHeight("");
    pstyle.clearHeight();
  } else {
    pstyle.setHeight(height, Unit.PX);
  }

  String url = isFullSize?attachmentUrl:thumbnailUrl;
  if (url != null) {
    if (doubleBufferLoader == null) {
      doubleBufferLoader = new DoubleBufferImage(spin, errorLabel, image);
    }
    doubleBufferLoader.loadImage(url);
    DOM.setStyleAttribute(image.getElement(), "visibility", "");
  }

  // NOTE(user): IE requires that the imageCaptionContainer element has a width
  //   in order to correctly center the caption.
  if (DO_FRAME_WIDTH_UPDATE) {
    captionPanel.getElement().getStyle().setWidth(width, Unit.PX);
  }
}