Examples of ListGrid


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

    records[4].setAttribute(VALUE, (layer.isShowing() ? messages.layerInfoLayerInfoFldVisibleStatusVisible()
        : messages.layerInfoLayerInfoFldVisibleStatusHidden()));

    // ----------------------------------------------------------

    ListGrid info = new ListGrid();
    info.setShowAllRecords(true);
    info.setCanResizeFields(true);
    info.setWidth100();
    info.setHeight(135);

    ListGridField labelField = new ListGridField(LABEL, messages.layerInfoLayerInfo());
    ListGridField valueField = new ListGridField(VALUE, messages.layerInfoLayerInfoValue());
    info.setFields(labelField, valueField);
    info.setData(records);

    return info;
  }
View Full Code Here

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

    }

    // ----------------------------------------------------------

    VLayout c = new VLayout();
    ListGrid info = new ListGrid();
    info.setShowAllRecords(true);
    info.setCanResizeFields(true);
    info.setWidth100();
    info.setHeight(400);

    ListGridField fld1 = new ListGridField(ATTRI, messages.layerInfoLayerInfoAttAttribute());
    ListGridField fld2 = new ListGridField(LABEL, messages.layerInfoLayerInfoAttLabel());
    ListGridField fld3 = new ListGridField(TYPE, messages.layerInfoLayerInfoAttType());
    ListGridField fld4 = new ListGridField(EDITA, messages.layerInfoLayerInfoAttEditable());
    ListGridField fld5 = new ListGridField(IDENT, messages.layerInfoLayerInfoAttIdentifying());
    ListGridField fld6 = new ListGridField(HIDDE, messages.layerInfoLayerInfoAttHidden());
    ListGridField fld7 = new ListGridField(NUMER, messages.layerInfoLayerInfoAttNumeric());
    fld1.setWidth(70);
    fld2.setWidth(90);
    info.setFields(fld1, fld2, fld3, fld4, fld5, fld6, fld7);

    info.setData(records.toArray(new ListGridRecord[records.size()]));
    c.addChild(info);

    return c;
  }
View Full Code Here

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

    operatorForm.setFields(type);
    layout.addMember(operatorForm);

    // -- criteria grid --
    VLayout wrapper = new VLayout(10);
    searchItems = new ListGrid();
    searchItems.setWidth100();
    searchItems.setHeight(1);
    searchItems.setShowAllRecords(true);
    searchItems.setBodyOverflow(Overflow.VISIBLE);
    searchItems.setOverflow(Overflow.VISIBLE);
View Full Code Here

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

    @Override
    protected void configureTable() {
        super.configureTable();

        ListGrid listGrid = getListGrid();

        ArrayList<ListGridField> dataSourceFields = getDataSource().getListGridFields();
        listGrid.setFields(dataSourceFields.toArray(new ListGridField[dataSourceFields.size()]));

        listGrid.setSelectionType(SelectionStyle.SINGLE);

        // Set widths and cell formatters on the fields.
        ListGridField displayNameField = listGrid.getField(MeasurementDataTraitCriteria.SORT_FIELD_DISPLAY_NAME);
        displayNameField.setWidth("20%");

        addTableAction(MSG.view_measureTable_getLive(), ButtonColor.BLUE, getLiveValueAction());
    }
View Full Code Here

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

                liveDataWindow.destroy();
                refreshTableInfo();
            }
        });

        ListGrid liveDataGrid = decorateLiveDataGrid(records);
        liveDataWindow.addItem(liveDataGrid);
        liveDataWindow.show();
    }
