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

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

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

Widget.isVisible介绍

暂无

代码示例

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

@Override
public boolean isVisible() {
  return widget.isVisible();
}

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

@Override
public boolean isVisible() {
  return widget.isVisible();
}

代码示例来源:origin: stackoverflow.com

public boolean isVisible(Widget w) {
   while (w.getElement().hasParentElement()) {
     if (w.isVisible()) {
       return true;
     }
     w = w.getParent();
   }
   return w.isVisible();
 }

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

/***************************************
 * Check if the component is visible.
 *
 * @return TRUE if visible
 */
public boolean isVisible()
{
  return getWidget().isVisible();
}

代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library

/**
 * Gives realistic visibility (parent chain considered, ...)
 * If you need logical visibility of this particular widget,
 * use {@link UIObject#isVisible(Element elem)}
 */
@Override
public boolean isVisible() {
  return super.isVisible() && JQMCommon.isVisible(this);
}

代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone

/**
 * Gives realistic visibility (parent chain considered, ...)
 * If you need logical visibility of this particular widget,
 * use {@link UIObject#isVisible(Element elem)}
 */
@Override
public boolean isVisible() {
  return super.isVisible() && JQMCommon.isVisible(this);
}

代码示例来源:origin: oVirt/ovirt-engine

private boolean anyMenuItemVisible() {
  return actionItemMap.values().stream().anyMatch(actionButton ->
    actionKebab.containsMenuItem(actionButton) && actionButton.asWidget().isVisible()
  );
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

public boolean isOpen() {
  String id = getId();
  if (id != null && !id.isEmpty()) {
    Widget toast = RootPanel.get(id);
    return toast.isAttached() && toast.isVisible();
  }
  return false;
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material

public boolean isOpen() {
  String id = getId();
  if (id != null && !id.isEmpty()) {
    Widget toast = RootPanel.get(id);
    return toast.isAttached() && toast.isVisible();
  }
  return false;
}

代码示例来源:origin: org.codehaus.sonar/sonar-gwt-api

public void toggle() {
 boolean visible = expandOrCollapse.isVisible();
 setText(getLinkLabel(visible));
 expandOrCollapse.setVisible(!visible);
}

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

public boolean isVisibleInHierarchy() {
  boolean isVisible = isVisible();
  Widget current = getParent();
  while (isVisible && current != null) {
    isVisible &= current.isVisible();
    current = current.getParent();
  }
  return isVisible;
}

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3-extras

@Override
public boolean isVisible() {
  if (isAttached()) {
    return isVisible(getElement().getParentElement().getParentElement());
  }
  return super.isVisible();
}

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3-extras

@Override
public boolean isVisible() {
  if (isAttached()) {
    return isVisible(getElement().getParentElement().getParentElement());
  }
  return super.isVisible();
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material

@Override
public void setFlexDirection(FlexDirection flexDirection) {
  boolean isCurrentlyVisible = uiObject.isVisible();
  if (flexDirection != null) {
    setDisplay(Display.FLEX);
  }
  BrowserPrefixHelper.updateStyleProperties(uiObject.getElement(),
      new String[]{"MsFlexDirection", "WebkitFlexDirection", "MozFlexDirection", "flexDirection"},
      flexDirection != null ? flexDirection.getValue() : null);
  // Updating the display to Flex will set display:flex and override the visibility of the control
  // this ensures that if you setVisible(false) it will not become visible unless calling setVisible(true)
  if (!isCurrentlyVisible) {
    setVisible(false);
  }
}

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

public void execute() {
  if (getParent().isVisible())
   setPixelSize(getParent().getOffsetWidth(), getParent().getOffsetHeight());
 }
});

代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib

public static boolean hasDragWentOver(DropObject dropObject, int mouseClientPositionX, int mouseClientPositionY){
  if (!dropObject.isDragOver()) {	
    Widget dropzoneWidget = dropObject.getSourceWidget();
    if (	dropzoneWidget.isAttached() &&
        dropzoneWidget.isVisible() &&
        DOMUtil.isMouseCursorWithinElement(dropzoneWidget.getElement(), mouseClientPositionX, mouseClientPositionY)) {
      dropObject.setDragOver(true);
      return true;
    }
  }
  return false;
}

代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib

public static boolean hasDragWentOut(DropObject dropObject, int mouseClientPositionX, int mouseClientPositionY){
  if (dropObject.isDragOver()) {
    Widget dropzoneWidget = dropObject.getSourceWidget();
    if (	dropzoneWidget.isAttached() &&
        dropzoneWidget.isVisible() &&
        !DOMUtil.isMouseCursorWithinElement(dropzoneWidget.getElement(), mouseClientPositionX, mouseClientPositionY)) {
      dropObject.setDragOver(false);
      return true;
    }
  }
  return false;
}

代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib

public static boolean isDropSuccessful(DragObject dragObject, DropObject dropObject){
  Widget dropzoneWidget = dropObject.getSourceWidget();
  if (	dropzoneWidget.isAttached() &&
      dropzoneWidget.isVisible() &&
      DOMUtil.isMouseCursorWithinElement(dropzoneWidget.getElement(), dragObject.getMouseClientPositionX(), dragObject.getMouseClientPositionY())) {
    return true;
  }
  return false;
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
public void itemChanged(T item) {
  boolean widgetVisible = getView().asWidget().isVisible();
  if (item != null && widgetVisible) {
    placeManager.setFragmentParameters(getFragmentParamsFromEntity(item));
    getView().setMainSelectedItem(item);
  } else if (item == null && widgetVisible && (getMainModel().getItems() == null
      || getMainModel().getItems().isEmpty())) {
    // No selection so we can't positively show anything, switch to grid.
    placeManager.revealPlace(getMainContentRequest());
  }
}

代码示例来源:origin: org.codehaus.sonar/sonar-gwt-api

public ExpandCollapseLink(Widget expandOrCollapse) {
 super();
 this.expandOrCollapse = expandOrCollapse;
 setText(getLinkLabel(!expandOrCollapse.isVisible()));
 getElement().setId("expand-" + expandOrCollapse.getElement().getId());
 setStyleName("expandCollapseLink");
 final ExpandCollapseLink link = this;
 this.addClickListener(new ClickListener() {
  public void onClick(Widget sender) {
   link.toggle();
  }
 });
 getElement().getFirstChildElement().setAttribute("href", "#");
}

相关文章