本文整理匯總了Java中com.vaadin.data.Container.Ordered方法的典型用法代碼示例。如果您正苦於以下問題:Java Container.Ordered方法的具體用法?Java Container.Ordered怎麽用?Java Container.Ordered使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.data.Container
的用法示例。
在下文中一共展示了Container.Ordered方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateButtonStatus
import com.vaadin.data.Container; //導入方法依賴的package包/類
private void updateButtonStatus() {
Container.Ordered ctr = nav.getContainer();
if (ctr == null) {
disable(allActions);
return;
} else {
enable(allActions);
}
Object currentId = nav.getCurrentItemId();
boolean hasNext = false;
boolean hasPrev = false;
if(currentId != null){
hasNext = null != ctr.nextItemId(currentId);
hasPrev = null != ctr.prevItemId(currentId);
}
next.setEnabled(hasNext);
prev.setEnabled(hasPrev);
first.setEnabled(hasPrev);
last.setEnabled(hasNext);
}
示例2: withDefaultBehavior
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Assign a default behavior according to the current known container type.
*
* Uses a {@link org.tylproject.vaadin.addon.fieldbinder.behavior.BehaviorFactory}.
* There are two BehaviorFactories:
*
* <ul>
* <li>{@link org.tylproject.vaadin.addon.fieldbinder.behavior.DefaultBehaviorFactory}</li>
* <li>{@link org.tylproject.vaadin.addon.fieldbinder.behavior.DefaultTableBehaviorFactory}</li>
* </ul>
*
*/
public BasicDataNavigation withDefaultBehavior() {
if (behaviorFactory == null) {
throw new IllegalStateException(
"Cannot automatically assign a default behavior: no BehaviorFactory");
}
try {
Class<? extends Container.Ordered> containerClass = getContainerType();
Behavior behavior = behaviorFactory.forContainerType(containerClass);
return this.withBehavior(behavior);
} catch (IllegalStateException ex) {
throw new IllegalStateException(
"Cannot automatically assign a default behavior.", ex);
}
}
示例3: updateButtonStatus
import com.vaadin.data.Container; //導入方法依賴的package包/類
protected void updateButtonStatus() {
Container.Ordered ctr = getNavigation().getContainer();
if (ctr == null || !getNavigation().isNavigationEnabled()) {
disable(navButtons);
return;
} else {
enable(navButtons);
}
Object currentId = getNavigation().getCurrentItemId();
if (currentId == null) {
disable(navButtons);
return;
}
boolean hasNext = false;
boolean hasPrev = false;
if(currentId != null){
hasNext = null != ctr.nextItemId(currentId);
hasPrev = null != ctr.prevItemId(currentId);
}
nextButton.setEnabled(hasNext);
prevButton.setEnabled(hasPrev);
firstButton.setEnabled(hasPrev);
lastButton.setEnabled(hasNext);
}
示例4: getContainerType
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Return the container type for this DataNavigation
*/
public @Nonnull Class<? extends Container.Ordered> getContainerType() {
if (container != null) {
return container.getClass();
}
else {
throw new IllegalStateException("The container type is currently unknown: " +
"a container must be set with setContainer(), " +
"or an upper bound must be given with restrictContainerType()");
}
}
示例5: setContainer
import com.vaadin.data.Container; //導入方法依賴的package包/類
@Override
public void setContainer(Container.Ordered container) {
this.container = container;
this.currentItemId = null;
if (container == null || container.size() == 0) disableNavigation();
if (container instanceof Container.Filterable) enableFind();
else disableFind();
first();
}
示例6: FieldBinder
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Creates a FieldBinder that will use the given container as the backing
* for the values of its fields.
*
* {@link #getNavigation()} returns a controller on top of that container
*
*
* @param beanClass
* @param container
*/
public FieldBinder(Class<T> beanClass, Container.Ordered container) {
super(new FieldGroup());
this.beanClass = beanClass;
this.dynaClass = WrapDynaClass.createDynaClass(beanClass);
BasicDataNavigation nav = new BasicDataNavigation(container);
nav.setBehaviorFactory(new DefaultBehaviorFactory<>(this));
this.navigation = nav;
}
示例7: BasicDataNavigation
import com.vaadin.data.Container; //導入方法依賴的package包/類
public BasicDataNavigation(@Nonnull final Container.Ordered container) {
setContainer(container);
}
示例8: getContainer
import com.vaadin.data.Container; //導入方法依賴的package包/類
@Override
public Container.Ordered getContainer() {
return container;
}
示例9: getContainerDataSource
import com.vaadin.data.Container; //導入方法依賴的package包/類
public Container.Ordered getContainerDataSource() {
return getListContainer();
}
示例10: setContainerDataSource
import com.vaadin.data.Container; //導入方法依賴的package包/類
public void setContainerDataSource(Container.Ordered container) {
this.getTable().setContainerDataSource(container);
getNavigation().setContainer(container);
getNavigation().enableNavigation();
getNavigation().first();
}
示例11: getContainerDataSource
import com.vaadin.data.Container; //導入方法依賴的package包/類
public Container.Ordered getContainerDataSource() {
return (Container.Ordered) this.getTable().getContainerDataSource();
}
示例12: TableZoomDialog
import com.vaadin.data.Container; //導入方法依賴的package包/類
public TableZoomDialog(Object propertyId, Container.Ordered zoomCollection) {
this(new BeanTable<>(Object.class, zoomCollection));
withContainerPropertyId(propertyId, zoomCollection.getType(propertyId));
}
示例13: setContainer
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Bind the Navigation to the given Container.
*
* Container may cleared by passing null.
* The method may invoke first() to bring the Navigation to a consistent state.
*
*/
public void setContainer(Container.Ordered container);
示例14: buildDefaultButtonBar
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Generates a default button bar implementation binding to this FieldBinder's built-in
* {@link org.tylproject.vaadin.addon.datanav.DataNavigation} instance
*
*/
public ButtonBar buildDefaultButtonBar(Container.Ordered container) {
getNavigation().setContainer(container);
return new ButtonBar(navigation);
}
示例15: BeanTable
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Constructs a BeanTable for the given class, the given container,
* and the given table instance
*
* @param beanClass
* @param container
*/
public BeanTable(final Class<T> beanClass, final Container.Ordered container) {
super(beanClass);
setContainerDataSource(container);
}