本文整理汇总了Java中com.sencha.gxt.widget.core.client.grid.Grid类的典型用法代码示例。如果您正苦于以下问题:Java Grid类的具体用法?Java Grid怎么用?Java Grid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Grid类属于com.sencha.gxt.widget.core.client.grid包,在下文中一共展示了Grid类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createGrid
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的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;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:LayerCatalogDialog.java
示例2: setGridDragable
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private void setGridDragable(final Grid<FeatureAttributeBean> grid) {
new GridDragSource<FeatureAttributeBean>(grid);
final GridDropTarget<FeatureAttributeBean> gridDrop = new GridDropTarget<FeatureAttributeBean>(
grid);
gridDrop.setAllowSelfAsSource(true);
gridDrop.setFeedback(Feedback.BOTH);
gridDrop.addDragEnterHandler(new DndDragEnterHandler() {
@Override
public void onDragEnter(final DndDragEnterEvent event) {
Info.display(UIMessages.INSTANCE.warning(),
UIMessages.INSTANCE.changesLost());
}
});
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:17,代码来源:FeatureInfoDialog.java
示例3: setGridDragable
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private void setGridDragable(final Grid<GitHubRepositoryAttributeBean> grid) {
new GridDragSource<GitHubRepositoryAttributeBean>(grid);
final GridDropTarget<GitHubRepositoryAttributeBean> gridDrop = new GridDropTarget<GitHubRepositoryAttributeBean>(
grid);
gridDrop.setAllowSelfAsSource(true);
gridDrop.setFeedback(Feedback.BOTH);
gridDrop.addDragEnterHandler(new DndDragEnterHandler() {
@Override
public void onDragEnter(final DndDragEnterEvent event) {
Info.display(UIMessages.INSTANCE.warning(),
UIMessages.INSTANCE.changesLost());
}
});
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:17,代码来源:GitHubRepositoryListDialog.java
示例4: asWidget
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
@Override
public Widget asWidget() {
ColumnConfig<TableColumnModel, String> name = new ColumnConfig<TableColumnModel, String>(
props.name(), 100, "Name");
name.setCell(new TitledCell());
ColumnConfig<TableColumnModel, String> type = new ColumnConfig<TableColumnModel, String>(
props.type(), 50, "Type");
type.setCell(new TitledCell());
ColumnConfig<TableColumnModel, String> desc = new ColumnConfig<TableColumnModel, String>(
props.desc(), 130, "Comment");
desc.setCell(new TitledCell());
List<ColumnConfig<TableColumnModel, ?>> list = new ArrayList<ColumnConfig<TableColumnModel, ?>>();
list.add(name);
list.add(type);
list.add(desc);
ColumnModel<TableColumnModel> colModel = new ColumnModel<TableColumnModel>(
list);
Grid<TableColumnModel> grid = new Grid<TableColumnModel>(getStore(),
colModel);
grid.setAllowTextSelection(true);
grid.getView().setForceFit(true);
grid.getView().setAutoFill(true);
return grid;
}
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:27,代码来源:ColumnInfoTab.java
示例5: DataPreviewGrid
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
public DataPreviewGrid(TablePreviewModel result) {
List<ColumnConfig<Tuple<Integer, List<String>>, ?>> list = new ArrayList<ColumnConfig<Tuple<Integer, List<String>>, ?>>();
int count = 0;
for (String col : result.getHeaders()) {
ColumnConfig<Tuple<Integer, List<String>>, String> cc = new ColumnConfig<Tuple<Integer, List<String>>, String>(
new MyValueProvider(count), 80, col);
cc.setToolTip(new SafeHtmlBuilder().appendHtmlConstant(col)
.toSafeHtml());
cc.setCell(new TitledCell());
list.add(cc);
count++;
}
getListStore().addAll(result.getData());
ColumnModel<Tuple<Integer, List<String>>> colModel = new ColumnModel<Tuple<Integer, List<String>>>(
list);
grid = new Grid<Tuple<Integer, List<String>>>(getListStore(), colModel);
grid.setHeight(175);
grid.setAllowTextSelection(true);
grid.getView().setAdjustForHScroll(false);
grid.getView().setEmptyText("没有数据!");
}
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:25,代码来源:DataPreviewGrid.java
示例6: createAndAddGridPortlet
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的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);
}
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:26,代码来源:ContentView.java
示例7: createDraggableGrid
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的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;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:13,代码来源:LayerCatalogDialog.java
示例8: initializeStatusGrid
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的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));
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:34,代码来源:StatusPanelWidget.java
示例9: createGrid
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的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;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:29,代码来源:VehicleDialog.java
示例10: setGridDragable
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private void setGridDragable(final Grid<GitHubFileListAttributeBean> grid) {
new GridDragSource<GitHubFileListAttributeBean>(grid);
final GridDropTarget<GitHubFileListAttributeBean> gridDrop = new GridDropTarget<GitHubFileListAttributeBean>(
grid);
gridDrop.setAllowSelfAsSource(true);
gridDrop.setFeedback(Feedback.BOTH);
gridDrop.addDragEnterHandler(new DndDragEnterHandler() {
@Override
public void onDragEnter(final DndDragEnterEvent event) {
}
});
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:16,代码来源:GitHubFileListDialog.java
示例11: createPanel
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private Widget createPanel() {
final VerticalLayoutContainer vPanel = new VerticalLayoutContainer();
vPanel.addStyleName(ThemeStyles.get().style().borderBottom());
final GitHubRepositoryAttributeBeanProperties props = GWT
.create(GitHubRepositoryAttributeBeanProperties.class);
repositoryStore = new ListStore<GitHubRepositoryAttributeBean>(props.key());
final ColumnConfig<GitHubRepositoryAttributeBean, Integer> idCol = new ColumnConfig<GitHubRepositoryAttributeBean, Integer>(
props.attributeId(), 190, "Id");
final ColumnConfig<GitHubRepositoryAttributeBean, String> nameCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
props.attributeName(), 190, UIMessages.INSTANCE.gitHubColumNameRepo());
final ColumnConfig<GitHubRepositoryAttributeBean, String> descriptionCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
props.description(), 200, UIMessages.INSTANCE.gitHubColumDescriptionRepo());
final ColumnConfig<GitHubRepositoryAttributeBean, String> fullNameCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
props.attributeFullName(), 200, "Full Name");
final List<ColumnConfig<GitHubRepositoryAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubRepositoryAttributeBean, ?>>();
//columns.add(idCol);
columns.add(nameCol);
columns.add(descriptionCol);
//columns.add(fullNameCol);
final ColumnModel<GitHubRepositoryAttributeBean> columModel = new ColumnModel<GitHubRepositoryAttributeBean>(
columns);
grid = new Grid<GitHubRepositoryAttributeBean>(
repositoryStore, columModel);
//grid.setSelectionModel(new CellSelectionModel<GitHubRepositoryAttributeBean>());
grid.getColumnModel().getColumn(0).setHideable(false);
grid.setAllowTextSelection(true);
grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true);
grid.setBorders(false);
setGridDragable(grid);
vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(5, 0, 0, 0)));
return vPanel;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:41,代码来源:GitHubRepositoryListDialog.java
示例12: createGridRolesChoices
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private void createGridRolesChoices() {
storeRolesChoices = new ListStore<Role>(roleProperties.id());
IdentityValueProvider<Role> identityRolesChoices = new IdentityValueProvider<Role>();
smRolesChoices = new CheckBoxSelectionModel<Role>(identityRolesChoices);
smRolesChoices.setSelectionMode(Style.SelectionMode.SINGLE);
smRolesChoices.addSelectionHandler(new SelectionHandler<Role>() {
@Override
public void onSelection(SelectionEvent<Role> event) {
addButton.setEnabled(smRolesChoices.getSelectedItems()
.size() > 0);
}
});
ColumnConfig<Role, String> roleColumn = new ColumnConfig<Role, String>(roleProperties.role(),
200,
"Roles Choices");
List<ColumnConfig<Role, ?>> columns = new ArrayList<ColumnConfig<Role, ?>>();
columns.add(smRolesChoices.getColumn());
columns.add(roleColumn);
ColumnModel<Role> cm = new ColumnModel<Role>(columns);
gridRolesChoices = new Grid<Role>(storeRolesChoices,
cm);
gridRolesChoices.setSize("100%",
"200px");
gridRolesChoices.setBorders(true);
gridRolesChoices.getView()
.setAutoExpandColumn(roleColumn);
gridRolesChoices.getView()
.setStripeRows(true);
gridRolesChoices.setSelectionModel(smRolesChoices);
}
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:35,代码来源:UserRoleView.java
示例13: createGridSelectedRoles
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private void createGridSelectedRoles() {
storeSelectedRoles = new ListStore<Role>(roleProperties.id());
IdentityValueProvider<Role> identitySelectedRoles = new IdentityValueProvider<Role>();
smSelectedRoles = new CheckBoxSelectionModel<Role>(identitySelectedRoles);
smSelectedRoles.setSelectionMode(Style.SelectionMode.SINGLE);
smSelectedRoles.addSelectionHandler(new SelectionHandler<Role>() {
@Override
public void onSelection(SelectionEvent<Role> event) {
addButton.setEnabled(smSelectedRoles.getSelectedItems()
.size() > 0);
}
});
ColumnConfig<Role, String> roleColumn = new ColumnConfig<Role, String>(roleProperties.role(),
200,
"Roles Selected");
List<ColumnConfig<Role, ?>> columns = new ArrayList<ColumnConfig<Role, ?>>();
columns.add(smSelectedRoles.getColumn());
columns.add(roleColumn);
ColumnModel<Role> cm = new ColumnModel<Role>(columns);
gridSelectedRoles = new Grid<Role>(storeSelectedRoles,
cm);
gridSelectedRoles.setSize("100%",
"100%");
gridSelectedRoles.setBorders(true);
gridSelectedRoles.getView()
.setAutoExpandColumn(roleColumn);
gridSelectedRoles.getView()
.setStripeRows(true);
gridSelectedRoles.setSelectionModel(smSelectedRoles);
}
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:35,代码来源:UserRoleView.java
示例14: createAndAddGridPersonPortlet
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private void createAndAddGridPersonPortlet() {
storePerson = new ListStore<>(personProperties.key());
ColumnConfig<Person, String> firstNameColumn = new ColumnConfig<>(personProperties.firstName(),
128,
"Firstname");
ColumnConfig<Person, String> nameColumn = new ColumnConfig<>(personProperties.name(),
128,
"Name");
ColumnConfig<Person, String> streetColumn = new ColumnConfig<>(personProperties.street(),
128,
"Street");
ColumnConfig<Person, String> cityColumn = new ColumnConfig<>(personProperties.city(),
128,
"City");
List<ColumnConfig<Person, ?>> columns = new ArrayList<>();
columns.add(firstNameColumn);
columns.add(nameColumn);
columns.add(streetColumn);
columns.add(cityColumn);
ColumnModel<Person> cm = new ColumnModel<>(columns);
gridPerson = new Grid<>(storePerson,
cm);
// gridPerson.setWidth("100%");
gridPerson.getView()
.setAutoExpandColumn(nameColumn);
gridPerson.getView()
.setForceFit(true);
gridPerson.getView()
.setStripeRows(true);
gridPerson.getView()
.setColumnLines(true);
gridPerson.setHeight(512);
Portlet portlet02 = new Portlet();
portlet02.setHeading("Persons");
portlet02.add(gridPerson);
portal.add(portlet02,
0);
}
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:39,代码来源:ContentView.java
示例15: createPanel
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private Widget createPanel() {
final VerticalLayoutContainer vPanel = new VerticalLayoutContainer();
vPanel.addStyleName(ThemeStyles.get().style().borderBottom());
final FeatureAttributeBeanProperties props = GWT
.create(FeatureAttributeBeanProperties.class);
featureAttributes = new ListStore<FeatureAttributeBean>(props.key());
final ColumnConfig<FeatureAttributeBean, String> nameCol = new ColumnConfig<FeatureAttributeBean, String>(
props.attributeName(), 190, UIMessages.INSTANCE.fidNameCol());
final ColumnConfig<FeatureAttributeBean, String> valueCol = new ColumnConfig<FeatureAttributeBean, String>(
props.attributeValue(), 200, UIMessages.INSTANCE.fidValueCol());
valueCol.setCell(new FeatureGridCellRenderer());
final List<ColumnConfig<FeatureAttributeBean, ?>> columns = new ArrayList<ColumnConfig<FeatureAttributeBean, ?>>();
columns.add(nameCol);
columns.add(valueCol);
final ColumnModel<FeatureAttributeBean> columModel = new ColumnModel<FeatureAttributeBean>(
columns);
final Grid<FeatureAttributeBean> grid = new Grid<FeatureAttributeBean>(
featureAttributes, columModel);
grid.setSelectionModel(new CellSelectionModel<FeatureAttributeBean>());
grid.getColumnModel().getColumn(0).setHideable(false);
grid.setAllowTextSelection(true);
grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true);
grid.setBorders(false);
setGridDragable(grid);
// Definicion del Grid Editable
final GridEditing<FeatureAttributeBean> gridEditing = new GridInlineEditing<FeatureAttributeBean>(grid);
gridEditing.addEditor(valueCol, new TextField());
featureInfoToolBar.initialize(gridEditing, featureAttributes);
vPanel.add(featureInfoToolBar, new VerticalLayoutData(1, -1,
new Margins(5, 0, 0, 0)));
vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(5, 0, 0, 0)));
final ToolButton tButton = new ToolButton(ToolButton.QUESTION);
setHelpToolTip(tButton);
addHelpSelectHandler(tButton);
getHeader().addTool(tButton);
return vPanel;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:50,代码来源:FeatureInfoDialog.java
示例16: createPanel
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private Widget createPanel() {
userNameField = new TextField();
userNameField.setTitle(UIMessages.INSTANCE.gitHubUserNameField());
userNameField.setEmptyText(UIMessages.INSTANCE.gitHubUserNameField());
userNameField.setWidth(FIELD_WIDTH);
repositoryField = new TextField();
repositoryField.setTitle("Repositorio");
repositoryField.setEmptyText("Introduce repositorio");
repositoryField.setWidth(FIELD_WIDTH);
pathField = new TextField();
pathField.setTitle(UIMessages.INSTANCE.gitHubPathNameField());
pathField.setEmptyText(UIMessages.INSTANCE.gitHubPathNameField());
pathField.setWidth(FIELD_WIDTH);
TextButton repositoryButton = new TextButton("...");
TextButton pathButton = new TextButton("...");
TextButton loadFilesButton = new TextButton(UIMessages.INSTANCE.loadFiles());
final VerticalLayoutContainer vPanel = new VerticalLayoutContainer();
vPanel.add(userNameField);
final HorizontalPanel repositoryPanel = new HorizontalPanel();
repositoryPanel.add(repositoryField);
repositoryPanel.add(repositoryButton);
vPanel.add(repositoryPanel);
final HorizontalPanel pathPanel = new HorizontalPanel();
pathPanel.add(pathField);
pathPanel.add(pathButton);
vPanel.add(pathPanel);
vPanel.add(loadFilesButton);
repositoryButton.addSelectHandler(getRepository());
pathButton.addSelectHandler(getPath());
loadFilesButton.addSelectHandler(requestGetFiles());
vPanel.addStyleName(ThemeStyles.get().style().borderBottom());
final GitHubFileListAttributeBeanProperties props = GWT
.create(GitHubFileListAttributeBeanProperties.class);
repositoryStore = new ListStore<GitHubFileListAttributeBean>(
props.key());
final ColumnConfig<GitHubFileListAttributeBean, String> nameCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
props.attributeName(), 400,
UIMessages.INSTANCE.gitHubColumNameRepo());
// final ColumnConfig<GitHubFileListAttributeBean, String> typeCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
// props.attributeType(), 200, "Type");
final List<ColumnConfig<GitHubFileListAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubFileListAttributeBean, ?>>();
columns.add(nameCol);
//columns.add(typeCol);
final ColumnModel<GitHubFileListAttributeBean> columModel = new ColumnModel<GitHubFileListAttributeBean>(
columns);
grid = new Grid<GitHubFileListAttributeBean>(repositoryStore,
columModel);
// grid.setSelectionModel(new
// CellSelectionModel<GitHubRepositoryAttributeBean>());
grid.getColumnModel().getColumn(0).setHideable(false);
grid.setAllowTextSelection(true);
grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true);
grid.setBorders(false);
GridSelectionModel<GitHubFileListAttributeBean> sm = new GridSelectionModel<GitHubFileListAttributeBean>();
sm.setSelectionMode(SelectionMode.SINGLE);
grid.setSelectionModel(sm);
setGridDragable(grid);
vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(30, 0, 0, 0)));
return vPanel;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:81,代码来源:GitHubFileListDialog.java
示例17: GitHubImportTab
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
public GitHubImportTab() {
super();
setWidth(350);
userNameField = new TextField();
userNameField.setTitle(UIMessages.INSTANCE.gitHubUserNameField());
userNameField.setEmptyText(UIMessages.INSTANCE.gitHubUserNameField());
userNameField.setWidth(150);
repositoryField = new TextField();
repositoryField.setTitle("Repositorio");
repositoryField.setEmptyText("Introduce repositorio");
repositoryField.setWidth(150);
pathField = new TextField();
pathField.setTitle(UIMessages.INSTANCE.gitHubPathNameField());
pathField.setEmptyText(UIMessages.INSTANCE.gitHubPathNameField());
pathField.setWidth(FIELD_WIDTH);
TextButton repositoryButton = new TextButton("...");
TextButton pathButton = new TextButton("...");
TextButton loadFilesButton = new TextButton(
UIMessages.INSTANCE.loadFiles());
final HorizontalPanel repositoryPanel = new HorizontalPanel();
repositoryPanel.add(userNameField);
repositoryPanel.add(repositoryField);
repositoryPanel.add(repositoryButton);
add(repositoryPanel);
final HorizontalPanel pathPanel = new HorizontalPanel();
pathPanel.add(pathField);
pathPanel.add(pathButton);
add(pathPanel);
add(loadFilesButton);
repositoryButton.addSelectHandler(getRepository());
pathButton.addSelectHandler(getPath());
loadFilesButton.addSelectHandler(requestGetFiles());
addStyleName(ThemeStyles.get().style().borderBottom());
final GitHubFileListAttributeBeanProperties props = GWT
.create(GitHubFileListAttributeBeanProperties.class);
fileStore = new ListStore<GitHubFileListAttributeBean>(
props.key());
final ColumnConfig<GitHubFileListAttributeBean, String> nameCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
props.attributeName(), 330,
UIMessages.INSTANCE.gitHubColumNameRepo());
final List<ColumnConfig<GitHubFileListAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubFileListAttributeBean, ?>>();
columns.add(nameCol);
final ColumnModel<GitHubFileListAttributeBean> columModel = new ColumnModel<GitHubFileListAttributeBean>(
columns);
grid = new Grid<GitHubFileListAttributeBean>(fileStore,
columModel);
grid.getView().setAutoFill(false);
grid.setWidth(260);
grid.getColumnModel().getColumn(0).setHideable(false);
grid.setAllowTextSelection(true);
grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true);
grid.setBorders(false);
setGridDragable(grid);
add(grid, new VerticalLayoutData(1, 1, new Margins(5, 0, 0, 0)));
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:74,代码来源:GitHubImportTab.java
示例18: createPanel
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
private Widget createPanel() {
final VerticalLayoutContainer vPanel = new VerticalLayoutContainer();
vPanel.addStyleName(ThemeStyles.get().style().borderBottom());
final GitHubFileListAttributeBeanProperties props = GWT
.create(GitHubFileListAttributeBeanProperties.class);
repositoryStore = new ListStore<GitHubFileListAttributeBean>(
props.key());
final ColumnConfig<GitHubFileListAttributeBean, String> nameCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
props.attributeName(), 400,
UIMessages.INSTANCE.gitHubColumNameRepo());
// final ColumnConfig<GitHubFileListAttributeBean, String> typeCol = new
// ColumnConfig<GitHubFileListAttributeBean, String>(
// props.attributeType(), 200, "Type");
final List<ColumnConfig<GitHubFileListAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubFileListAttributeBean, ?>>();
columns.add(nameCol);
// columns.add(typeCol);
final ColumnModel<GitHubFileListAttributeBean> columModel = new ColumnModel<GitHubFileListAttributeBean>(
columns);
grid = new Grid<GitHubFileListAttributeBean>(repositoryStore,
columModel);
// grid.setSelectionModel(new
// CellSelectionModel<GitHubRepositoryAttributeBean>());
grid.getColumnModel().getColumn(0).setHideable(false);
grid.setAllowTextSelection(true);
grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true);
grid.setBorders(false);
setGridDragable(grid);
vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(30, 0, 0, 0)));
return vPanel;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:43,代码来源:GitHubPathListDialog.java
示例19: FileManagerGridInlineEditing
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
FileManagerGridInlineEditing(Grid<FileModel> editableGrid) {
super(editableGrid);
}
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:4,代码来源:FileManagerGridInlineEditing.java
示例20: HostGroupWindow
import com.sencha.gxt.widget.core.client.grid.Grid; //导入依赖的package包/类
public HostGroupWindow() {
setHeadingText("host分组信息");
setModal(true);
setHeight(600);
setWidth(500);
container = new VerticalLayoutContainer();
container.setHeight(300);
container.setWidth(300);
add(container);
ColumnConfig<HostGroupModel, String> idColumn = new ColumnConfig<HostGroupModel, String>(
props.id(), 30, "id");
ColumnConfig<HostGroupModel, String> nameColumn = new ColumnConfig<HostGroupModel, String>(
props.name(), 30, "组名");
ColumnConfig<HostGroupModel, String> descriptionColumn = new ColumnConfig<HostGroupModel, String>(
props.description(), 60, "描述");
ColumnModel<HostGroupModel> cm = new ColumnModel(Arrays.asList(
idColumn, nameColumn, descriptionColumn));
store = new ListStore<HostGroupModel>(
new ModelKeyProvider<HostGroupModel>() {
@Override
public String getKey(HostGroupModel item) {
return String.valueOf(item.getId());
}
});
RpcProxy<PagingLoadConfig, PagingLoadResult<HostGroupModel>> proxy = new RpcProxy<PagingLoadConfig, PagingLoadResult<HostGroupModel>>() {
@Override
public void load(
PagingLoadConfig loadConfig,
final AsyncCallback<PagingLoadResult<HostGroupModel>> callback) {
RPCS.getJobService().getHostGroup(loadConfig, callback);
}
};
loader = new PagingLoader<PagingLoadConfig, PagingLoadResult<HostGroupModel>>(
proxy);
loader.setLimit(20);
loader.addLoadHandler(new LoadResultListStoreBinding<PagingLoadConfig, HostGroupModel, PagingLoadResult<HostGroupModel>>(
store));
grid = new Grid<HostGroupModel>(store, cm);
grid.setLoader(loader);
grid.setLoadMask(true);
grid.getView().setForceFit(true);
toolBar = new PagingToolBar(20);
toolBar.bind(loader);
container.add(grid,new VerticalLayoutData(1, 1));
container.add(toolBar,new VerticalLayoutData(1, 30));
addButton(new TextButton("确定", new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
if (handler != null) {
handler.onSelect(event);
}
}
}));
refresh();
}
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:63,代码来源:HostGroupWindow.java
注:本文中的com.sencha.gxt.widget.core.client.grid.Grid类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论