com.google.gwt.user.client.ui.Widget.getOffsetWidth()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中com.google.gwt.user.client.ui.Widget.getOffsetWidth()方法的一些代码示例,展示了Widget.getOffsetWidth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.getOffsetWidth()方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Widget
类名称:Widget
方法名:getOffsetWidth

Widget.getOffsetWidth介绍

暂无

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

@Override
 protected int getTargetSize() {
  return target.getOffsetWidth();
 }
}

代码示例来源:origin: de.esoco/gewt

/***************************************
 * Returns the width of this component in pixel.
 *
 * @return The width
 */
public int getWidth()
{
  return getWidget().getOffsetWidth();
}

代码示例来源:origin: com.google.gwt/gwt-servlet

int contentWidth = (w == null) ? 0 : w.getOffsetWidth();

代码示例来源:origin: com.googlecode.mgwt/mgwt

private void checkDOMChanges() {
 if (moved || zoomed || animating || (Math.abs(scrollerWidth - scroller.getOffsetWidth() * scale) < 0.01 && Math.abs(scrollerHeight - scroller.getOffsetHeight() * scale) < 0.01)) {
  return;
 }
 refresh();
}

代码示例来源:origin: org.uberfire/uberfire-widgets-commons

@Override
  public void onResize() {
    int height = getParent().getOffsetHeight() - 30;
    int width = getParent().getOffsetWidth() - 30;
    setPixelSize(width,
           height);
  }
}

代码示例来源:origin: org.uberfire/uberfire-panel-manager-nswe

@Override
  public void onResize() {
    final Widget parent = getParent();
    if ( parent != null ) {
      sp.setPixelSize( parent.getOffsetWidth(),
               parent.getOffsetHeight() );
    }
    super.onResize();
  }
}

代码示例来源:origin: org.kie.uberfire/kie-uberfire-widgets-core-client

@Override
public void onResize() {
  int height = getParent().getOffsetHeight();
  int width = getParent().getOffsetWidth();
  frame.setPixelSize( width, height );
}

代码示例来源:origin: org.uberfire/widget-markdown

@Override
public void onResize() {
  int height = getParent().getOffsetHeight();
  int width = getParent().getOffsetWidth();
  setPixelSize(width, height);
}

代码示例来源:origin: org.uberfire/widgets-core-client

@Override
  public void onResize() {
    int height = getParent().getOffsetHeight();
    int width = getParent().getOffsetWidth();
    panel.setPixelSize( width, height );
  }
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-project-client

@Override
public void onResize() {
  final Widget parent = getParent();
  if (parent != null) {
    final double w = parent.getOffsetWidth();
    final double h = parent.getOffsetHeight();
    setPixelSize((int) w, (int) h);
  }
  editorPanel.onResize();
}

代码示例来源:origin: com.googlecode.mgwt/mgwt

@Override
 public void adjust(Widget main, FlowPanel container) {
  int widgetCount = container.getWidgetCount();
  int offsetWidth = main.getOffsetWidth();
  container.setWidth(widgetCount * offsetWidth + "px");
  for (int i = 0; i < widgetCount; i++) {
   container.getWidget(i).setWidth(offsetWidth + "px");
  }
 }
}

代码示例来源:origin: org.uberfire/widgets-commons

@Override
public void onResize() {
  int height = getParent().getOffsetHeight();
  int width = getParent().getOffsetWidth();
  setPixelSize( width,
         height );
}

代码示例来源:origin: org.uberfire/uberfire-widgets-commons

@Override
public void onResize() {
  final Widget parent = getParent();
  if (parent != null) {
    final int width = parent.getOffsetWidth();
    final int height = parent.getOffsetHeight();
    sp.setPixelSize(width,
            height);
  }
  super.onResize();
}

代码示例来源:origin: org.uberfire/uberfire-panel-manager-nswe

@Override
public void onResize() {
  //It is possible that the SplitterPanel is removed from the DOM before the resize is called
  if ( isAttached() ) {
    final Widget parent = getParent();
    setPixelSize( parent.getOffsetWidth(),
           parent.getOffsetHeight() );
    super.onResize();
  }
}

代码示例来源:origin: org.uberfire/widgets-core-client

@Override
public void onResize() {
  int height = getParent().getOffsetHeight();
  int width = getParent().getOffsetWidth();
  setPixelSize( width,
         height );
  fileContent.onResize();
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-widgets

@Test
  public void testOnResize() {
    when(parent.getOffsetWidth()).thenReturn(WIDTH);
    when(parent.getOffsetHeight()).thenReturn(HEIGHT);

    ((ResizeFlowPanel) view.asWidget()).onResize();

    verify(panel).setPixelSize(WIDTH, HEIGHT);
    verify(panel).doSuperOnResize();
  }
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

private void adjustTextAreaAndFormSizeToScreen() {
  int formHeight = calculateFormHeight();
  form.setHeight(formHeight + "px");
  textWidget.setWidth((form.getOffsetWidth() + getDialogWrapperBorder()[RIGHT] + getDialogWrapperBorder()[LEFT]) + "px");
  textWidget.setHeight(formHeight + "px");
}

代码示例来源:origin: org.optaplanner/optaplanner-wb-solver-editor-client

@Override
public void onResize() {
  int height = getParent().getOffsetHeight();
  int width = getParent().getOffsetWidth();
  setPixelSize(width,
         height);
  editor.setHeight(height + "px");
  editor.redisplay();
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-java-editor-client

@Override
public void onResize() {
  int height = getParent().getOffsetHeight();
  int width = getParent().getOffsetWidth();
  setPixelSize( ensureValidMeasure( width ), ensureValidMeasure( height ) );
  editor.setHeight( ensureValidMeasure( height ) + "px" );
  editor.redisplay();
}

代码示例来源:origin: org.kie.workbench.forms/kie-wb-common-forms-editor-client

@Override
  public void onResize() {
    if (getParent() == null) {
      return;
    }

    double height = getParent().getOffsetHeight() * 0.95;
    double width = getParent().getOffsetWidth();

    editorContent.getStyle().setProperty("height", height + "px");

    container.getStyle().setProperty("width", width + "px");
    container.getStyle().setProperty("height", height + "px");
  }
}

相关文章