View Full Code Here

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

    public void refresh(boolean resetPaging) {
        if (!isInitialized()) {
            return;
        }

        final ListGrid listGrid = getListGrid();

        Criteria criteria = getCurrentCriteria();
        listGrid.setCriteria(criteria);

        if (resetPaging) {
            listGrid.scrollToRow(0);
        }

        // Only call invalidateCache() and fetchData() if the ListGrid is backed by a DataSource.
        if (listGrid.getDataSource() != null) {
            // Invalidate the cached records - if listGrid.getAutoFetchData() is true, this will cause the ListGrid to
            // automatically call fetchData().
            listGrid.invalidateCache();
            if (!this.autoFetchData && (initialCriteria != null)) {
                listGrid.fetchData(criteria);
            }
        }
        listGrid.markForRedraw();
    }
View Full Code Here

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

     * subclass of ListGrid.
     *
     * @return this Table's list grid (must be an instance of ListGrid)
     */
    protected ListGrid createListGrid() {
        return new ListGrid();
    }
View Full Code Here

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

    protected void deleteSelectedRecords() {
        deleteSelectedRecords(null);
    }

    protected void deleteSelectedRecords(DSRequest requestProperties) {
        ListGrid listGrid = getListGrid();
        final int selectedRecordCount = listGrid.getSelectedRecords().length;
        final List<String> deletedRecordNames = new ArrayList<String>(selectedRecordCount);
        listGrid.removeSelectedData(new DSCallback() {
            public void execute(DSResponse response, Object rawData, DSRequest request) {
                if (response.getStatus() == DSResponse.STATUS_SUCCESS) {
                    Record[] deletedRecords = response.getData();
                    for (Record deletedRecord : deletedRecords) {
                        String name = deletedRecord.getAttribute(getTitleFieldName());
View Full Code Here

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

            }
        });
        if (canSupportDeleteAndAcknowledgeAll()) {
            addTableAction(MSG.common_button_ack_all(), MSG.view_alerts_ack_confirm_all(), new TableAction() {
                public boolean isEnabled(ListGridRecord[] selection) {
                    ListGrid grid = getListGrid();
                    ResultSet resultSet = (null != grid) ? grid.getResultSet() : null;
                    return (hasWriteAccess && grid != null && resultSet != null && !resultSet.isEmpty());
                }

                public void executeAction(ListGridRecord[] selection, Object actionValue) {
                    acknowledgeAll();
                }
            });
        }

        addTableAction(MSG.common_button_delete(), MSG.view_alerts_delete_confirm(), ButtonColor.RED,
            new ResourceAuthorizedTableAction(AlertHistoryView.this, TableActionEnablement.ANY, (hasWriteAccess ? null
                : Permission.MANAGE_ALERTS), new RecordExtractor<Integer>() {
                public Collection<Integer> extract(Record[] records) {
                    List<Integer> result = new ArrayList<Integer>(records.length);
                    for (Record record : records) {
                        result.add(record.getAttributeAsInt("resourceId"));
                    }
                    return result;
                }
            }) {

            public void executeAction(ListGridRecord[] selection, Object actionValue) {
                delete(selection);
            }
        });
        if (canSupportDeleteAndAcknowledgeAll()) {
            addTableAction(MSG.common_button_delete_all(), MSG.view_alerts_delete_confirm_all(), ButtonColor.RED,
                new TableAction() {
                public boolean isEnabled(ListGridRecord[] selection) {
                    ListGrid grid = getListGrid();
                    ResultSet resultSet = (null != grid) ? grid.getResultSet() : null;
                    return (hasWriteAccess && grid != null && resultSet != null && !resultSet.isEmpty());
                }

                public void executeAction(ListGridRecord[] selection, Object actionValue) {
                    deleteAll();
View Full Code Here

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

        });

        addTableAction(MSG.common_button_delete_all(), MSG.view_drift_confirm_deleteAllDefs(), ButtonColor.RED,
            new TableAction() {
            public boolean isEnabled(ListGridRecord[] selection) {
                ListGrid grid = getListGrid();
                ResultSet resultSet = (null != grid) ? grid.getResultSet() : null;
                return (hasWriteAccess && grid != null && resultSet != null && !resultSet.isEmpty());
            }

            public void executeAction(ListGridRecord[] selection, Object actionValue) {
                deleteAll();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.