Example usage for com.google.gwt.user.client.ui DeckLayoutPanel add

List of usage examples for com.google.gwt.user.client.ui DeckLayoutPanel add

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui DeckLayoutPanel add.

Prototype

@Override
    public void add(Widget w) 

Source Link

Usage

From source file:edu.caltech.ipac.firefly.ui.PopoutWidget.java

void showOneView(int showIdx) {

    if (showIdx > _expandedList.size() - 1)
        showIdx = 0;// w  ww .  j  av  a  2  s .c o m

    _popoutUI.reinit(ViewType.ONE, _expandRoot);
    DeckLayoutPanel expandDeck = _popoutUI.getDeck();

    updateExpandRoot(_expandPopout.getAvailableSize());

    for (PopoutWidget popout : _expandedList) {
        GwtUtil.DockLayout.setWidgetChildSize(popout._clickTitlePanel, 0);
        popout._movablePanel.forceLayout();
        popout._stagePanel.setWidget(null);
        popout._movablePanel.setWidth("100%");
        popout._movablePanel.setHeight("100%");
        expandDeck.add(popout._movablePanel);
        GwtUtil.setStyle(popout._movablePanel, "border", "none");
    }

    _expandRoot.forceLayout();
    if (expandDeck.getWidgetCount() > 0)
        expandDeck.showWidget(showIdx);
    onResize();
    if (_expandedList.size() > 1)
        setViewType(ViewType.ONE);
    _popoutUI.updateOneImageNavigationPanel();
    AllPlots.getInstance().updateUISelectedLook();
}

From source file:org.eclipse.che.ide.part.PartStackViewImpl.java

License:Open Source License

@Inject
public PartStackViewImpl(PartStackUIResources resources, final DeckLayoutPanel contentPanel,
        @Assisted @NotNull TabPosition tabPosition, @Assisted @NotNull FlowPanel tabsPanel) {
    this.tabsPanel = tabsPanel;
    this.tabPosition = tabPosition;

    this.contentPanel = contentPanel;
    this.contentPanel.setStyleName(resources.partStackCss().idePartStackContent());
    initWidget(contentPanel);/*from w ww . j a  v a 2  s .c  om*/

    this.tabs = new HashMap<>();

    partViewContainer = new AcceptsOneWidget() {
        @Override
        public void setWidget(IsWidget widget) {
            contentPanel.add(widget);
        }
    };

    addDomHandler(this, MouseDownEvent.getType());
    addDomHandler(this, ContextMenuEvent.getType());
}