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

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

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

Widget.setPixelSize介绍

暂无

代码示例

代码示例来源:origin: com.extjs/gxt

@Override
public void setPixelSize(int width, int height) {
 widget.setPixelSize(width, height);
}

代码示例来源:origin: com.extjs/gxt

@Override
public void setSize(int width, int height) {
 widget.setPixelSize(width, height);
}

代码示例来源:origin: fr.lteconsulting/hexa.core

@Override
public void addItem( Widget w, int x, int y, int sx, int sy )
{
  row.add( w, x, y );
  w.setPixelSize( sx, sy );
}

代码示例来源:origin: ltearno/hexa.tools

@Override
public void addItem( Widget w, int x, int y, int sx, int sy )
{
  row.add( w, x, y );
  w.setPixelSize( sx, sy );
}

代码示例来源:origin: fr.lteconsulting/hexa.core

@Override
public void repositionWidget( Widget w, int x, int y, int sx, int sy )
{
  row.setWidgetPosition( w, x, y );
  w.setPixelSize( sx, sy );
}

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

/***************************************
 * Sets the size of the component.
 *
 * @param w The width
 * @param h The height
 */
public void setSize(int w, int h)
{
  getWidget().setPixelSize(w, h);
}

代码示例来源:origin: ltearno/hexa.tools

@Override
public void repositionWidget( Widget w, int x, int y, int sx, int sy )
{
  row.setWidgetPosition( w, x, y );
  w.setPixelSize( sx, sy );
}

代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl

public void setPixelSize(int width, int height) {
  asWidget().setPixelSize(width, height);
}

代码示例来源:origin: org.geomajas/geomajas-gwt-client-impl

public void setPixelSize(int width, int height) {
  asWidget().setPixelSize(width, height);
}

代码示例来源:origin: org.jboss.errai/errai-workspaces

public void callback(Message message) {
    w.setPixelSize(message.get(Double.class, LayoutParts.Width).intValue(),
        message.get(Double.class, LayoutParts.Height).intValue());
  }
});

代码示例来源:origin: org.jboss.errai/errai-workspaces

public void setPixelSize(int width, int height) {
  super.setPixelSize(width, height);
  getWidget().setPixelSize(width, height);
}

代码示例来源:origin: org.jboss.errai/errai-widgets

@Override
 public void setPixelSize(int width, int height) {
  super.setPixelSize(width, height);
  getElement().getStyle().setProperty("width", width + "px");
  getElement().getStyle().setProperty("height", height + "px");
 }
}

代码示例来源:origin: org.jresearch.commons.gxt.calendar/org.jresearch.commons.gxt.calendar.widget

private void addItem(final EventPanel<T> item, final int offset, final int row, final int width) {
  if (item != null) {
    applyStyles(item);
    item.asWidget().setPixelSize(width, -1);
    container.add(item, offset, weekOffset + row * eventHeight);
  }
}

代码示例来源:origin: org.jresearch.commons.gxt.calendar/org.jresearch.commons.gxt.calendar.widget

private void paintEvent(final EventPanel<T> event, final List<EventPanel<T>> repainted) {
  // check overlapping
  final List<EventPanel<T>> overlap = getOverlapping(event, repainted);
  final int w = (getOffsetWidth() - EVENT_RIGHT_OFFSET) / overlap.size();
  int x = 0;
  for (final EventPanel<T> panel : overlap) {
    panel.asWidget().setPixelSize(w, getHeightParameter(panel));
    add(panel, x, getYParameter(panel));
    x += w;
    repainted.add(panel);
  }
}

代码示例来源:origin: org.jboss.errai/errai-workspaces

public void setPixelSize(int width, int height) {
  super.setPixelSize(width, height);
  int deckPanelHeight = height - tabBar.getOffsetHeight();
  deckPanel.setPixelSize(width, deckPanelHeight);
  for (int i = 0; i < deckPanel.getWidgetCount(); i++) {
    deckPanel.getWidget(i).setPixelSize(width, deckPanelHeight);
  }
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

child.setPixelSize(width,
          height);
Layouts.setToFillParent(child);
    for (int i = 0; i < tabPane.getWidgetCount(); i++) {
      final Widget tabChild = tabPane.getWidget(i);
      tabChild.setPixelSize(width,
                 height);
      Layouts.setToFillParent(tabChild);

代码示例来源:origin: kiegroup/appformer

child.setPixelSize(width,
          height);
Layouts.setToFillParent(child);
    for (int i = 0; i < tabPane.getWidgetCount(); i++) {
      final Widget tabChild = tabPane.getWidget(i);
      tabChild.setPixelSize(width,
                 height);
      Layouts.setToFillParent(tabChild);

代码示例来源:origin: org.jboss.errai/errai-workspaces

public static void hintAll() {
    LayoutHintProvider p;
    for (String s : MANAGED_SUBJECTS.keySet()) {
      if ((p = findProvider(s)) != null && p.getWidthHint() > 0 && p.getHeightHint() > 0) {
        MessageBuilder.createMessage()
            .toSubject(s)
            .with(LayoutParts.Width, p.getWidthHint())
            .with(LayoutParts.Height, p.getHeightHint())
            .noErrorHandling().sendNowWith(ErraiBus.get());
      }
    }

    for (Widget w : MANAGED_WIDGETS.keySet()) {
      p = findProvider(w);
      if (p != null && w.isAttached() && p.getWidthHint() > 0 && p.getHeightHint() > 0) {
        w.setPixelSize(p.getWidthHint(), p.getHeightHint());
      }
    }
  }
}

代码示例来源:origin: com.allen-sauer.gwt.dnd/gwt-dnd

/**
 * Called by {@link PickupDragController#dragStart()} to allow subclasses to provide their own
 * drag proxies.
 *
 * @param context the current drag context
 * @return a new drag proxy
 */
protected Widget newDragProxy(DragContext context) {
 AbsolutePanel container = new AbsolutePanel();
 container.getElement().getStyle().setProperty("overflow", "visible");
 WidgetArea draggableArea = new WidgetArea(context.draggable, null);
 for (Widget widget : context.selectedWidgets) {
  WidgetArea widgetArea = new WidgetArea(widget, null);
  Widget proxy = new SimplePanel();
  proxy.setPixelSize(widget.getOffsetWidth(), widget.getOffsetHeight());
  proxy.addStyleName(DragClientBundle.INSTANCE.css().proxy());
  container.add(proxy, widgetArea.getLeft() - draggableArea.getLeft(), widgetArea.getTop()
    - draggableArea.getTop());
 }
 return container;
}

相关文章