本文整理汇总了Java中com.vaadin.shared.Registration类的典型用法代码示例。如果您正苦于以下问题:Java Registration类的具体用法?Java Registration怎么用?Java Registration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Registration类属于com.vaadin.shared包,在下文中一共展示了Registration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addQueryConfigurationProvider
import com.vaadin.shared.Registration; //导入依赖的package包/类
public Registration addQueryConfigurationProvider(QueryConfigurationProvider queryConfigurationProvider) {
ObjectUtils.argumentNotNull(queryConfigurationProvider, "QueryConfigurationProvider must be not null");
if (queryConfigurationProviders == null) {
queryConfigurationProviders = new LinkedList<>();
}
if (!queryConfigurationProviders.contains(queryConfigurationProvider)) {
queryConfigurationProviders.add(queryConfigurationProvider);
// reset store
resetStorePreservingFreezeState();
}
return () -> {
queryConfigurationProviders.remove(queryConfigurationProvider);
// reset store
resetStorePreservingFreezeState();
};
}
示例2: addValueChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
@Override
public Registration addValueChangeListener(
com.holonplatform.vaadin.components.Input.ValueChangeListener<T> listener) {
ObjectUtils.argumentNotNull(listener, "ValueChangeListener must be not null");
valueChangeListeners.add(listener);
return () -> valueChangeListeners.remove(listener);
}
示例3: addValueChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
@Override
public Registration addValueChangeListener(
final com.holonplatform.vaadin.components.Input.ValueChangeListener<T> listener) {
ObjectUtils.argumentNotNull(listener, "ValueChangeListener must be not null");
return getInternalField().addValueChangeListener(e -> listener.valueChange(new DefaultValueChangeEvent<>(this,
fromInternalValue(e.getOldValue()), fromInternalValue(e.getValue()), e.isUserOriginated())));
}
示例4: addPropertyResizeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
/**
* Adds a {@link PropertyResizeListener} that gets notified when a property column is resized.
* @param listener Listener to add (not null)
* @return the listener registration
*/
public Registration addPropertyResizeListener(final PropertyResizeListener<P> listener) {
ObjectUtils.argumentNotNull(listener, "Listener must be not null");
return getGrid()
.addColumnResizeListener(e -> listener.onPropertyResized(getColumnProperty(e.getColumn().getId()),
(int) e.getColumn().getWidth(), e.isUserOriginated()));
}
示例5: addValueChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
@Override
public Registration addValueChangeListener(
com.holonplatform.vaadin.components.ValueHolder.ValueChangeListener<V> listener) {
ObjectUtils.argumentNotNull(listener, "ValueChangeListener must be not null");
return input.addValueChangeListener(e -> listener.valueChange(new DefaultValueChangeEvent<>(this,
convertToPresentation(e.getOldValue()), convertToPresentation(e.getValue()), e.isUserOriginated())));
}
示例6: addLayoutClickListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Registration addLayoutClickListener(LayoutEvents.LayoutClickListener listener) {
return addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutEvents.LayoutClickEvent.class, listener,
LayoutEvents.LayoutClickListener.clickMethod);
}
示例7: syncLocale
import com.vaadin.shared.Registration; //导入依赖的package包/类
private void syncLocale() {
startDateValueChangeRegistration.ifPresent(Registration::remove);
endDateValueChangeRegistration.ifPresent(Registration::remove);
try {
start.setLocale(gantt.getLocale());
start.setValue(gantt.getStartLocalDateTime());
end.setLocale(gantt.getLocale());
end.setValue(gantt.getEndLocalDateTime());
} finally {
startDateValueChangeRegistration = Optional.of(start.addValueChangeListener(startDateValueChangeListener));
endDateValueChangeRegistration = Optional.of(end.addValueChangeListener(endDateValueChangeListener));
}
dateFormat = new SimpleDateFormat("MMM dd HH:mm:ss zzz yyyy", gantt.getLocale());
}
示例8: setResolution
import com.vaadin.shared.Registration; //导入依赖的package包/类
private void setResolution(org.tltv.gantt.client.shared.Resolution resolution) {
resolutionValueChangeRegistration.ifPresent(Registration::remove);
try {
reso.setValue(resolution);
} finally {
resolutionValueChangeRegistration = Optional.of(reso.addValueChangeListener(resolutionValueChangeListener));
}
}
示例9: addStatusChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
@Override
public Registration addStatusChangeListener(StatusChangeListener listener) {
return binder.addStatusChangeListener(e -> listener.statusChange(new StatusChangeEvent(this, e.hasErrors())));
}
示例10: addValueChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
@Override
public Registration addValueChangeListener(ValueChangeListener<?> listener) {
return binder.addValueChangeListener(listener);
}
示例11: addValueChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
public Registration addValueChangeListener(HasValue.ValueChangeListener<String> listener) {
return field.addValueChangeListener(listener);
}
示例12: addValueChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
public Registration addValueChangeListener(HasValue.ValueChangeListener<LocalDateTime> listener) {
return field.addValueChangeListener(listener);
}
示例13: addValueChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
public Registration addValueChangeListener(HasValue.ValueChangeListener<LocalDate> listener) {
return field.addValueChangeListener(listener);
}
示例14: addValueChangeListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
public Registration addValueChangeListener(HasValue.ValueChangeListener<T> listener) {
return field.addValueChangeListener(listener);
}
示例15: addLayoutClickListener
import com.vaadin.shared.Registration; //导入依赖的package包/类
@Override
public Registration addLayoutClickListener(LayoutEvents.LayoutClickListener listener) {
Objects.requireNonNull(listener, "listener may not be null");
return rootLayout.addLayoutClickListener(listener);
}