@Override public String getCaption() { return getFilterCaption(fe); } });
protected void initFiltersLookup() { Map<Object, String> captionsMap = new LinkedHashMap<>(); for (FilterEntity entity : filterEntities) { String caption = getFilterCaption(entity); if (entity.getIsDefault()) { caption += " " + getMainMessage("filter.default"); } captionsMap.put(entity, caption); } captionsMap.put(adHocFilter, getFilterCaption(adHocFilter)); filtersLookupListenerEnabled = false; //set null to remove previous value from lookup options list filtersLookup.setValue(null); List<FilterEntity> optionsList = new ArrayList<>(); optionsList.add(adHocFilter); optionsList.addAll(filterEntities); filtersLookup.setOptionsList(optionsList); filterHelper.setLookupCaptions(filtersLookup, captionsMap); filtersLookup.setValue(filterEntity); filtersLookupListenerEnabled = true; }
protected void updateWindowCaption() { Window window = getWindow(); String filterTitle; if (filterMode == FilterMode.GENERIC_MODE && filterEntity != null && filterEntity != adHocFilter) { filterTitle = getFilterCaption(filterEntity); } else { filterTitle = null; } window.setDescription(filterTitle); if (initialWindowCaption == null) { initialWindowCaption = window.getCaption(); } windowManager.setWindowCaption(window, initialWindowCaption, filterTitle); String newCaption = Strings.isNullOrEmpty(filterTitle) ? caption : caption + ": " + filterTitle; captionChangedListener.accept(newCaption); }
window.setDescription(getFilterCaption(filterEntity)); } else window.setDescription(null);