当前位置: 首页>>代码示例>>Java>>正文


Java ConnectorHierarchyChangeEvent类代码示例

本文整理汇总了Java中com.vaadin.client.ConnectorHierarchyChangeEvent的典型用法代码示例。如果您正苦于以下问题:Java ConnectorHierarchyChangeEvent类的具体用法?Java ConnectorHierarchyChangeEvent怎么用?Java ConnectorHierarchyChangeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConnectorHierarchyChangeEvent类属于com.vaadin.client包,在下文中一共展示了ConnectorHierarchyChangeEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(
    ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
    Map<Long, Widget> infoWindowContents = new HashMap<>();
    List<ComponentConnector> children = getChildComponents();
    for (ComponentConnector connector : children) {
        for (String style : connector.getState().styles) {
            if (style.startsWith("content-for-infowindow-")) {
                String identifier = style
                    .replace("content-for-infowindow-", "");
                Long id = Long.parseLong(identifier);
                infoWindowContents.put(id, connector.getWidget());
                getWidget().setInfoWindowContents(infoWindowContents);
            }
        }
    }
}
 
开发者ID:tapioaali,项目名称:GoogleMapsVaadin7,代码行数:18,代码来源:GoogleMapConnector.java

示例2: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(
        ConnectorHierarchyChangeEvent event) {
    if (getParent() == null) {
        // Component is removed, skip stuff to save user from JS exceptions
        // and some milliseconds of lost life
        return;
    }

    List<ComponentConnector> oldChildren = event.getOldChildren();

    List<ComponentConnector> children = getChildComponents();
    for (int i = 0; i < children.size(); ++i) {
        ComponentConnector connector = children.get(i);
        Widget widget = connector.getWidget();
        getWidget().addOrMove(widget, i);
        oldChildren.remove(connector);
    }

    for (ComponentConnector oldChild : event.getOldChildren()) {
        if (oldChild.getParent() != this) {
            getWidget().remove(oldChild.getWidget());
        }
    }
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:26,代码来源:VerticalComponentGroupConnector.java

示例3: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
    if (getParent() == null) {
        // Component is removed, skip stuff to save user from JS exceptions
        // and some milliseconds of lost life
        return;
    }

    List<ComponentConnector> children = getChildComponents();
    HorizontalButtonGroupWidget widget = (HorizontalButtonGroupWidget) getWidget();
    widget.clear();
    for (ComponentConnector connector : children) {
        // TODO #13688
        ((HorizontalButtonGroupWidget) getWidget()).add(connector
                .getWidget());
    }
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:18,代码来源:HorizontalButtonGroupConnector.java

示例4: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
    ClientSideFormGroup customComponent = getWidget();
    if (getChildComponents().size() == 1) {
        ComponentConnector connector = getChildComponents().get(0);
        customComponent.setWidget(connector.getWidget(), connector.delegateCaptionHandling());
    } else {
        customComponent.setWidget(null, false);
    }
}
 
开发者ID:knoobie,项目名称:bootstrap-formgroup,代码行数:11,代码来源:FormGroupConnector.java

