Examples of ListGrid


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

            Label nothing = new Label(MSG.view_adminTopology_partitionEventsDetail_agentAssignments_nothing());
            nothing.setMargin(10);
            section.setItems(nothing);
        } else {
            // there is no need for datasource, it is a simple table with two columns
            ListGrid assignments = new ListGrid();
            ListGridField agentName = new ListGridField("agentName", MSG.view_adminTopology_agent_agentName());
            ListGridField serverName = new ListGridField("serverName",
                MSG.view_admin_systemSettings_serverDetails_serverName());
            assignments.setFields(agentName, serverName);
            ListGridRecord[] records = new ListGridRecord[eventDetails.size()];
            for (int i = 0; i < eventDetails.size(); i++) {
                records[i] = new ListGridRecord();
                records[i].setAttribute("agentName", eventDetails.get(i).getAgentName());
                records[i].setAttribute("serverName", eventDetails.get(i).getServerName());
            }
            assignments.setData(records);
            section.setItems(assignments);
        }

        agentSection = section;
        initSectionCount++;
View Full Code Here

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

        Map<String, List<MeasurementDataNumericHighLowComposite>> sparkLineData) {
        super(5);
        setPadding(5);
        this.sparkLineData = sparkLineData;
        final boolean showSparkLine = sparkLineData != null && !sparkLineData.isEmpty();
        loadGrid = new ListGrid() {
            @Override
            protected String getCellCSSText(ListGridRecord record, int rowNum, int colNum) {
                if ("avg".equals(getFieldName(colNum))
                    && (StorageNodeLoadCompositeDatasource.KEY_HEAP_PERCENTAGE.equals(record.getAttribute("id"))
                        || StorageNodeLoadCompositeDatasource.KEY_DATA_DISK_SPACE_PERCENTAGE.equals(record
View Full Code Here

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

        setListGridFields(idField, versionField, nameField, descriptionField, fileCountField);

        setListGridDoubleClickHandler(new DoubleClickHandler() {
            @Override
            public void onDoubleClick(DoubleClickEvent event) {
                ListGrid listGrid = (ListGrid) event.getSource();
                ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
                if (selectedRows != null && selectedRows.length == 1) {
                    String selectedId = selectedRows[0].getAttribute(BundleVersionDataSource.FIELD_BUNDLE_ID);
                    String selectedVersionId = selectedRows[0].getAttribute(BundleVersionDataSource.FIELD_ID);
                    CoreGUI.goToView(LinkManager.getBundleVersionLink(Integer.valueOf(selectedId),
                        Integer.valueOf(selectedVersionId)));
View Full Code Here

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

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

        grid = new ListGrid();
        grid.setWidth100();
        grid.setHeight100();
        grid.setSelectionType(SelectionStyle.SINGLE);
        grid.setCanExpandRecords(true);
        grid.setExpansionMode(ExpansionMode.DETAIL_FIELD);
View Full Code Here

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

        // This would make our details view bookmarkable. However, the old design of the create/delete
        // history makes determining what entity to use via an ID is not possible (the create/delete
        // history is split into two tables). So, I'll just pop up the audit details in a dialog window.
        setListGridDoubleClickHandler(new DoubleClickHandler() {
            public void onDoubleClick(DoubleClickEvent event) {
                ListGrid listGrid = (ListGrid) event.getSource();
                ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
                if (selectedRows != null && selectedRows.length == 1) {
                    String typeString = selectedRows[0].getAttribute(DataSource.Field.TYPE);
                    ChildHistoryDetails detailsView = null;
                    if (DataSource.TYPE_CREATE.equals(typeString)) {
                        CreateResourceHistory history = (CreateResourceHistory) selectedRows[0]
                            .getAttributeAsObject(DataSource.Field.OBJECT);
                        detailsView = new ChildHistoryDetails(history);
                    } else if (DataSource.TYPE_DELETE.equals(typeString)) {
                        DeleteResourceHistory history = (DeleteResourceHistory) selectedRows[0]
                            .getAttributeAsObject(DataSource.Field.OBJECT);
                        detailsView = new ChildHistoryDetails(history);
                    }
                    new DetailsWindow(detailsView).show();
                }
            }
        });

        ListGrid listGrid = getListGrid();
        listGrid.setSortField(DataSource.Field.CREATED_DATE);
        listGrid.setSortDirection(SortDirection.DESCENDING);
    }
View Full Code Here

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

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

        this.scheduledOperationsGrid = new ListGrid();
        scheduledOperationsGrid.setDataSource(getDataSourceScheduled());
        scheduledOperationsGrid.setAutoFetchData(true);
        scheduledOperationsGrid.setWidth100();
        scheduledOperationsGrid.setWrapCells(true);
View Full Code Here

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

    /** Gets access to the ListGrid from super class for editing.
     *
     */
    @Override
    protected void configureTable() {
        ListGrid listGrid = getListGrid();
        if (listGrid != null) {
            addExtraWidget(new TimeRange(this), false);
        }

        ListGridField resourceField = new ListGridField(RESOURCE.propertyName(), RESOURCE.title());
View Full Code Here

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

        super.configureTable();

        // replace the doubleClickHandler to go directly to drift tab       
        setListGridDoubleClickHandler(new DoubleClickHandler() {
            public void onDoubleClick(DoubleClickEvent event) {
                ListGrid listGrid = (ListGrid) event.getSource();
                ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
                if (selectedRows != null && selectedRows.length == 1) {
                    String selectedId = selectedRows[0].getAttribute("id");
                    CoreGUI.goToView(LinkManager.getResourceTabLink(Integer.valueOf(selectedId),
                        ResourceDetailView.Tab.Drift.NAME, null));
                }
View Full Code Here

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

        };
    }

    @Override
    protected void configureListGrid(ListGrid grid) {
        ListGrid listGrid = super.getListGrid();
        listGrid.setGroupStartOpen(GroupStartOpen.ALL);
        listGrid.setShowGroupSummary(true);
        listGrid.setShowGroupSummaryInHeader(true);

        listGrid.setGroupByField("name");
    }
View Full Code Here

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

                }
            });
        addTableAction(MSG.common_button_delete_all(), MSG.view_alerts_delete_confirm_all(), ButtonColor.RED,
            new TableAction() {
                public boolean isEnabled(ListGridRecord[] selection) {
                    ListGrid grid = getListGrid();
                    ListGridRecord[] records = (null != grid) ? grid.getRecords() : null;
                    return (hasWriteAccess && grid != null && records != null && records.length > 0);
                }

                public void executeAction(ListGridRecord[] selection, Object actionValue) {
                    deleteAll();
                }
            });
        addTableAction(MSG.common_button_ack_all(), MSG.view_alerts_ack_confirm_all(), new TableAction() {
            public boolean isEnabled(ListGridRecord[] selection) {
                ListGrid grid = getListGrid();
                ListGridRecord[] records = (null != grid) ? grid.getRecords() : null;
                return (hasWriteAccess && grid != null && records != null && records.length > 0);
            }

            public void executeAction(ListGridRecord[] selection, Object actionValue) {
                acknowledgeAll();
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.