Java 类com.vaadin.ui.SingleComponentContainer 实例源码

项目:hypothesis    文件:SlideContainerFactoryImpl.java   
private void addContainerComponents(SingleComponentContainer container, List<Element> elements,
        SlideContainerPresenter presenter) {
    elements.stream().map(m -> createComponentFromElement(m, presenter)).filter(Objects::nonNull).forEach(e -> {
        Component component = e.getComponent();

        if (elements.size() == 1 && component instanceof Layout) {
            container.setContent((Layout) component);
        } else {
            GridLayout gridLayout = new GridLayout(1, 1);
            gridLayout.setSizeFull();
            container.setContent(gridLayout);
            gridLayout.addComponent(component);
            gridLayout.setComponentAlignment(component, e.getAlignment());
        }
    });
}
项目:holon-vaadin7    文件:DefaultSpringViewNavigator.java   
@Override
public void init(UI ui, SingleComponentContainer container) {
    init(ui, new UriFragmentManager(ui.getPage()), new SingleContainerViewDisplay(container));
}
项目:holon-vaadin7    文件:DefaultViewNavigator.java   
@Override
public Builder viewDisplay(SingleComponentContainer container) {
    this.viewDisplay = new SingleContainerViewDisplay(container);
    return builder();
}
项目:holon-vaadin7    文件:SingleContainerViewDisplay.java   
/**
 * Constructor
 * @param container SingleComponentContainer which content has to be replaced by the view content
 */
public SingleContainerViewDisplay(SingleComponentContainer container) {
    super();
    this.container = container;
}
项目:holon-vaadin    文件:DefaultSpringViewNavigator.java   
@Override
public void init(UI ui, SingleComponentContainer container) {
    init(ui, new UriFragmentManager(ui.getPage()), new SingleComponentContainerViewDisplay(container));
}
项目:holon-vaadin    文件:DefaultViewNavigator.java   
@Override
public Builder viewDisplay(SingleComponentContainer container) {
    this.viewDisplay = new SingleComponentContainerViewDisplay(container);
    return builder();
}
项目:history-api-navigation    文件:CustomViewDisplay.java   
public CustomViewDisplay(final SingleComponentContainer contentNode)
{
    this.contentNode = contentNode;
}
项目:ilves    文件:SiteNavigator.java   
public SiteNavigator(UI ui, SingleComponentContainer container) {
    super(ui, container);
}
项目:mvpcalculator    文件:MVPDiscoveryNavigator.java   
public MVPDiscoveryNavigator(UI ui, SingleComponentContainer container) {
    super(ui, container);
    viewPresenterMap.clear();
    views.clear();
}
项目:holon-vaadin7    文件:SpringViewNavigator.java   
/**
 * Initializes an injected navigator and registers {@link SpringViewProvider} for it.
 * <p>
 * The default navigation state manager (based on URI fragments) is used.
 * </p>
 * <p>
 * Navigation is automatically initiated after {@code UI.init()} if a navigator was created. If at a later point
 * changes are made to the navigator, {@code navigator.navigateTo(navigator.getState())} may need to be explicitly
 * called to ensure the current view matches the navigation state.
 * </p>
 * @param ui The UI to which this Navigator is attached
 * @param container The single component container used to display the views handled by this navigator
 */
void init(UI ui, SingleComponentContainer container);
项目:holon-vaadin7    文件:DefaultViewNavigator.java   
/**
 * Creates a navigator that is tracking the active view using URI fragments of the {@link Page} containing the given
 * UI and replacing the contents of a {@link SingleComponentContainer} with the active view.
 * @param ui The UI to which this Navigator is attached.
 * @param container The SingleComponentContainer whose contents should be replaced with the active view on view
 *        change
 */
public DefaultViewNavigator(UI ui, SingleComponentContainer container) {
    this(ui, new SingleComponentContainerViewDisplay(container));
}
项目:holon-vaadin7    文件:ViewNavigator.java   
/**
 * Set the {@link SingleComponentContainer} which has to used to display {@link View} instances using
 * {@link SingleComponentContainer#setContent(com.vaadin.ui.Component)}.
 * @param container The {@link SingleComponentContainer} which has to used to display {@link View} instances
 * @return this
 */
