private ObjectsTabHandler.SubTab getSubTabOfSubTabPane(Canvas editSource, UsersAndGroupsHandler.MainTab mainTab) { for (Map.Entry<ObjectsTabHandler.SubTab, Tab> subtTabEntry : subTabMap.get(mainTab).entrySet()) { if (subtTabEntry.getValue().getPane().equals(editSource)) { return subtTabEntry.getKey(); } } return null; }
/** * Returns the {@link UsersAndGroupsHandler.MainTab} of the subTab whose Canvas is the attribute. * If no subTab with the required Canvas exists, null is returned. * * @param subTabPane * @return */ private UsersAndGroupsHandler.MainTab getMainTabOfSubTabPane(Canvas subTabPane) { for (Map.Entry<UsersAndGroupsHandler.MainTab, Map<ObjectsTabHandler.SubTab, Tab>> subTabMapEntry : subTabMap.entrySet()) { for (Tab subTab : subTabMapEntry.getValue().values()) { if (subTab.getPane().equals(subTabPane)) { return subTabMapEntry.getKey(); } } } return null; }
public void onEditSessionChange(EditSessionEvent ese) { boolean disabled = ese.isSessionStart(); for (Tab tab : tabset.getTabs()) { if (tab.getPane() == null || !ese.isParentOfRequestee(tab.getPane())) { tab.setDisabled(disabled); } } for (Tab tab : widgetTabset.getTabs()) { if (tab.getPane() == null || !ese.isParentOfRequestee(tab.getPane())) { tab.setDisabled(disabled); } } }
public void onTabSelected(TabSelectedEvent event) { Canvas tab = event.getTab().getPane(); if (tab != null) { ((ManagerTab) tab).readData(); } } });
/** * Returns the {@link UsersAndGroupsHandler.MainTab} of the tab whose Canvas is the attribute. * If no tab with the required Canvas exists, null is returned. * * @param tabPane * @return */ private UsersAndGroupsHandler.MainTab getMainTabOfTabPane(Canvas tabPane) { for (Map.Entry<UsersAndGroupsHandler.MainTab, Tab> tabMapEntry : mainTabsMap.entrySet()) { // main tab is a VPanel for (Canvas child : tabMapEntry.getValue().getPane().getChildren()) { if (tabPane.equals(child)) { return tabMapEntry.getKey(); } } } return null; } }
@Override public void onEditSessionChange(EditSessionEvent ese) { boolean disabled = ese.isSessionStart(); for (Tab tab : tabset.getTabs()) { if (tab.getPane() == null || !ese.isParentOfRequestee(tab.getPane())) { if (!disabled && accessrightsTab.equals(tab) && geodesk != null && geodesk.isPublic()) { tab.setDisabled(true); } tab.setDisabled(disabled); } } for (Tab tab : widgetTabset.getTabs()) { if (tab.getPane() == null || !ese.isParentOfRequestee(tab.getPane())) { tab.setDisabled(disabled); } } }