本文整理汇总了Java中com.sencha.gxt.data.shared.ListStore类的典型用法代码示例。如果您正苦于以下问题:Java ListStore类的具体用法?Java ListStore怎么用?Java ListStore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListStore类属于com.sencha.gxt.data.shared包,在下文中一共展示了ListStore类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initLayerCombo1
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private ComboBox<VectorLayerInfo> initLayerCombo1() {
VectorLayerProperties properties = GWT
.create(VectorLayerProperties.class);
layerStore1 = new ListStore<VectorLayerInfo>(properties.key());
layerCombo1 = new ComboBox<VectorLayerInfo>(layerStore1,
properties.name());
layerCombo1.setEmptyText((UIMessages.INSTANCE.sbLayerComboEmptyText()));
layerCombo1.setTypeAhead(true);
layerCombo1.setTriggerAction(TriggerAction.ALL);
layerCombo1.setForceSelection(true);
layerCombo1.setEditable(false);
layerCombo1.enableEvents();
layerCombo1.setWidth(width);
layerCombo1.addSelectionHandler(new SelectionHandler<VectorLayerInfo>() {
@Override
public void onSelection(SelectionEvent<VectorLayerInfo> event) {
layerCombo1.setValue(event.getSelectedItem(), true);
}
});
return layerCombo1;
}
示例2: createGrid
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private Grid<LayerDef> createGrid(ListStore<LayerDef> dataStore,
LayerDefProperties properties) {
RowExpander<LayerDef> rowExpander = createRowExpander();
ColumnModel<LayerDef> columnModel = createColumnList(properties, rowExpander);
Grid<LayerDef> grid = new Grid<LayerDef>(dataStore, columnModel);
grid.setBorders(true);
grid.getView().setForceFit(true);
grid.getView().setAutoExpandColumn(columnModel.getColumn(2));
grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true);
grid.setBorders(true);
grid.setColumnReordering(true);
rowExpander.initPlugin(grid);
return grid;
}
示例3: GeoprocessComboBox
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
public GeoprocessComboBox(Collection<Geoprocess> spatialOperations) {
super(new ListStore<Geoprocess>(
((GeoprocessProperties)GWT.create(GeoprocessProperties.class)).key()),
((GeoprocessProperties)GWT.create(GeoprocessProperties.class)).name());
initialize();
getStore().addAll(spatialOperations);
}
示例4: createGridPanel
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private HorizontalPanel createGridPanel() {
HorizontalPanel hPanel = new HorizontalPanel();
hPanel.setSize("510px", "320px");
vehicleStore = new ListStore<VehicleJSO>(vehicleProps.key());
vehiculeGrid = createGrid(vehicleStore, vehicleProps);
vehiculeGrid.getSelectionModel().addSelectionChangedHandler(
new SelectionChangedHandler<VehicleJSO>() {
@Override
public void onSelectionChanged(
SelectionChangedEvent<VehicleJSO> event) {
List<VehicleJSO> selected = event.getSelection();
vehicleToolBar.setVehicles(selected);
}
});
VerticalLayoutContainer gridContainer = new VerticalLayoutContainer();
gridContainer.setWidth(500);
gridContainer.setHeight(320);
gridContainer.add(vehiculeGrid, new VerticalLayoutData(1, 1));
hPanel.add(gridContainer);
hPanel.add(vehicleToolBar);
return hPanel;
}
示例5: VertexStyleComboBox
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
public VertexStyleComboBox(String width) {
super(new ListStore<VertexStyleDef>(
((VertexStyleDefProperties)GWT.create(VertexStyleDefProperties.class)).key()),
((VertexStyleDefProperties)GWT.create(VertexStyleDefProperties.class)).name(),
new AbstractSafeHtmlRenderer<VertexStyleDef>() {
final VertexStyleComboTemplates comboBoxTemplates = GWT
.create(VertexStyleComboTemplates.class);
public SafeHtml render(VertexStyleDef item) {
return comboBoxTemplates.vertexStyle(item.getImage()
.getSafeUri(), item.getName());
}
});
setWidth(width);
setTypeAhead(true);
setEmptyText(UIMessages.INSTANCE.sbLayerComboEmptyText());
setTriggerAction(TriggerAction.ALL);
setForceSelection(true);
setEditable(false);
enableEvents();
getStore().addAll(VertexStyles.getAll());
}
示例6: FeatureGrid
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
public FeatureGrid(int width, int height) {
super(new ListStore<VectorFeature>(
new ModelKeyProvider<VectorFeature>() {
@Override
public String getKey(VectorFeature item) {
return item.getFeatureId();
}
}),
new ColumnModel<VectorFeature>(
new ArrayList<ColumnConfig<VectorFeature, ?>>())
);
this.setBorders(true);
this.setAllowTextSelection(true);
this.getView().setStripeRows(true);
this.getView().setColumnLines(true);
this.setColumnReordering(true);
this.setLoadMask(true);
this.setWidth(width);
this.setHeight(height);
this.setEnableCellRender(false);
}
示例7: FeatureGrid
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
public FeatureGrid(int width, int height) {
super(
new ListStore<VectorFeature>(
new ModelKeyProvider<VectorFeature> () {
@Override
public String getKey(VectorFeature item) {
return item.getFeatureId();
}
}),
new ColumnModel<VectorFeature>(
new ArrayList<ColumnConfig<VectorFeature, ?>>())
);
this.setBorders(true);
this.setAllowTextSelection(true);
this.getView().setStripeRows(true);
this.getView().setColumnLines(true);
this.setColumnReordering(true);
this.setLoadMask(true);
this.setWidth(width);
this.setHeight(height);
this.setEnableCellRender(false);
}
示例8: createAndAddGridPortlet
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private void createAndAddGridPortlet() {
store = new ListStore<>(properties.key());
ColumnConfig<TabItemValue, String> idColumn = new ColumnConfig<>(properties.id(),
1200,
"ID");
List<ColumnConfig<TabItemValue, ?>> columns = new ArrayList<>();
columns.add(idColumn);
ColumnModel<TabItemValue> cm = new ColumnModel<>(columns);
grid = new Grid<>(store,
cm);
grid.getView()
.setAutoExpandColumn(idColumn);
grid.getView()
.setForceFit(true);
grid.getView()
.setStripeRows(true);
grid.getView()
.setColumnLines(true);
grid.setHeight(512);
Portlet portlet01 = new Portlet();
portlet01.setHeading("Open Tabs");
portlet01.add(grid);
portal.add(portlet01,
0);
}
示例9: createDraggableGrid
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private Grid<LayerDef> createDraggableGrid(ListStore<LayerDef> dataStore,
LayerDefProperties properties) {
Grid<LayerDef> grid = createGrid(dataStore, properties);
new GridDragSource<LayerDef>(grid).setGroup("layers");
GridDropTarget<LayerDef> dropTarget = new GridDropTarget<LayerDef>(grid);
dropTarget.setFeedback(Feedback.INSERT);
dropTarget.setGroup("layers");
return grid;
}
示例10: updateCombo
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private void updateCombo(ComboBox<VectorLayerInfo> combo,
ListStore<VectorLayerInfo> store,
List<VectorLayerInfo> updatedLayers) {
store.clear();
store.addAll(updatedLayers);
combo.redraw();
}
示例11: initializeAttributeLabelCombo
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private void initializeAttributeLabelCombo(String width) {
ListStore<FeatureAttributeDef> attributeLabelStore = new ListStore<FeatureAttributeDef>(
new ModelKeyProvider<FeatureAttributeDef>() {
@Override
public String getKey(FeatureAttributeDef item) {
return (item == null) ? null : item.getName();
}
});
attributeCombo = new ComboBox<FeatureAttributeDef>(attributeLabelStore,
new LabelProvider<FeatureAttributeDef>() {
@Override
public String getLabel(FeatureAttributeDef item) {
return (item == null) ? null : item.getName();
}
});
attributeCombo.setWidth(width);
attributeCombo.setTypeAhead(true);
attributeCombo.setEmptyText(UIMessages.INSTANCE
.asdAttributeComboEmptyText());
attributeCombo.setTriggerAction(TriggerAction.ALL);
attributeCombo.setForceSelection(true);
attributeCombo.setEditable(false);
attributeCombo.enableEvents();
}
示例12: initialize
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
public void initialize(GridEditing<FeatureAttributeBean> gridEditing,
ListStore<FeatureAttributeBean> featureAttributes) {
this.gridEditing = gridEditing;
this.featureAttributes = featureAttributes;
setHeaderVisible(false);
addStyleName(ThemeStyles.get().style().borderBottom());
HorizontalPanel horizontalGroup = new HorizontalPanel();
horizontalGroup.setSpacing(5);
horizontalGroup.add(getEditButton());
horizontalGroup.add(getClearButton());
horizontalGroup.add(getWKTButton());
horizontalGroup.add(getExportCSVButton());
setWidget(horizontalGroup);
}
示例13: initializeStatusGrid
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private void initializeStatusGrid() {
// Creacion del Grid Base
StatusItemProperties props = GWT.create(StatusItemProperties.class);
statusStore = new ListStore<StatusItem>(props.key());
statusStore.setAutoCommit(true);
ColumnConfig<StatusItem, String> nameCol = new ColumnConfig<StatusItem, String>(
props.name(), 75, UIMessages.INSTANCE.fedColumnNameText());
ColumnConfig<StatusItem, String> valueCol = new ColumnConfig<StatusItem, String>(
props.value(), 150,
UIMessages.INSTANCE.fedNewAttributeDefaultNameText());
List<ColumnConfig<StatusItem, ?>> columns = new ArrayList<ColumnConfig<StatusItem, ?>>();
columns.add(nameCol);
columns.add(valueCol);
statusGrid = new Grid<StatusItem>(statusStore,
new ColumnModel<StatusItem>(columns));
statusGrid.setSelectionModel(new CellSelectionModel<StatusItem>());
statusGrid.getColumnModel().getColumn(1).setHideable(false);
statusGrid.setHideHeaders(true);
statusGrid.setAllowTextSelection(true);
statusGrid.getView().setStripeRows(true);
statusGrid.getView().setColumnLines(true);
statusGrid.setBorders(false);
statusStore.add(new StatusItem(LON_LABEL, null));
statusStore.add(new StatusItem(LAT_LABEL, null));
statusStore.add(new StatusItem(SCALE_LABEL, null));
statusStore.add(new StatusItem(CLICK_COORD_X, null));
statusStore.add(new StatusItem(CLICK_COORD_Y, null));
}
示例14: createGrid
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
private Grid<VehicleJSO> createGrid(ListStore<VehicleJSO> dataStore,
VehicleJSOProperties properties) {
StringFilter<VehicleJSO> plateFilter = new StringFilter<VehicleJSO>(properties.plate());
StringFilter<VehicleJSO> nameFilter = new StringFilter<VehicleJSO>(properties.name());
GridFilters<VehicleJSO> filters = new GridFilters<VehicleJSO>();
RowExpander<VehicleJSO> rowExpander = createRowExpander();
ColumnModel<VehicleJSO> columnModel = createColumnList(properties, rowExpander);
Grid<VehicleJSO> grid = new Grid<VehicleJSO>(dataStore, columnModel);
grid.setBorders(true);
grid.getView().setForceFit(true);
grid.getView().setAutoExpandColumn(columnModel.getColumn(2));
grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true);
grid.setBorders(true);
grid.setColumnReordering(true);
rowExpander.initPlugin(grid);
filters.initPlugin(grid);
filters.setLocal(true);
filters.addFilter(nameFilter);
filters.addFilter(plateFilter);
return grid;
}
示例15: VectorFormatComboBox
import com.sencha.gxt.data.shared.ListStore; //导入依赖的package包/类
public VectorFormatComboBox(String width,
Collection<VectorFormat> vectorFormats) {
super(new ListStore<VectorFormat>(
((VectorFormatProperties)GWT.create(VectorFormatProperties.class)).key()),
((VectorFormatProperties)GWT.create(VectorFormatProperties.class)).name());
initialize(width);
getStore().addAll(vectorFormats);
}