Package com.smartgwt.client.widgets.grid

Examples of com.smartgwt.client.widgets.grid.ListGridRecord


            public void onSelectionChanged(SelectionEvent selectionEvent) {
                if (resourceGroup.getGroupCategory() == GroupCategory.COMPATIBLE) {
                    if (null != addToDashboardButton) {
                        addToDashboardButton.enable();
                    }
                    ListGridRecord selectedRecord = selectionEvent.getSelectedRecord();
                    if (null != selectedRecord) {
                        selectedMetricDefinitionId = selectedRecord.getAttributeAsInt(METRIC_DEF_ID.getValue());
                    }
                }
            }
        });
View Full Code Here


        public void expandOpenedRows() {
            int startRow = 0;
            int endRow = this.getRecords().length;
            for (int i = startRow; i < endRow; i++) {
                ListGridRecord listGridRecord = getRecord(i);
                if (null != listGridRecord) {
                    int metricDefinitionId = listGridRecord.getAttributeAsInt(METRIC_DEF_ID.getValue());
                    if (null != metricsTableView && null != expandedRows
                        && metricsTableView.expandedRows.contains(metricDefinitionId)) {
                        expandRecord(listGridRecord);
                    }
                }
View Full Code Here

            return null;
        }

        @Override
        public ListGridRecord copyValues(Plugin from) {
            ListGridRecord record = new ListGridRecord();
            record.setAttribute(FIELD_ID, from.getId());
            record.setAttribute(FIELD_NAME, from.getDisplayName());
            record.setAttribute(FIELD_DESCRIPTION, from.getDescription());
            record.setAttribute(FIELD_LASTUPDATE, new Date(from.getMtime()));
            record.setAttribute(FIELD_ENABLED, ImageManager.getAvailabilityIcon(from.isEnabled()));
            record.setAttribute(FIELD_DEPLOYED,
                ImageManager.getAvailabilityIcon(from.getStatus() == PluginStatusType.INSTALLED));
            record.setAttribute(FIELD_VERSION, from.getVersion());
            return record;
        }
View Full Code Here

        }

        @Override
        public ListGridRecord copyValues(MetricDisplaySummary from) {

            ListGridRecord record = new ListGridRecord();
            record.setAttribute(FIELD_ID, from.getMetricName() + "_" + from.getResourceId());
            record.setAttribute(FIELD_METRIC_NAME, from.getLabel());

            Resource resource = from.getResource();

            record.setAttribute(NAME.propertyName(), resource.getName());
            record.setAttribute(INVENTORY_STATUS.propertyName(), resource.getInventoryStatus());
            record.setAttribute(CATEGORY.propertyName(), resource.getResourceType().getCategory().name());
            record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY, resource.getAncestry());
            record.setAttribute(AncestryUtil.RESOURCE_TYPE_ID, resource.getResourceType().getId());

            MeasurementUtility.formatSimpleMetrics(from);

            record.setAttribute(FIELD_MIN_VALUE, getMetricStringValue(from.getMinMetric()));
            record.setAttribute(FIELD_MAX_VALUE, getMetricStringValue(from.getMaxMetric()));
            record.setAttribute(FIELD_AVG_VALUE, getMetricStringValue(from.getAvgMetric()));
            record.setAttribute(FIELD_LAST_VALUE, getMetricStringValue(from.getLastMetric()));

            record.setAttribute(FIELD_ICON, ImageManager.getMonitorIcon());

            record.setAttribute(ATTR_RESOURCE_ID, from.getResourceId());
            record.setAttribute(ATTR_DEFINITION_ID, from.getDefinitionId());

            return record;
        }
View Full Code Here

                    }
                    Record[] data = response.getData();
                    ListGridRecord[] resourceRecords = new ListGridRecord[data.length];
                    for (int i = 0, dataLength = data.length; i < dataLength; i++) {
                        Record record = data[i];
                        ListGridRecord listGridRecord = (ListGridRecord) record;
                        resourceRecords[i] = listGridRecord;
                    }

                    executionModeForm.setValue(FIELD_EXECUTION_MODE, EXECUTION_ORDER_SEQUENTIAL);
                    memberExecutionOrderer.setRecords(resourceRecords);
