当前位置: 首页>>代码示例>>Java>>正文


Java DetailViewer.setWidth方法代码示例

本文整理汇总了Java中com.smartgwt.client.widgets.viewer.DetailViewer.setWidth方法的典型用法代码示例。如果您正苦于以下问题:Java DetailViewer.setWidth方法的具体用法?Java DetailViewer.setWidth怎么用?Java DetailViewer.setWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.smartgwt.client.widgets.viewer.DetailViewer的用法示例。


在下文中一共展示了DetailViewer.setWidth方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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;
}
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:17,代码来源:NewsListGrid.java

示例2: 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;
}
 
开发者ID:ow2-proactive,项目名称:scheduling-portal,代码行数:30,代码来源:SourceHostsView.java

示例3: 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;
}
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:34,代码来源:UploadedAlgorithmListGrid.java


注:本文中的com.smartgwt.client.widgets.viewer.DetailViewer.setWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。