本文整理匯總了Java中com.vaadin.data.Container.Indexed方法的典型用法代碼示例。如果您正苦於以下問題:Java Container.Indexed方法的具體用法?Java Container.Indexed怎麽用?Java Container.Indexed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.data.Container
的用法示例。
在下文中一共展示了Container.Indexed方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: FilterableGrid
import com.vaadin.data.Container; //導入方法依賴的package包/類
public FilterableGrid(String caption, Container.Indexed dataSource) {
super(caption, dataSource);
if (!(dataSource instanceof Container.Filterable)) {
throw new IllegalArgumentException("Container must be Filterable");
}
setSelectionMode(Grid.SelectionMode.SINGLE);
setSizeFull();
setWidth("100%");
setHeight("100%");
makeSearchHeader(
(Container.Filterable) dataSource,
dataSource.getContainerPropertyIds(),
searchFieldRow);
}
示例2: CubaGrid
import com.vaadin.data.Container; //導入方法依賴的package包/類
public CubaGrid(String caption, Container.Indexed dataSource, CubaGridEditorFieldFactory editorFieldFactory) {
super(caption, dataSource);
this.editorFieldFactory = editorFieldFactory;
setEditorErrorHandler(new CubaDefaultEditorErrorHandler());
// FIXME: gg, workaround for https://github.com/vaadin/framework/issues/9040
addEditorCloseListener(event -> focus());
}
示例3: setContainerDataSource
import com.vaadin.data.Container; //導入方法依賴的package包/類
@Override
public void setContainerDataSource(Container.Indexed container) {
if (container != null) {
if (!(container instanceof Container.Hierarchical)) {
container = new IndexedContainerHierarchicalWrapper(container);
}
if (!(container instanceof Collapsible)) {
container = new ContainerCollapsibleWrapper(container);
}
}
super.setContainerDataSource(container);
}
示例4: addGeneratedProperty
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Helper method to add suitable dummy generated property for the row index
*
* @param property The property name
*/
public GeneratedPropertyContainer addGeneratedProperty(String property, Container.Indexed container) {
GeneratedPropertyContainer dummy = new GeneratedPropertyContainer(container);
dummy.addGeneratedProperty(property,new PropertyValueGenerator<String>() {
@Override
public String getValue(Item item, Object itemId, Object propertyId) {
return "";
}
@Override
public Class<String> getType() {
return String.class;
}
});
return dummy;
}
示例5: makeDefaultZoomDialog
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* returns a GridZoomDialog if GridSupport is enabled; otherwise a TableZoomDialog
*/
protected ZoomDialog makeDefaultZoomDialog(Object propertyId, Container.Indexed zoomCollection) {
if (gridSupport == GridSupport.UseGrid) {
return new GridZoomDialog(propertyId, zoomCollection);
} else {
return new TableZoomDialog(propertyId, zoomCollection);
}
}
示例6: IndexedContainerHierarchicalWrapper
import com.vaadin.data.Container; //導入方法依賴的package包/類
public IndexedContainerHierarchicalWrapper(
Container.Indexed toBeWrapped) {
super(toBeWrapped);
container = toBeWrapped;
}
示例7: HierarchyTest
import com.vaadin.data.Container; //導入方法依賴的package包/類
public HierarchyTest(Container.Indexed container) {
this.container = container;
}
示例8: setContainerDataSource
import com.vaadin.data.Container; //導入方法依賴的package包/類
@Override
public void setContainerDataSource(Container.Indexed dataSource) {
if (dataSource == null) return;
grid.setContainerDataSource(dataSource);
}
示例9: getContainerDataSource
import com.vaadin.data.Container; //導入方法依賴的package包/類
@Override
public Container.Indexed getContainerDataSource() {
return grid.getContainerDataSource();
}
示例10: setContainerDataSource
import com.vaadin.data.Container; //導入方法依賴的package包/類
@Override
public void setContainerDataSource(Container.Indexed dataSource) {
table.setContainerDataSource(dataSource);
}
示例11: getContainerDataSource
import com.vaadin.data.Container; //導入方法依賴的package包/類
@Override
public Container.Indexed getContainerDataSource() {
return (Container.Indexed) table.getContainerDataSource();
}
示例12: GridZoomDialog
import com.vaadin.data.Container; //導入方法依賴的package包/類
public GridZoomDialog(Object propertyId, Container.Indexed container) {
withContainerPropertyId(propertyId, container.getType(propertyId));
FilterableGrid grid = new FilterableGrid(container);
grid.setSelectionMode(Grid.SelectionMode.SINGLE);
grid.setSizeFull();
grid.setWidth("100%");
grid.setHeight("100%");
grid.setVisibileColumns("firstName", "lastName", "birthDate");
this.grid = grid;
setupDialog(grid);
}
示例13: buildZoomField
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Build a ZoomField
*
* @param bindingPropertyId the propertyId that this field will be bound to
* @param containerPropertyId the propertyId that will be displayed and selected from the ZoomDialog
* @param zoomContainer the container instance onto which zoom
*
* @return the configure ZoomField instance
*/
public TextZoomField buildZoomField(Object bindingPropertyId, Object containerPropertyId, Container.Indexed zoomContainer) {
String caption = createCaptionByPropertyId(bindingPropertyId);
TextZoomField field = new TextZoomField();
field.setCaption(caption);
field.withZoomDialog(makeDefaultZoomDialog(containerPropertyId, zoomContainer));
bind(field, bindingPropertyId);
return field;
}
示例14: getContainer
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Get container data source that implements {@link com.vaadin.data.Container.Indexed} and {@link
* com.vaadin.data.Container.Hierarchical} as well.
*
* @return TreeGrid's container data source
*/
@SuppressWarnings("unchecked")
private <T extends Container.Indexed & Container.Hierarchical> T getContainer() {
// TreeGrid's data source has to implement both Indexed and Hierarchical so it is safe to cast.
return (T) getParentGrid().getContainerDataSource();
}
示例15: buildDrillDownField
import com.vaadin.data.Container; //導入方法依賴的package包/類
/**
* Build a DrillDownField.
*
* Equivalent to buildZoomField(bindingPropertyId, containerPropertyId, zoomContainer).drillDownOnly().
*/
public TextZoomField buildDrillDownField(Object propertyId, Object containerPropertyId, Container.Indexed zoomContainer) {
return this.buildZoomField(propertyId, containerPropertyId, zoomContainer).drillDownOnly();
}