Search in sources :

Example 1 with DialogTabPanel

use of org.ovirt.engine.ui.common.widget.dialog.tab.DialogTabPanel in project ovirt-engine by oVirt.

the class AbstractModeSwitchingPopupWidget method switchMode.

public void switchMode(boolean advanced) {
    Set<Widget> allConfiguredWidgets = widgetConfiguration.getAll().keySet();
    for (Widget widget : allConfiguredWidgets) {
        widget.setVisible(widgetConfiguration.get(widget).isCurrentlyVisible(advanced, createInstanceMode));
    }
    TabListItem activeTab = ((DialogTabPanel) getWidget()).getActiveTab();
    // select the first tab if the selected tab has been hidden
    if (!advanced && widgetConfiguration.getVisibleInAdvanceMode().keySet().contains(activeTab)) {
        ((DialogTabPanel) getWidget()).switchTab(defaultTab);
    }
}
Also used : DialogTabPanel(org.ovirt.engine.ui.common.widget.dialog.tab.DialogTabPanel) Widget(com.google.gwt.user.client.ui.Widget) TabListItem(org.gwtbootstrap3.client.ui.TabListItem)

Aggregations

Widget (com.google.gwt.user.client.ui.Widget)1 TabListItem (org.gwtbootstrap3.client.ui.TabListItem)1 DialogTabPanel (org.ovirt.engine.ui.common.widget.dialog.tab.DialogTabPanel)1