Builder viewDisplay(SingleComponentContainer container);
项目:holon-vaadin    文件:SpringViewNavigator.java   
/**
 * Initializes an injected navigator and registers {@link SpringViewProvider} for it.
 * <p>
 * The default navigation state manager (based on URI fragments) is used.
 * </p>
 * <p>
 * Navigation is automatically initiated after {@code UI.init()} if a navigator was created. If at a later point
 * changes are made to the navigator, {@code navigator.navigateTo(navigator.getState())} may need to be explicitly
 * called to ensure the current view matches the navigation state.
 * </p>
 * @param ui The UI to which this Navigator is attached
 * @param container The single component container used to display the views handled by this navigator
 */
void init(UI ui, SingleComponentContainer container);
项目:holon-vaadin    文件:DefaultViewNavigator.java   
/**
 * Creates a navigator that is tracking the active view using URI fragments of the {@link Page} containing the given
 * UI and replacing the contents of a {@link SingleComponentContainer} with the active view.
 * @param ui The UI to which this Navigator is attached.
 * @param container The SingleComponentContainer whose contents should be replaced with the active view on view
 *        change
 */
public DefaultViewNavigator(UI ui, SingleComponentContainer container) {
    this(ui, new SingleComponentContainerViewDisplay(container));
}
项目:holon-vaadin    文件:ViewNavigator.java   
/**
 * Set the {@link SingleComponentContainer} which has to used to display {@link View} instances using
 * {@link SingleComponentContainer#setContent(com.vaadin.ui.Component)}.
 * @param container The {@link SingleComponentContainer} which has to used to display {@link View} instances
 * @return this
 */
Builder viewDisplay(SingleComponentContainer container);
项目:history-api-navigation    文件:HistoryApiNavigatorFactory.java   
/**
 * Creates a navigator that is tracking the active view using the HTML5 History API
 * of the {@link Page} containing the given UI and replacing the contents of
 * a {@link SingleComponentContainer} with the active view.
 * <p>
 * Views must implement {@link Component} when using this constructor.
 * <p>
 * Navigation is automatically initiated after {@code UI.init()} if a
 * navigator was created. If at a later point changes are made to the
 * navigator, {@code navigator.navigateTo(navigator.getState())} may need to
 * be explicitly called to ensure the current view matches the navigation
 * state.
 *
 * @param ui
 *            The UI to which this Navigator is attached.
 * @param container
 *            The SingleComponentContainer whose contents should be replaced
 *            with the active view on view change
 */
public static Navigator createHistoryApiNavigator(final UI ui, final SingleComponentContainer container){
    return createHistoryApiNavigator(
        ui,
        new Navigator.SingleComponentContainerViewDisplay(container));
}
项目:vaadin-fluent-api    文件:FluentSingleComponentContainer.java   
/**
 * Sets the content of this container. The content is a component that
 * serves as the outermost item of the visual contents.
 * 
 * The content should always be set, either as a constructor parameter or by
 * calling this method.
 * 
 * @param content
 *            a component (typically a layout) to use as content
 * @return this (for method chaining)
 * @see SingleComponentContainer#setContent(Component)
 */
@SuppressWarnings("unchecked")
public default THIS withContent(Component content) {
    ((SingleComponentContainer) this).setContent(content);
    return (THIS) this;
}
项目:viritin    文件:MNavigator.java   
/**
 * Creates a navigator that is tracking the active view using URI fragments
 * of the {@link com.vaadin.server.Page} containing the given UI and
 * replacing the contents of a
 * {@link com.vaadin.ui.SingleComponentContainer} with the active view.
 *
 * <p>
 * This constructor is exactly similar to
 * {@link com.vaadin.navigator.Navigator#Navigator(com.vaadin.ui.UI, com.vaadin.ui.SingleComponentContainer)}
 *
 * @param ui the UI for which the Navigator is to be created
 * @param container the component in which the views are to be displayed
 * @see com.vaadin.navigator.Navigator#Navigator(com.vaadin.ui.UI,
 * com.vaadin.ui.SingleComponentContainer)
 */
public MNavigator(UI ui, SingleComponentContainer container) {
    super(ui, container);
}
项目:viritin    文件:FluentSingleComponentContainer.java   
/**
 * Sets the content of this container. The content is a component that
 * serves as the outermost item of the visual contents.
 * 
 * The content should always be set, either as a constructor parameter or by
 * calling this method.
 * 
 * @param content
 *            a component (typically a layout) to use as content
 * @return this (for method chaining)
 * @see SingleComponentContainer#setContent(Component)
 */
public default S withContent(Component content) {
    ((SingleComponentContainer) this).setContent(content);
    return (S) this;
}