@Nullable @Override public Component getComponent(String id) { return frame.getComponent(id); }
@Nullable @Override public Component getComponent(int index) { return frame.getComponent(index); }
/** * Returns the tab sheet with edit components. Can be null if the screen contains a field group only. * Override if the tab sheet id differs from "tabSheet". */ @Nullable protected TabSheet getTabSheet() { return (TabSheet) getWindow().getComponent("tabSheet"); }
@Nullable @Override public Component getComponent(String id) { return screen.getWindow().getComponent(id); } }
@Nullable @Override public Component getComponent(String id) { return screen.getWindow().getComponent(id); } }
@Nullable @Override public Component getComponent(String id) { return screen.getWindow().getComponent(id); } }
@Nullable protected Component getLookupActionsLayout() { return getWindow().getComponent("lookupActions"); }
final String customComponentId = matcher.group(1); final String subComponentId = matcher.group(2); final Component compositeComponent = window.getComponent(customComponentId);
final String customComponentId = matcher.group(1); final String actionId = matcher.group(2); final Component actionHolderComponent = window.getComponent(customComponentId); if (actionHolderComponent != null) { if (actionHolderComponent instanceof SecuredActionsHolder) {
protected void applyComponentPermission(Window window, String screenId, Integer permissionValue, String targetComponentId) { Component component = window.getComponent(targetComponentId); if (component != null) { if (permissionValue == UiPermissionValue.HIDE.getValue()) { component.setVisible(false); } else if (permissionValue == UiPermissionValue.READ_ONLY.getValue()) { if (component instanceof Component.Editable) { ((Component.Editable) component).setEditable(false); } else { component.setEnabled(false); } } } else { log.info(String.format("Couldn't find component %s in window %s", targetComponentId, screenId)); } }
protected void moveFocus(TabSheetBehaviour tabSheet, String tabId) { TabWindowContainer windowContainer = (TabWindowContainer) tabSheet.getTabComponent(tabId); Window window = windowContainer.getBreadCrumbs().getCurrentWindow(); if (window != null) { boolean focused = false; String focusComponentId = window.getFocusComponent(); if (focusComponentId != null) { com.haulmont.cuba.gui.components.Component focusComponent = window.getComponent(focusComponentId); if (focusComponent instanceof com.haulmont.cuba.gui.components.Component.Focusable && focusComponent.isEnabledRecursive() && focusComponent.isVisibleRecursive()) { ((com.haulmont.cuba.gui.components.Component.Focusable) focusComponent).focus(); focused = true; } } if (!focused && window instanceof Window.Wrapper) { Window.Wrapper wrapper = (Window.Wrapper) window; focused = ((WebWindow) wrapper.getWrappedWindow()).findAndFocusChildComponent(); if (!focused) { tabSheet.focus(); } } } }