List of usage examples for com.vaadin.ui TabSheet.Tab isEnabled
@Override public boolean isEnabled()
From source file:com.haulmont.cuba.web.gui.components.WebComponentsHelper.java
License:Apache License
/** * Tests if component enabled and visible and its container enabled. * * @param child component// w w w .j a va 2 s . com * @return component enabled state */ public static boolean isComponentEnabled(Component child) { if (child.getParent() instanceof TabSheet) { TabSheet tabSheet = (TabSheet) child.getParent(); TabSheet.Tab tab = tabSheet.getTab(child); if (!tab.isEnabled()) { return false; } } return child.isEnabled() && (child.getParent() == null || isComponentEnabled(child.getParent())) && isComponentVisible(child); }