@SuppressWarnings("unchecked") public EntityCalendarEventProvider (CollectionDatasource datasource) { this.datasource = datasource; collectionChangeListener = createCollectionChangeListener(); itemPropertyChangeListener = createItemPropertyChangeListener(); datasource.addCollectionChangeListener(collectionChangeListener); datasource.addItemPropertyChangeListener(itemPropertyChangeListener); }
public DatasourceOptions(CollectionDatasource<E, K> datasource) { this.datasource = datasource; this.datasource.addStateChangeListener(this::datasourceStateChanged); this.datasource.addItemPropertyChangeListener(this::datasourceItemPropertyChanged); this.datasource.addCollectionChangeListener(this::datasourceCollectionChanged); CollectionDsHelper.autoRefreshInvalid(datasource, true); if (datasource.getState() == Datasource.State.VALID) { setState(BindingState.ACTIVE); } }
public DatasourceTableItems(CollectionDatasource<E, K> datasource) { this.datasource = datasource; this.datasource.addStateChangeListener(this::datasourceStateChanged); this.datasource.addItemPropertyChangeListener(this::datasourceItemPropertyChanged); this.datasource.addCollectionChangeListener(this::datasourceCollectionChanged); this.datasource.addItemChangeListener(this::datasourceItemChanged); CollectionDsHelper.autoRefreshInvalid(datasource, true); if (datasource.getState() == Datasource.State.VALID) { setState(BindingState.ACTIVE); } }
@SuppressWarnings("unchecked") public void bind(CollectionDatasource ds) { weakItemChangeListener = new WeakItemChangeListener(ds, this); ds.addItemChangeListener(weakItemChangeListener); weakItemPropertyChangeListener = new WeakItemPropertyChangeListener(ds, this); ds.addItemPropertyChangeListener(weakItemPropertyChangeListener); weakStateChangeListener = new WeakStateChangeListener(ds, this); ds.addStateChangeListener(weakStateChangeListener); weakCollectionChangeListener = new WeakCollectionChangeListener(ds, this); ds.addCollectionChangeListener(weakCollectionChangeListener); }
@SuppressWarnings("unchecked") public void bind(CollectionDatasource ds) { ds.addItemChangeListener(new WeakItemChangeListener(ds, this)); ds.addItemPropertyChangeListener(new WeakItemPropertyChangeListener(ds, this)); ds.addStateChangeListener(new WeakStateChangeListener(ds, this)); ds.addCollectionChangeListener(new WeakCollectionChangeListener(ds, this)); } }
rolesDs.addItemPropertyChangeListener(e -> { if (DEFAULT_ROLE_PROPERTY.equals(e.getProperty())) { Role reloadedRole = dataManager.reload(e.getItem(), View.LOCAL);
dataSetsDs.addItemPropertyChangeListener(e -> { applyVisibilityRules(e.getItem()); if ("entityParamName".equals(e.getProperty()) || "listEntitiesParamName".equals(e.getProperty())) {