本文整理汇总了Java中com.smartgwt.client.widgets.viewer.DetailViewer.setFields方法的典型用法代码示例。如果您正苦于以下问题:Java DetailViewer.setFields方法的具体用法?Java DetailViewer.setFields怎么用?Java DetailViewer.setFields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.smartgwt.client.widgets.viewer.DetailViewer
的用法示例。
在下文中一共展示了DetailViewer.setFields方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMetadataViews
import com.smartgwt.client.widgets.viewer.DetailViewer; //导入方法依赖的package包/类
private void createMetadataViews() {
basicMetadataDetailViewer = new DetailViewer();
basicMetadataDetailViewer.setWidth100();
basicMetadataDetailViewer.setFields(
new DetailViewerField(GeneralItemModel.NAME_FIELD, "Title"),
new DetailViewerField(GeneralItemModel.SORTKEY_FIELD, "Order") ,
new DetailViewerField(GeneralItemModel.AUTO_LAUNCH, "Automatic Launch"),
new DetailViewerField(GeneralItemModel.RICH_TEXT_FIELD, "Description"),
new DetailViewerField("dependsOn", "Depends On")
);
extendedMetadataDetailViewer = new DetailViewer();
extendedMetadataDetailViewer.setWidth100();
extendedMetadataDetailViewer.setEmptyMessage("Select an item to view its details");
}
示例2: getCellHoverComponent
import com.smartgwt.client.widgets.viewer.DetailViewer; //导入方法依赖的package包/类
@Override
protected Canvas getCellHoverComponent(Record record, Integer rowNum, Integer colNum) {
DetailViewer detailViewer = new DetailViewer();
detailViewer.setWidth(400);
// Define the fields that we want to display in the details popup. These
// fields are populated from the selected record.
DetailViewerField dateField = new DetailViewerField(NewsColumns.DATE.colName(),
NewsColumns.DATE.normName());
DetailViewerField newsField = new DetailViewerField(NewsColumns.INFO.colName(), "News");
detailViewer.setFields(dateField, newsField);
detailViewer.setData(new Record[] { record });
return detailViewer;
}
示例3: getExpansionComponent
import com.smartgwt.client.widgets.viewer.DetailViewer; //导入方法依赖的package包/类
@Override
protected Canvas getExpansionComponent(final ListGridRecord record) {
if (expandRecord != null && expandRecord != record) {
this.collapseRecord(expandRecord);
}
this.expandRecord = record;
Task t = TaskRecord.getTask(record);
DetailViewer detail = new DetailViewer();
detail.setWidth100();
detail.setHeight100();
detail.setCanSelectText(true);
DetailViewerField[] fields = new DetailViewerField[4];
fields[0] = buildDetailViewer(TasksColumnsFactory.HOST_ATTR);
fields[1] = buildDetailViewer(TasksColumnsFactory.START_TIME_ATTR);
fields[2] = buildDetailViewer(TasksColumnsFactory.FINISHED_TIME_ATTR);
fields[3] = buildDetailViewer(TasksColumnsFactory.DESCRIPTION_ATTR);
detail.setFields(fields);
DetailViewerRecord detailRecord = new DetailViewerRecord();
this.expandTasksColumnsFactory.buildRecord(t, detailRecord);
detail.setData(new DetailViewerRecord[] { detailRecord });
VLayout layout = new VLayout();
layout.addMember(detail);
return layout;
}
示例4: generateDetails
import com.smartgwt.client.widgets.viewer.DetailViewer; //导入方法依赖的package包/类
private DetailViewer generateDetails(JSONObject hostc) {
DetailViewer details = new DetailViewer();
DetailViewerRecord dv = new DetailViewerRecord();
DetailViewerField[] fields = new DetailViewerField[hostc.keySet().size()];
int j = 0;
for (String hostatt : hostc.keySet()) {
fields[j++] = new DetailViewerField(convertIdToJavascriptId(hostatt));
}
details.setFields(fields);
for (String hostattkey : hostc.keySet()) {
String value = null;
if (hostc.get(hostattkey).isString() != null) {
value = hostc.get(hostattkey).isString().stringValue();
} else if (hostc.get(hostattkey).isNumber() != null) {
value = hostc.get(hostattkey).isNumber().toString();
} else if (hostc.get(hostattkey).isObject() != null) {
value = "< composed data >";
} else {
value = "";
}
dv.setAttribute(convertIdToJavascriptId(hostattkey), value);
}
details.setData(new DetailViewerRecord[] { dv });
details.setWidth("45%");
return details;
}
示例5: createGameDetailViewer
import com.smartgwt.client.widgets.viewer.DetailViewer; //导入方法依赖的package包/类
public void createGameDetailViewer() {
gameDetailViewer = new DetailViewer();
gameDetailViewer.setFields(
new DetailViewerField(GameModel.GAME_TITLE_FIELD, "Title"),
new DetailViewerField(GameModel.GAME_DESCRIPTION_FIELD, "Description")
);
}
示例6: setUpInformationArea
import com.smartgwt.client.widgets.viewer.DetailViewer; //导入方法依赖的package包/类
private void setUpInformationArea() {
informationArea = new DetailViewer();
informationArea.setHeight("45%");
informationArea.setTop(250);
informationArea.setFields(
new DetailViewerField(GameModel.GAME_TITLE_FIELD, "Title"),
new DetailViewerField(GameModel.GAMEID_FIELD, "Id"),
new DetailViewerField(GameModel.DELETED_FIELD, "Deleted"),
new DetailViewerField(GameModel.TIME_FIELD, "Time"));
informationArea.setEmptyMessage("Click a game in the grid");
}
示例7: getCellHoverComponent
import com.smartgwt.client.widgets.viewer.DetailViewer; //导入方法依赖的package包/类
@Override
protected Canvas getCellHoverComponent(Record record, Integer rowNum, Integer colNum) {
DetailViewer detailViewer = new DetailViewer();
detailViewer.setWidth(320);
// Define the fields that we want to display in the details popup. These
// fields are populated from the record of the selected algorithm.
DetailViewerField versionField = new DetailViewerField(UploadColumns.VERSION.colName(),
"Version");
DetailViewerField uploadedDateField = new DetailViewerField(
UploadColumns.UPLOAD_DATE.colName(), "Date Uploaded");
DetailViewerField algorithmNameField = new DetailViewerField(UploadColumns.NAME.colName(),
"Algorithm");
DetailViewerField userField = new DetailViewerField(UploadColumns.USER.colName(), "User");
DetailViewerField descriptionField = new DetailViewerField(
UploadColumns.DESCRIPTION.colName(), "Description");
DetailViewerField institutionField = new DetailViewerField(
UploadColumns.INSTITUTION.colName(), "Institution");
DetailViewerField creationDateField = new DetailViewerField(
UploadColumns.CREATEDATE.colName(), "Date Created");
DetailViewerField commentsField = new DetailViewerField(UploadColumns.COMMENT.colName(),
"Comments");
DetailViewerField statusField = new DetailViewerField(UploadColumns.STATUS.colName(),
"Status");
detailViewer
.setFields(algorithmNameField, statusField, institutionField, userField,
versionField, uploadedDateField, creationDateField, descriptionField,
commentsField);
detailViewer.setData(new Record[] { record });
return detailViewer;
}