List of usage examples for com.vaadin.ui TabSheet.Tab setEnabled
@Override public void setEnabled(boolean enabled)
From source file:com.haulmont.cuba.web.gui.components.WebTabSheet.java
License:Apache License
@Override public void applyPermission(UiPermissionDescriptor permissionDescriptor) { Preconditions.checkNotNullArgument(permissionDescriptor); final String subComponentId = permissionDescriptor.getSubComponentId(); final TabSheet.Tab tab = getTab(subComponentId); if (tab != null) { UiPermissionValue permissionValue = permissionDescriptor.getPermissionValue(); if (permissionValue == UiPermissionValue.HIDE) { tab.setVisible(false);// ww w.j a va2 s .c o m } else if (permissionValue == UiPermissionValue.READ_ONLY) { tab.setEnabled(false); } } else { LoggerFactory.getLogger(WebTabSheet.class).info(String.format("Couldn't find component %s in window %s", subComponentId, permissionDescriptor.getScreenId())); } }