com.vaadin.client.ConnectorHierarchyChangeEvent Java Examples

The following examples show how to use com.vaadin.client.ConnectorHierarchyChangeEvent. 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: GwtToolWindowStripeConnector.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().removeAll();

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

  for (Widget widget : widgets) {
    getWidget().addButton((GwtToolWindowStripeButton)widget);
  }
}
 
Example #2
Source File: GwtTabbedLayoutImplConnector.java    From consulo with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #3
Source File: CubaFieldGroupLayoutConnector.java    From cuba with Apache License 2.0 5 votes vote down vote up
@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);
    }
}
 
Example #4
Source File: GwtDockLayoutImplConnector.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  GwtDockLayoutImpl dockLayout = getWidget();
  dockLayout.clear();

  boolean noCenterElement = true;
  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());
    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:
        setCenterWidget(dockLayout, widget);
        noCenterElement = false;
        break;
    }
  }

  if (noCenterElement) {
    setCenterWidget(dockLayout, new SimplePanel());
  }
}
 
Example #5
Source File: GwtMenuImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().setChildren(GwtUIUtil.remapWidgets(this));
}
 
Example #6
Source File: GwtWrappedLayoutConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().build(GwtUIUtil.remapWidgets(this));
}
 
Example #7
Source File: GwtToolWindowPanelConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  GwtToolWindowPanel widget = getWidget();

  widget.build(GwtUIUtil.remapWidgets(this));
}
 
Example #8
Source File: GwtThreeComponentSplitLayoutConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addConnectorHierarchyChangeHandler(ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler handler) {
  return null;
}
 
Example #9
Source File: SliderPanelConnector.java    From vaadin-sliderpanel with MIT License 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(final ConnectorHierarchyChangeEvent event) {
    getWidget().setWidget(getContentWidget());
}
 
Example #10
Source File: GwtScrollLayoutImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().clear();
  getWidget().add(getContentWidget());
}
 
Example #11
Source File: GwtHorizontalLayoutImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().setChildren(GwtUIUtil.remapWidgets(this));
}
 
Example #12
Source File: GwtMenuBarImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  addItems(GwtUIUtil.remapWidgets(this), getWidget());
}
 
Example #13
Source File: GwtLabeledLayoutImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().clear();
  getWidget().add(getContentWidget());
}
 
Example #14
Source File: GwtSplitLayoutImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  List<Widget> widgets = GwtUIUtil.remapWidgets(this);

  setWidget(getWidget(), ArrayUtil2.safeGet(widgets, 0), ArrayUtil2.safeGet(widgets, 1));
}
 
Example #15
Source File: GwtVerticalLayoutImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().setChildren(GwtUIUtil.remapWidgets(this));
}
 
Example #16
Source File: GwtRootPanelImplConnector.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  getWidget().setChildren(GwtUIUtil.remapWidgets(this), getState());
}
 
Example #17
Source File: AceEditorConnector.java    From cuba with Apache License 2.0 4 votes vote down vote up
@Override
public void onConnectorHierarchyChange(
		ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
}