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

The following examples show how to use com.google.gwt.dom.client.Style#setPadding() . 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: ViewContainerToElementMapper.java    From jetpad-projectional-open-source with Apache License 2.0 5 votes vote down vote up
public ViewContainerToElementMapper(ViewContainer source, Element target, final boolean eventsDisabled) {
  super(source, target);

  myCtx = new ViewToDomContext() {
    @Override
    public ReadableProperty<Rectangle> visibleArea() {
      return myVisibleArea;
    }

    @Override
    public MapperFactory<View, Element> getFactory() {
      return ViewMapperFactory.factory(this);
    }

    @Override
    public Boolean areEventsDisabled() {
      return eventsDisabled;
    }
  };

  disablePopup(myRootDiv);
  target.appendChild(myRootDiv);
  myRootDiv.setTabIndex(0);

  final Style rootDivStyle = myRootDiv.getStyle();
  rootDivStyle.setPosition(Style.Position.RELATIVE);
  rootDivStyle.setPadding(0, Style.Unit.PX);
  rootDivStyle.setOverflow(Style.Overflow.VISIBLE);
  rootDivStyle.setOutlineStyle(Style.OutlineStyle.NONE);
}