use of com.haulmont.cuba.client.ClientConfig in project cuba by cuba-platform.
the class ViewAction method setConfiguration.
@Inject
protected void setConfiguration(Configuration configuration) {
ClientConfig clientConfig = configuration.getConfig(ClientConfig.class);
setShortcut(clientConfig.getTableViewShortcut());
}
use of com.haulmont.cuba.client.ClientConfig in project cuba by cuba-platform.
the class ExcludeAction method setConfiguration.
@Inject
protected void setConfiguration(Configuration configuration) {
ClientConfig clientConfig = configuration.getConfig(ClientConfig.class);
setShortcut(clientConfig.getTableRemoveShortcut());
}
use of com.haulmont.cuba.client.ClientConfig in project cuba by cuba-platform.
the class WebAppWorkArea method createCloseShortcut.
protected ShortcutListener createCloseShortcut(RootWindow topLevelWindow) {
Configuration configuration = beanLocator.get(Configuration.NAME);
ClientConfig clientConfig = configuration.getConfig(ClientConfig.class);
String closeShortcut = clientConfig.getCloseShortcut();
KeyCombination combination = KeyCombination.create(closeShortcut);
return new ShortcutListenerDelegate("onClose", combination.getKey().getCode(), KeyCombination.Modifier.codes(combination.getModifiers())).withHandler((sender, target) -> closeWindowByShortcut(topLevelWindow));
}
use of com.haulmont.cuba.client.ClientConfig in project cuba by cuba-platform.
the class WebAppWorkArea method createNextWindowTabShortcut.
protected ShortcutListener createNextWindowTabShortcut(RootWindow topLevelWindow) {
Configuration configuration = beanLocator.get(Configuration.NAME);
ClientConfig clientConfig = configuration.getConfig(ClientConfig.class);
String nextTabShortcut = clientConfig.getNextTabShortcut();
KeyCombination combination = KeyCombination.create(nextTabShortcut);
return new ShortcutListenerDelegate("onNextTab", combination.getKey().getCode(), KeyCombination.Modifier.codes(combination.getModifiers())).withHandler((sender, target) -> {
TabSheetBehaviour tabSheet = getTabbedWindowContainer().getTabSheetBehaviour();
if (tabSheet != null && !hasModalWindow() && tabSheet.getComponentCount() > 1) {
com.vaadin.ui.Component selectedTabComponent = tabSheet.getSelectedTab();
String tabId = tabSheet.getTab(selectedTabComponent);
int tabPosition = tabSheet.getTabPosition(tabId);
int newTabPosition = (tabPosition + 1) % tabSheet.getComponentCount();
String newTabId = tabSheet.getTab(newTabPosition);
tabSheet.setSelectedTab(newTabId);
moveFocus(tabSheet, newTabId);
}
});
}
use of com.haulmont.cuba.client.ClientConfig in project cuba by cuba-platform.
the class WebSearchPickerField method afterPropertiesSet.
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
Configuration configuration = beanLocator.get(Configuration.NAME, Configuration.class);
ClientConfig clientConfig = configuration.getConfig(ClientConfig.class);
setPageLength(clientConfig.getLookupFieldPageLength());
}
Aggregations