本文整理汇总了Java中com.smartgwt.client.widgets.grid.ListGrid类的典型用法代码示例。如果您正苦于以下问题:Java ListGrid类的具体用法?Java ListGrid怎么用?Java ListGrid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListGrid类属于com.smartgwt.client.widgets.grid包,在下文中一共展示了ListGrid类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: ExportResultWidget
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
public ExportResultWidget() {
i18n = GWT.create(ClientMessages.class);
VLayout vLayout = new VLayout();
vLayout.setWidth100();
vLayout.setHeight100();
grid = new ListGrid();
grid.setSelectionType(SelectionStyle.SINGLE);
grid.setFixedRecordHeights(false);
grid.setWrapCells(true);
ListGridField pidField = new ListGridField(ExportResourceApi.RESULT_ERROR_PID,
i18n.ExportResultWidget_PID_Title());
ListGridField errorField = new ListGridField(ExportResourceApi.RESULT_ERROR_MESSAGE,
i18n.ExportResultWidget_Message_Title());
grid.setFields(pidField, errorField);
grid.addSelectionUpdatedHandler(new SelectionUpdatedHandler() {
@Override
public void onSelectionUpdated(SelectionUpdatedEvent event) {
logForm.editSelectedData(grid);
}
});
logForm = createLogForm();
vLayout.setMembers(grid, logForm);
this.widget = vLayout;
}
开发者ID:proarc,项目名称:proarc,代码行数:27,代码来源:DesaExportAction.java
示例2: fixListGridContextMenu
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
/**
* Fixes {@link ListGrid} context menu
* to update grid selection on right click properly.
* <p>Bug: right click selects row without firing selection event.
*/
public static void fixListGridContextMenu(final ListGrid grid) {
grid.addShowContextMenuHandler(new ShowContextMenuHandler() {
@Override
public void onShowContextMenu(ShowContextMenuEvent event) {
int eventRow = grid.getEventRow();
if (eventRow < 0) {
return ;
}
ListGridRecord[] selectedRecords = grid.getSelectedRecords();
if (selectedRecords.length <= 1) {
// ListGrid does not fire selection updated event if right click
// no select if multi-selection exists
grid.selectSingleRecord(eventRow);
}
Menu contextMenu = grid.getContextMenu();
contextMenu.showContextMenu();
event.cancel();
}
});
}
开发者ID:proarc,项目名称:proarc,代码行数:29,代码来源:Actions.java
示例3: createUserList
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private ListGrid createUserList(ToolStrip gridEditControls) {
final ListGrid grid = new ListGrid() {
@Override
protected Canvas getExpansionComponent(ListGridRecord record) {
return getRowProfileEditor(record);
}
};
grid.setDataSource(UserDataSource.getInstance());
grid.setUseAllDataSourceFields(true);
grid.setSelectionType(SelectionStyle.SINGLE);
grid.setCanExpandRecords(true);
grid.setCanExpandMultipleRecords(false);
grid.setGridComponents(gridEditControls, ListGridComponent.HEADER, ListGridComponent.BODY);
// Since SmartGWT 4.0; disable auto-save to post updates of nested forms just on the submit actions.
grid.setAutoSaveEdits(false);
grid.setShowClippedValuesOnHover(true);
return grid;
}
开发者ID:proarc,项目名称:proarc,代码行数:21,代码来源:UsersView.java
示例4: changeState
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
public void changeState(boolean collapsed) {
// LOG.info("changeState: " + getName() + ", " + collapsed);
setCanFocus(!collapsed);
if (btnSwitch != null) {
String switchIcon = collapsed
? "[SKIN]SectionHeader/opener_closed.png"
: "[SKIN]SectionHeader/opener_opened.png";
btnSwitch.setIcon(switchIcon);
}
if (btnAdd != null) {
btnAdd.setDisabled(collapsed);
}
ListGrid grid = getGrid();
if (grid != null) {
Canvas gridCanvas = grid.getParentElement();
if (collapsed) {
gridCanvas.hide();
} else {
gridCanvas.show();
}
}
}
开发者ID:proarc,项目名称:proarc,代码行数:23,代码来源:ListFormItem.java
示例5: setData
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private static void setData(ListFormItem item, Record... data) {
LOG.fine(ClientUtils.format("[%s] data: %s, class: %s",
item.getName(),
data,
ClientUtils.safeGetClass(data)
));
if (data != null) {
LOG.finest(ClientUtils.format("[%s] data.getLength: %s", item.getName(), data.length));
LOG.fine(ClientUtils.format("[%s] data.toArray: %s", item.getName(), Arrays.toString(data)));
}
ListGrid canvas = item.getGrid();
if (canvas != null) {
canvas.setData(data);
}
}
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:ListFormItem.java
示例6: buildGiVisUi
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private void buildGiVisUi(long runId) {
ListGrid masterList = new ListGrid();
masterList.setDataSource(GeneralItemVisibilityDataSource.getInstance());
GeneralItemVisibilityDataSource.getInstance().loadDataFromWeb(runId);
ListGridField giField = new ListGridField(GeneralItemsVisibilityModel.GENERALITEMID_FIELD, "gi");
ListGridField statusField = new ListGridField(GeneralItemsVisibilityModel.STATUS_FIELD, "status");
ListGridField accountField = new ListGridField(GeneralItemsVisibilityModel.ACCOUNT_FIELD, "account");
ListGridField timeField = new ListGridField(GeneralItemsVisibilityModel.TIMESTAMP_FIELD, "time");
ListGridField timePrettyField = new ListGridField(GeneralItemsVisibilityModel.TIMESTAMP_PRETTY_FIELD, "time pretty");
ListGridField lastModField = new ListGridField(GeneralItemsVisibilityModel.LASTMODIFICATION_FIELD, "last modification");
timeField.setType(ListGridFieldType.FLOAT);
ListGridField lastModPretty = new ListGridField(GeneralItemsVisibilityModel.LASTMODIFICATIONPRETTY_FIELD, "last mod");
masterList.setFields(new ListGridField[]{giField,statusField,accountField, timeField, timePrettyField, lastModField, lastModPretty});
masterList.setAutoFetchData(true);
masterList.setWidth100();
masterList.setHeight100();
masterList.setShowFilterEditor(true);
masterList.setEditByCell(true);
masterList.setCanEdit(true);
RootPanel.get("debug").add(masterList);
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:26,代码来源:DebugPage.java
示例7: setUpGeneralItems
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private void setUpGeneralItems() {
generalItems = new ListGrid();
generalItems.setStyleName("listGridGeneralItemsStyle");
ListGridField gameIdField = new ListGridField(GameModel.GAMEID_FIELD, "Game");
gameIdField.setHidden(true);
ListGridField nameField = new ListGridField(GeneralItemModel.NAME_FIELD, "Name");
nameField.setWidth("15%");
ListGridField descriptionField = new ListGridField("description", "Description");
descriptionField.setWidth("30%");
ListGridField longDescriptionField = new ListGridField("richText", "Long Description");
longDescriptionField.setWidth("50%");
ListGridField rolesField = new ListGridField("roles", "Roles");
rolesField.setWidth("5%");
ListGridField simpleNameField = new ListGridField("simpleName", "Simple Name");
simpleNameField.setWidth("10%");
generalItems.setFields(new ListGridField[] { gameIdField, nameField, descriptionField, longDescriptionField, rolesField, simpleNameField });
generalItems.setID("boundListGridGenealItems");
generalItems.setHeight("45%");
generalItems.setDataSource(GeneralItemDataSource.getInstance());
generalItems.fetchData();
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:24,代码来源:ListSearch.java
示例8: getGamesGrid
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private VLayout getGamesGrid() {
VLayout from = new VLayout(10);
from.setWidth("50%");
ListGrid masterList = new GenericListGrid(false, false, false, false, false);
masterList.setAutoFetchData(true);
masterList.setDataSource(GameDataSource.getInstance());
ListGridField titleGameField = new ListGridField(GameModel.GAME_TITLE_FIELD, constants.title());
masterList.setFields(new ListGridField[]{titleGameField});
from.addMember(masterList);
masterList.addCellClickHandler(new CellClickHandler() {
@Override
public void onCellClick(CellClickEvent event) {
Game existingGame = new Game(((AbstractRecord)GameDataSource.getInstance().getRecord(event.getRecord().getAttributeAsLong(GameModel.GAMEID_FIELD))).getCorrespondingJsonObject());
pane.setContents("Game "+existingGame.getGameId());
setTarget(existingGame);
setDynamicForm(existingGame);
}
});
return from;
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:22,代码来源:UploadGamePictureWindow.java
示例9: buildGui
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private void buildGui() {
grid = new ListGrid();
grid.setWidth100();
grid.setHeight("*");
grid.setSelectionType(SelectionStyle.SINGLE);
grid.setShowAllRecords(true);
ListGridField nameFld = new ListGridField(FLD_NAME,
MESSAGES.layerListClientWmsWizardStepSelectLayerGridName());
nameFld.setType(ListGridFieldType.TEXT);
nameFld.setWidth("*");
ListGridField descFld = new ListGridField(FLD_DESC,
MESSAGES.layerListClientWmsWizardStepSelectLayerGridDescription());
descFld.setType(ListGridFieldType.TEXT);
descFld.setWidth("*");
grid.setFields(nameFld, descFld);
grid.setCanResizeFields(true);
layout = new VLayout();
layout.setWidth100();
layout.setHeight100();
layout.addMember(grid);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:26,代码来源:SelectLayerViewImpl.java
示例10: commonGridSettings
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
void commonGridSettings(ListGrid listGrid) {
listGrid.setWidth100();
listGrid.setShowAllRecords(true);
listGrid.setShowRowNumbers(false);
listGrid.setCanExpandMultipleRecords(false);
listGrid.setWrapCells(true);
listGrid.setFixedRecordHeights(false);
listGrid.setCanExpandRecords(false);
listGrid.setCanMultiSort(true);
listGrid.setCanResizeFields(true);
listGrid.setAlternateRecordStyles(true);
listGrid.setShowGroupSummary(true);
listGrid.setShowHeaderMenuButton(false);
listGrid.setSelectionType(SelectionStyle.NONE);
}
开发者ID:will-gilbert,项目名称:OSWf-OSWorkflow-fork,代码行数:16,代码来源:SimulatorView.java
示例11: build
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
/**
* Create and return the view's widgets
*
* @return a widget to add in the container that should display this view
*/
public Layout build() {
this.root = new VLayout();
this.root.setWidth100();
this.root.setHeight100();
this.usersGrid = new ListGrid();
this.usersGrid.setWidth100();
this.usersGrid.setHeight100();
this.usersGrid.setCanFreezeFields(true);
this.usersGrid.setSelectionType(SelectionStyle.NONE);
ListGridField hostField = new ListGridField(HOST_ATTR, "Hostname");
alignCenter(hostField);
ListGridField userField = new ListGridField(USER_ATTR, "User");
userField.setWidth(120);
alignCenter(userField);
ListGridField connField = new ListGridField(CONN_TIME_ATTR, "Connected at");
alignCenter(connField);
ListGridField subTimeField = new ListGridField(SUBMIT_TIME_ATTR, "Last submit");
alignCenter(subTimeField);
ListGridField subNumField = new ListGridField(SUBMIT_NUM_ATTR, "Jobs");
subNumField.setWidth(80);
alignCenter(subNumField);
this.usersGrid.setFields(userField, subNumField, connField, subTimeField, hostField);
this.root.addMember(this.usersGrid);
return this.root;
}
开发者ID:ow2-proactive,项目名称:scheduling-portal,代码行数:39,代码来源:UsersView.java
示例12: KeyValueGrid
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
/**
* Contructor
* @param gridLabel the label displayed above the grid
*/
public KeyValueGrid(String gridLabel) {
keyValueColumnsFactory = new KeyValueColumnsFactory();
keyValueGridLabel = new Label("<b>" + gridLabel + "</b>");
keyValueGridLabel.setValign(VerticalAlignment.BOTTOM);
keyValueGridLabel.setHeight(30);
keyValueGrid = new ListGrid();
keyValueGrid.setWidth100();
GridColumns[] columns = keyValueColumnsFactory.getColumns();
ListGridField[] fields = new ListGridField[columns.length];
for (int i = 0; i < columns.length; i++) {
GridColumns column = columns[i];
fields[i] = new ListGridField(column.getName(), column.getTitle());
}
keyValueGrid.setFields(fields);
//VStack methods
setWidth100();
addMember(keyValueGridLabel);
addMember(keyValueGrid);
hide();
}
开发者ID:ow2-proactive,项目名称:scheduling-portal,代码行数:33,代码来源:KeyValueGrid.java
示例13: build
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
public Layout build() {
final VLayout root = new VLayout();
root.setWidth100();
root.setHeight100();
// for details grid to be shown even if empty
root.setMinMemberSize(200);
DynamicForm dateInputs = createDateInputs();
HLayout detailsLabelAndExportButton = createDetailsLabelAndExportButton();
ListGrid details = createDetailsGrid();
root.addMember(dateInputs);
root.addMember(detailsLabelAndExportButton);
root.addMember(details);
VisualizationUtils.loadVisualizationApi(new Runnable() {
@Override
public void run() {
Label summaryLabel = new Label("<h3>Summary</h3>");
summaryLabel.setHeight(20);
VLayout charts = createCharts(root);
root.addMember(summaryLabel, 1);
root.addMember(charts, 2);
updateCharts();
}
}, CoreChart.PACKAGE);
controller.getUsersWithJobs();
return root;
}
开发者ID:ow2-proactive,项目名称:scheduling-portal,代码行数:31,代码来源:UsageView.java
示例14: createAdvancedOptions
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private Canvas createAdvancedOptions() {
formCatalog = createCatalogForm();
lgResult = new ListGrid();
lgResult.setDataSource(BibliographyQueryDataSource.getInstance());
// lgResult.setUseAllDataSourceFields(true);
ListGridField preview = new ListGridField(BibliographyQueryDataSource.FIELD_PREVIEW,
i18n.CatalogBrowser_HeaderPreview_Title());
ListGridField title = new ListGridField(BibliographyQueryDataSource.FIELD_TITLE,
i18n.CatalogBrowser_HeaderTitle_Title());
lgResult.setDetailField(BibliographyQueryDataSource.FIELD_PREVIEW);
lgResult.setFields(title, preview);
// lgResult.setAutoFetchData(true);
lgResult.setHeight100();
lgResult.setWidth100();
lgResult.setCanExpandRecords(true);
lgResult.setCanExpandMultipleRecords(false);
lgResult.setExpansionMode(ExpansionMode.DETAIL_FIELD);
lgResult.setSelectionType(SelectionStyle.SINGLE);
// lgResult.setSelectionAppearance(SelectionAppearance.CHECKBOX);
lgResult.setAlternateRecordStyles(true);
lgResult.addDataArrivedHandler(new DataArrivedHandler() {
@Override
public void onDataArrived(DataArrivedEvent event) {
if (event.getStartRow() == 0 && event.getEndRow() > 0) {
lgResult.focus();
lgResult.selectSingleRecord(0);
}
}
});
VLayout layout = new VLayout();
layout.setMembers(formCatalog, lgResult);
layout.setMargin(4);
layout.setMembersMargin(4);
layout.setOverflow(Overflow.AUTO);
return layout;
}
开发者ID:proarc,项目名称:proarc,代码行数:40,代码来源:CatalogBrowser.java
示例15: getGrid
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private ListGrid getGrid() {
// Canvas canvas = getCanvas();
// for (Canvas child : canvas.getChildren()) {
// if (child instanceof ListGrid) {
// return (ListGrid) child;
// }
// }
// return null;
return this.listGrid;
}
开发者ID:proarc,项目名称:proarc,代码行数:11,代码来源:ListFormItem.java
示例16: buildActionUi
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private void buildActionUi(long runId) {
ListGrid masterList = new ListGrid();
masterList.setDataSource(ActionsDataSource.getInstance());
ActionsDataSource.getInstance().loadDataFromWeb(runId);
ListGridField actionField = new ListGridField(ActionModel.ACTION_FIELD, "action");
ListGridField generalItemField = new ListGridField(ActionModel.GENERALITEMID_FIELD, "generalItem");
ListGridField runIdField = new ListGridField(ActionModel.RUNID_FIELD, "runId");
ListGridField accountField = new ListGridField(ActionModel.ACCOUNT_FIELD, "account");
ListGridField timeField = new ListGridField(ActionModel.TIMESTAMP_FIELD, "time");
timeField.setType(ListGridFieldType.FLOAT);
ListGridField timePrettyField = new ListGridField(ActionModel.TIMESTAMP_PRETTY_FIELD, "time");
masterList.setFields(new ListGridField[]{actionField,generalItemField, runIdField, timePrettyField,accountField, timeField});
masterList.setAutoFetchData(true);
masterList.setWidth100();
masterList.setHeight100();
masterList.setShowFilterEditor(true);
masterList.setEditByCell(true);
masterList.setCanEdit(true);
RootPanel.get("debug").add(masterList);
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:29,代码来源:DebugPage.java
示例17: getTeamGrid
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private Canvas getTeamGrid() {
teamGrid= new ListGrid() {
@Override
protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) {
return createRecordComponent2(record, colNum, this.getFieldName(colNum));
}
};
teamGrid.setCanEdit(false);
teamGrid.setWidth("30%");
teamGrid.setShowRollOverCanvas(false);
teamGrid.setShowRecordComponentsByCell(true);
teamGrid.setShowRecordComponents(true);
teamGrid.setAutoFetchData(true);
teamGrid.setDataSource(TeamDataSource.getInstance());
ListGridField nameField = new ListGridField(TeamModel.NAME_FIELD, constants.name());
ListGridField deleteField = new ListGridField("deleteField", " ");
deleteField.setWidth(20);
teamGrid.setFields(new ListGridField[] {nameField, deleteField });
return teamGrid;
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:28,代码来源:TeamConfigurationSection.java
示例18: getPlayersGrid
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private Canvas getPlayersGrid() {
playersGrid = new ListGrid() {
@Override
protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) {
return createRecordComponent2(record, colNum, this.getFieldName(colNum));
}
};
playersGrid.setCanEdit(false);
playersGrid.setWidth("30%");
playersGrid.setShowRollOverCanvas(false);
playersGrid.setShowRecordComponentsByCell(true);
playersGrid.setShowRecordComponents(true);
playersGrid.setAutoFetchData(true);
playersGrid.setDataSource(UserDataSource.getInstance());
ListGridField pictureField = new ListGridField(UserModel.PICTURE_FIELD, " ", 40);
pictureField.setAlign(Alignment.CENTER);
pictureField.setType(ListGridFieldType.IMAGE);
ListGridField nameField = new ListGridField(UserModel.NAME_FIELD, constants.name());
ListGridField emailField = new ListGridField(UserModel.EMAIL_FIELD, constants.email());
ListGridField deleteField = new ListGridField("deleteField", " ");
deleteField.setWidth(20);
playersGrid.setFields(new ListGridField[] {pictureField, nameField, emailField, deleteField });
return playersGrid;
}
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:32,代码来源:TeamPlayerConfigurationSection.java
示例19: renderAttributes
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
private void renderAttributes(Map<String, Attribute> attributes) {
ListGrid grid = new ListGrid();
grid.setCanEdit(false);
grid.setShowSelectedStyle(false);
grid.setShowRollOver(false);
grid.setShowHeader(false);
grid.setShowRecordComponents(true);
grid.setShowRecordComponentsByCell(true);
grid.setShowAllRecords(true);
grid.setLeaveScrollbarGap(false);
ListGridField keyField = new ListGridField("keyField");
ListGridField valueField = new ListGridField("valueField");
grid.setFields(keyField, valueField);
final RecordList recordList = new RecordList();
for (Entry<String, Attribute> entry : attributes.entrySet()) {
ListGridRecord record = new ListGridRecord();
record.setAttribute("keyField", entry.getKey());
record.setAttribute("valueField", toString(entry));
recordList.add(record);
}
grid.setData(recordList);
addMember(grid);
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:32,代码来源:RasterLayerAttributeWindow.java
示例20: execute
import com.smartgwt.client.widgets.grid.ListGrid; //导入依赖的package包/类
public boolean execute(ListGrid grid, ListGridField field, int fieldNum) {
if (identifying) {
return true;
}
if (grid instanceof FeatureListGrid) {
FeatureListGrid table = (FeatureListGrid) grid;
if (table.isAllAttributesDisplayed()) {
return true;
}
}
return false;
}
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:13,代码来源:FeatureListGrid.java
注:本文中的com.smartgwt.client.widgets.grid.ListGrid类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论