Search in sources :

Example 1 with TabData

use of com.gwtplatform.mvp.client.TabData in project ovirt-engine by oVirt.

the class AbstractSubTabPanelPresenter method onReveal.

@Override
protected void onReveal() {
    super.onReveal();
    // make sure all detail tabs have their visibility updated
    for (Map.Entry<TabData, Model> entry : detailTabToModelMapping.entrySet()) {
        TabData tabData = entry.getKey();
        Model detailModel = entry.getValue();
        updateTabVisibility(tabData, detailModel);
    }
}
Also used : Model(org.ovirt.engine.ui.uicommonweb.models.Model) TabData(com.gwtplatform.mvp.client.TabData) HashMap(java.util.HashMap) Map(java.util.Map)

Example 2 with TabData

use of com.gwtplatform.mvp.client.TabData in project ovirt-engine by oVirt.

the class AbstractSubTabPanelPresenter method onBind.

@Override
protected void onBind() {
    super.onBind();
    // initialize detail tab to model mappings
    initDetailTabToModelMapping(detailTabToModelMapping);
    // add IsAvailable property change listener for each detail model
    for (Map.Entry<TabData, Model> entry : detailTabToModelMapping.entrySet()) {
        TabData tabData = entry.getKey();
        Model detailModel = entry.getValue();
        detailModel.getPropertyChangedEvent().addListener((ev, sender, args) -> {
            if ("IsAvailable".equals(args.propertyName)) {
                // $NON-NLS-1$
                updateTabVisibility(tabData, detailModel);
            }
        });
    }
}
Also used : Model(org.ovirt.engine.ui.uicommonweb.models.Model) TabData(com.gwtplatform.mvp.client.TabData) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

TabData (com.gwtplatform.mvp.client.TabData)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Model (org.ovirt.engine.ui.uicommonweb.models.Model)2