示例5: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
    // construct component cells with known caption alignment
    getWidget().useInlineCaption = getState().useInlineCaption;

    super.onConnectorHierarchyChange(event);

    if (getState().useInlineCaption && initialStateChangePerformed) {
        updateCaptionSizes();

        // always relayout after caption changes
        getLayoutManager().setNeedsLayout(this);
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:15,代码来源:CubaFieldGroupLayoutConnector.java

示例6: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().clear();

  List<ComponentConnector> childComponents = getChildComponents();
  for (int i = 0; i < childComponents.size(); i++) {
    ComponentConnector connector = childComponents.get(i);
    DockLayoutState.Constraint constraint = getState().myConstraints.get(i);

    Widget widget = GwtUIUtil.fillAndReturn(connector.getWidget());
    GwtDockLayoutImpl dockLayout = getWidget();
    switch (constraint) {
      case TOP:
        dockLayout.add(widget, GwtDockLayoutImpl.NORTH);
        break;
      case BOTTOM:
        dockLayout.add(widget, GwtDockLayoutImpl.SOUTH);
        break;
      case LEFT:
        dockLayout.add(widget, GwtDockLayoutImpl.WEST);
        break;
      case RIGHT:
        dockLayout.add(widget, GwtDockLayoutImpl.EAST);
        break;
      case CENTER:
        dockLayout.add(widget, GwtDockLayoutImpl.CENTER);
        dockLayout.setCellHeight(widget, "100%");
        dockLayout.setCellWidth(widget, "100%");
        break;
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:33,代码来源:GwtDockLayoutImplConnector.java

示例7: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().removeAll();

  List<Widget> widgets = GwtUIUtil.remapWidgets(this);

  for (Widget widget : widgets) {
    getWidget().addButton((GwtToolWindowStripeButton)widget);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:GwtToolWindowStripeConnector.java

示例8: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  Map<TabbedLayoutState.TabState, Widget> map = new LinkedHashMap<>();
  List<Widget> widgets = GwtUIUtil.remapWidgets(this);
  for (int i = 0; i < widgets.size(); i++) {
    map.put(getState().myTabStates.get(i), widgets.get(i));
  }
  getWidget().setTabs(getState().mySelected, map);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:GwtTabbedLayoutImplConnector.java

示例9: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
    if (getParent() == null) {
        // Component is removed, skip stuff to save user from JS exceptions
        // and some milliseconds of lost life
        return;
    }

    List<ComponentConnector> children = getChildComponents();
    navigationBar = (NavigationBarConnector) children.get(0);
    getWidget().setNavigationBar(navigationBar.getWidget());
    getWidget().setContent(children.get(1).getWidget());
    getWidget().setToolbar(
            children.size() < 3 ? null : children.get(2).getWidget());
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:16,代码来源:NavigationViewConnector.java

示例10: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
    if (getParent() == null) {
        // Component is removed, skip stuff to save user from JS exceptions
        // and some milliseconds of lost life
        return;
    }
    List<ComponentConnector> children = getChildComponents();
    
    getWidget().setToolbar(children.get(0).getWidget());

    getWidget().setContent(
            children.size() > 1 ? children.get(1).getWidget() : null);

}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:16,代码来源:TabBarConnector.java

示例11: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(final ConnectorHierarchyChangeEvent event) {
    getWidget().setWidget(getContentWidget());
}
 
开发者ID:melistik,项目名称:vaadin-sliderpanel,代码行数:5,代码来源:SliderPanelConnector.java

示例12: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(final ConnectorHierarchyChangeEvent event) {
	// We always have 1 child, unless the child is hidden
	getWidget().setWidget(getContentWidget());
}
 
开发者ID:bonprix,项目名称:vaadin-scrollable-panel,代码行数:6,代码来源:ScrollablePanelConnector.java

示例13: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
	getWidget().updateChildComponents(getChildComponents());

}
 
开发者ID:jarski,项目名称:LazyList,代码行数:6,代码来源:LazyListConnector.java

示例14: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {

    if(getParent() != null) {
        if (scrollerFollowed == null) {
            scrollerFollowed = resolveScrollingParent();
            if (scrollerFollowed != null) {
                attachScrollingEvents(scrollerFollowed);
            } else {
                LOGGER.severe("Failed to resolve scrolling parent!");
            }
        }
    } else {
        removeScrollingHandlers();
    }

    waitingResponse = false;

    super.onConnectorHierarchyChange(event);

    if(getParent() != null) {

        Widget indicator = getLazyLoadingIndicator();
        if(indicator != null) {
            indicator.getElement().getStyle().setOpacity(0.5);
        }

        // Verify that we do not need to continue loading after hierarchy change
        if(scrollingElement != null) {
            Scheduler.get().scheduleFixedDelay(new Scheduler.RepeatingCommand() {
                @Override
                public boolean execute() {
                    if (!waitingResponse) {
                        if (checkIfLazyRequestRequired(scrollingElement)) {
                            sendLazyLoadRequest();
                        }
                    }
                    return false;
                }
            }, DELAYED_CHECK_AFTER_CHANGE_MS);
        }
    }
}
 
开发者ID:alump,项目名称:LazyLayouts,代码行数:44,代码来源:LazyVerticalLayoutConnector.java

示例15: onConnectorHierarchyChange

import com.vaadin.client.ConnectorHierarchyChangeEvent; //导入依赖的package包/类
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
    if (getState().component != null) {
        getWidget().deferredUpdatePosition();
    }
}
 
开发者ID:Haulmont,项目名称:vaadin-overlays,代码行数:7,代码来源:CustomOverlayConnector.java


注:本文中的com.vaadin.client.ConnectorHierarchyChangeEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。