本文整理汇总了Java中com.smartgwt.client.widgets.grid.ListGridRecord.setAttribute方法的典型用法代码示例。如果您正苦于以下问题:Java ListGridRecord.setAttribute方法的具体用法?Java ListGridRecord.setAttribute怎么用?Java ListGridRecord.setAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.smartgwt.client.widgets.grid.ListGridRecord
的用法示例。
在下文中一共展示了ListGridRecord.setAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillSummariesTable
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
private final void fillSummariesTable(List<ProcessDescriptorSummary> summaries) {
ListGridRecord[] array = new ListGridRecord[summaries.size()];
int i=0;
for(ProcessDescriptorSummary summary : summaries) {
ListGridRecord listGridRecord = new ListGridRecord();
listGridRecord.setAttribute("name", summary.name);
listGridRecord.setAttribute("iaCount", summary.initialActionCount);
listGridRecord.setAttribute("stepCount", summary.stepCount);
listGridRecord.setAttribute("splitCount", summary.splitCount);
listGridRecord.setAttribute("joinCount", summary.joinCount);
listGridRecord.setAttribute("piCount", summary.piCount);
listGridRecord.setAttribute("piCount-display", summary.piCount != 0 ? summary.piCount : "");
array[i++] = listGridRecord;
}
view.setData(array);
eventBus.fireEvent(new WorkflowSelectionChangedEvent(null));
}
示例2: setCurrentSteps
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
private void setCurrentSteps(List<Step> steps) {
ListGridRecord[] array = new ListGridRecord[steps.size()];
int i=0;
for(Step step : steps) {
ListGridRecord listGridRecord = new ListGridRecord();
listGridRecord.setAttribute("id", step.id);
listGridRecord.setAttribute("name", step.name);
listGridRecord.setAttribute("status", step.status);
listGridRecord.setAttribute("owner", step.owner);
listGridRecord.setAttribute("created", step.startDate);
listGridRecord.setAttribute("due", step.dueDate);
array[i++] = listGridRecord;
}
view.setCurrentStepsData(array);
}
示例3: setHistorySteps
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
private void setHistorySteps(List<Step> steps) {
ListGridRecord[] array = new ListGridRecord[steps.size()];
int i=0;
for(Step step : steps) {
ListGridRecord listGridRecord = new ListGridRecord();
listGridRecord.setAttribute("id", step.id);
listGridRecord.setAttribute("name", step.name);
listGridRecord.setAttribute("status", step.status);
listGridRecord.setAttribute("actor", step.actor);
listGridRecord.setAttribute("action", step.action);
listGridRecord.setAttribute("finished", step.finishDate);
array[i++] = listGridRecord;
}
view.setHistoryStepsData(array);
}
示例4: setWorkflowOverview
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
private void setWorkflowOverview(List<Overview> list) {
ListGridRecord[] array = new ListGridRecord[list.size()];
int i=0;
for(Overview overview : list) {
ListGridRecord listGridRecord = new ListGridRecord();
listGridRecord.setAttribute("id", overview.id);
listGridRecord.setAttribute("name", overview.stepName);
listGridRecord.setAttribute("current", overview.current);
listGridRecord.setAttribute("current-display", overview.current != 0 ? overview.current : "");
listGridRecord.setAttribute("history", overview.history);
listGridRecord.setAttribute("history-display", overview.history != 0 ? overview.history : "");
listGridRecord.setAttribute("max", overview.maxPendingDisplay);
listGridRecord.setAttribute("max-display", overview.maxPendingDisplay.equals("0ms") ? "" : overview.maxPendingDisplay);
listGridRecord.setAttribute("avg", overview.avgPendingDisplay);
listGridRecord.setAttribute("avg-display", overview.avgPendingDisplay.equals("0ms") ? "" : overview.avgPendingDisplay);
array[i++] = listGridRecord;
}
view.setWorkflowOverviewData(array);
}
示例5: addFeature
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
/**
* Adds a new feature to the grid list. A {@link VectorLayer} must have been
* set first, and the feature must belong to that VectorLayer.
*
* @param feature
* The feature to be added to the grid list.
* @return Returns true in case of success, and false if the feature is null
* or if the feature does not belong to the correct layer or if the
* layer has not yet been set.
*/
private boolean addFeature(Feature feature, Layer<?> layer) {
// Basic checks:
if (feature == null || layer == null ) {
return false;
}
// Feature checks out, add it to the grid:
ListGridRecord record = new ListGridRecord();
if (layer instanceof VectorLayer) {
record.setAttribute(LABEL, getLabel(feature));
} else if (layer instanceof RasterLayer) {
record.setAttribute(LABEL, feature.getId());
}
record.setAttribute(FEATURE_ID, getFullFeatureId(feature, layer));
record.setAttribute(LAYER_ID, layer.getId());
record.setAttribute(LAYER_LABEL, layer.getLabel());
addData(record);
return true;
}
示例6: addFeature
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
/**
* Adds a new feature to the list. A {@link VectorLayer} must have been set first, and the feature must belong to
* that VectorLayer.
*
* @param feature
* The feature to be added to the list.
* @return Returns true in case of success, and false if the feature is already in the list or the feature is null
* or if the feature does not belong to the correct layer or if the layer has not yet been set.
*/
public boolean addFeature(Feature feature) {
// Basic checks:
if (feature == null || layer == null || !feature.getLayer().getId().equals(layer.getId())) {
return false;
}
// Does feature already exist?
if (featureIds.contains(feature.getId())) {
return false;
}
featureIds.add(feature.getId());
// Feature checks out, add it to the grid:
ListGridRecord record = new ListGridRecord();
record.setAttribute(FIELD_NAME_FEATURE_ID, feature.getId());
copyToRecord(feature, record);
addData(record);
return true;
}
示例7: saveOrUpdateValue
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
/**
* Adds a new value to the list.
*
* @param associationValue The value to be added to the list.
* @return Returns true in case of update, and false if the value is already in the list or the value is null
*/
public boolean saveOrUpdateValue(AssociationValue associationValue) {
if (idByValue.containsKey(associationValue)) {
updateValue(associationValue);
setData(getRecords());
return true;
} else {
// Calculate id
Object idObject = associationValue.getId().getValue();
String id;
if (idObject != null) {
id = idObject.toString();
} else {
// fake id
id = NEW_PREFIX + "." + (newRows++);
}
// Feature checks out, add it to the grid:
ListGridRecord record = new ListGridRecord();
record.setAttribute(ID_NAME, id);
updateAttributes(associationValue, record);
idByValue.put(associationValue, id);
addData(record);
return false;
}
}
示例8: updateRecord
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
/**
* Update the version of an existing value set record.
*
* @param recordToUpdate
* @param vsIdentifier
* @param versionId
* @param comment
* @param changeSetId
*/
public void updateRecord(ListGridRecord recordToUpdate, String vsIdentifier, String versionId,
String comment, String changeSetId, String documentUri) {
if (versionId != null) {
recordToUpdate.setAttribute("oid", vsIdentifier);
recordToUpdate.setAttribute("version", comment);
if (i_algorithmData != null) {
ValueSet vs = new ValueSet(vsIdentifier,
recordToUpdate.getAttribute("description"), versionId, comment);
vs.changeSetId = changeSetId;
vs.documentUri = documentUri;
i_algorithmData.addSupplementalValueSet(vs);
}
}
updateData(recordToUpdate);
markForRedraw();
}
示例9: updateRecord
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
/**
* Update the version of an existing value set record.
*
* @param recordToUpdate
* @param vsIdentifier
* @param versionId
* @param comment
* @param changeSetId
*/
public void updateRecord(ListGridRecord recordToUpdate, String vsIdentifier, String versionId,
String comment, String changeSetId, String documentUri) {
if (versionId != null) {
recordToUpdate.setAttribute("oid", vsIdentifier);
recordToUpdate.setAttribute("version", comment);
if (i_algorithmData != null) {
ValueSet vs = new ValueSet(vsIdentifier,
recordToUpdate.getAttribute("description"), versionId, comment);
vs.changeSetId = changeSetId;
vs.documentUri = documentUri;
i_algorithmData.addValueSet(vs);
}
}
updateData(recordToUpdate);
markForRedraw();
}
示例10: createActivateChangedHandler
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
protected ChangedHandler createActivateChangedHandler(final ListGridRecord ruleRecord) {
return new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
CheckboxItem checkbox = (CheckboxItem) event.getSource();
boolean checked = checkbox.getValueAsBoolean().booleanValue();
String uuid = ruleRecord.getAttribute(UUID);
String medium = ruleRecord.getAttribute(MEDIUM);
String format = ruleRecord.getAttribute(FORMAT);
ruleRecord.setAttribute(SUBSCRIBED, checked);
if(checked) {
getMainEventBus().fireEvent(new SubscribeEvent(currentSession(), uuid, medium, format));
} else {
getMainEventBus().fireEvent(new UnsubscribeEvent(currentSession(), uuid, medium, format));
}
}
};
}
示例11: createGridRecord
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
private ListGridRecord createGridRecord(JobUsage jobUsage, TaskUsage taskUsage) {
ListGridRecord listGridRecord = new ListGridRecord();
listGridRecord.setAttribute("taskId", taskUsage.getTaskId());
listGridRecord.setAttribute("taskName", taskUsage.getTaskName());
listGridRecord.setAttribute("jobName", jobUsage.getJobName());
listGridRecord.setAttribute("jobId", jobUsage.getJobId());
listGridRecord.setAttribute("nbNodes", taskUsage.getTaskNodeNumber());
listGridRecord.setAttribute("duration", taskUsage.getTaskExecutionDuration());
listGridRecord.setAttribute("startTime", taskUsage.getTaskStartTime());
listGridRecord.setAttribute("finishedTime", taskUsage.getTaskFinishedTime());
return listGridRecord;
}
示例12: keysUpdated
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
@Override
public void keysUpdated(Set<String> thirdPartyCredentialsKeys) {
ListGridRecord[] records = new ListGridRecord[thirdPartyCredentialsKeys.size()];
int idx = 0;
for (String key : thirdPartyCredentialsKeys) {
ListGridRecord record = new ListGridRecord();
record.setAttribute("key", key);
record.setAttribute("value", "******");
records[idx++] = record;
}
credentialsGrid.setRecords(records);
}
示例13: createAndFillListGridRecord
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
/**
* Extensible method to fill a {@link com.smartgwt.client.widgets.grid.ListGridRecord}
* based on the Layer information.
*
* @param layer
* @return
*/
protected ListGridRecord createAndFillListGridRecord(Layer layer) {
ListGridRecord record = new ListGridRecord();
record.setAttribute(FLD_LABEL, layer.getLayerInfo().getLabel());
record.setAttribute(FLD_VISIBILITY, layer.isShowing() ?
WidgetLayout.iconLayerShow : WidgetLayout.iconLayerHide);
record.setAttribute(FLD_OBJECT, layer);
return record;
}
示例14: setWmsLayersData
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
@Override
public void setWmsLayersData(List<WmsLayerInfo> wmsLayersData) {
grid.deselectAllRecords();
grid.setData(new ListGridRecord[]{});
for (WmsLayerInfo layerInfo : wmsLayersData) {
ListGridRecord lgr = new ListGridRecord();
lgr.setAttribute(FLD_NAME, layerInfo.getName());
lgr.setAttribute(FLD_DESC, layerInfo.getTitle());
lgr.setAttribute(FLD_LAYER, layerInfo);
grid.addData(lgr);
}
}
示例15: createAndFillListGridRecord
import com.smartgwt.client.widgets.grid.ListGridRecord; //导入方法依赖的package包/类
@Override
protected ListGridRecord createAndFillListGridRecord(Layer layer) {
ListGridRecord record = super.createAndFillListGridRecord(layer);
if (layer instanceof InternalClientWmsLayer) {
record.setAttribute(FLD_DELETE, removeIconUrl);
}
return record;
}