View Full Code Here

            return null;
        }

        @Override
        public ListGridRecord copyValues(ServerPlugin from) {
            ListGridRecord record = new ListGridRecord();
            record.setAttribute(FIELD_ID, from.getId());
            record.setAttribute(FIELD_NAME, from.getDisplayName());
            record.setAttribute(FIELD_DESCRIPTION, from.getDescription());
            record.setAttribute(FIELD_LASTUPDATE, new Date(from.getMtime()));
            record.setAttribute(FIELD_ENABLED, ImageManager.getAvailabilityIcon(from.isEnabled()));
            record.setAttribute(FIELD_DEPLOYED,
                ImageManager.getAvailabilityIcon(from.getStatus() == PluginStatusType.INSTALLED));
            record.setAttribute(FIELD_VERSION, from.getVersion());
            return record;
        }
View Full Code Here

        return fields;
    }

    @Override
    public ListGridRecord copyValues(MeasurementDataTrait from) {
        ListGridRecord record = super.copyValues(from);

        record.setAttribute(MeasurementDataTraitCriteria.FILTER_FIELD_GROUP_ID, this.groupId);

        // for ancestry handling      
        Resource resource = from.getSchedule().getResource();
        record.setAttribute(AncestryUtil.RESOURCE_ID, resource.getId());
        record.setAttribute(AncestryUtil.RESOURCE_NAME, resource.getName());
        record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY, resource.getAncestry());
        record.setAttribute(AncestryUtil.RESOURCE_TYPE_ID, resource.getResourceType().getId());

        return record;
    }
View Full Code Here

            }
            Record[] data = response.getData();
            memberResourceRecords = new ListGridRecord[data.length];
            for (int i = 0, dataLength = data.length; i < dataLength; i++) {
                Record record = data[i];
                ListGridRecord listGridRecord = (ListGridRecord) record;
                memberResourceRecords[i] = listGridRecord;
            }
            latch.countDown();
        }
View Full Code Here

    }

    @Override
    protected void editExistingRecord(Record record) {
        JavaScriptObject jobTriggerJavaScriptObject = (JavaScriptObject) getForm().getValue(Field.JOB_TRIGGER);
        Record jobTriggerRecord = new ListGridRecord(jobTriggerJavaScriptObject);
        JobTrigger jobTrigger = getDataSource().createJobTrigger(jobTriggerRecord);
        this.triggerEditor.setJobTrigger(jobTrigger);

        FormItem nextFireTimeItem = this.notesForm.getField(Field.NEXT_FIRE_TIME);
        nextFireTimeItem.setValue(getForm().getValue(Field.NEXT_FIRE_TIME));
View Full Code Here

        requestProperties.setAttribute(AbstractOperationScheduleDataSource.RequestProperty.PARAMETERS,
            this.operationParameters);

        EnhancedDynamicForm form = getForm();

        Record jobTriggerRecord = new ListGridRecord();

        Date startTime = this.triggerEditor.getStartTime();
        isImmediateExecution = startTime == null;
        jobTriggerRecord.setAttribute(Field.START_TIME, startTime);

        Date endTime = this.triggerEditor.getEndTime();
        jobTriggerRecord.setAttribute(Field.END_TIME, endTime);

        Integer repeatCount = this.triggerEditor.getRepeatCount();
        jobTriggerRecord.setAttribute(Field.REPEAT_COUNT, repeatCount);

        Long repeatInterval = this.triggerEditor.getRepeatInterval();
        jobTriggerRecord.setAttribute(Field.REPEAT_INTERVAL, repeatInterval);

        String cronExpression = this.triggerEditor.getCronExpression();
        jobTriggerRecord.setAttribute(Field.CRON_EXPRESSION, cronExpression);

        form.setValue(Field.JOB_TRIGGER, jobTriggerRecord);

        DurationItem timeoutItem = (DurationItem) this.notesForm.getItem(Field.TIMEOUT);
        Long timeout = timeoutItem.getValueAsLong();
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.grid.ListGridRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.