Examples of DynamicDataRow


Examples of org.drools.guvnor.client.widgets.decoratedgrid.data.DynamicDataRow

    // Update Row Number column values
    private void updateRowNumberColumnValues(DynamicData data,
                                             int iCol) {
        int iRowNum = 1;
        for ( int iRow = 0; iRow < data.size(); iRow++ ) {
            DynamicDataRow row = data.get( iRow );
            if ( row instanceof GroupedDynamicDataRow ) {
                GroupedDynamicDataRow groupedRow = (GroupedDynamicDataRow) row;

                //Setting value on a GroupedCellValue causes all children to assume the same value
                groupedRow.get( iCol ).setValue( new BigDecimal( iRowNum ) );
                for ( int iGroupedRow = 0; iGroupedRow < groupedRow.getChildRows().size(); iGroupedRow++ ) {
                    groupedRow.getChildRows().get( iGroupedRow ).get( iCol ).setValue( new BigDecimal( iRowNum ) );
                    iRowNum++;
                }
            } else {
                row.get( iCol ).setValue( new BigDecimal( iRowNum ) );
                iRowNum++;
            }
        }
    }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

        if ( baseRowIndex > data.size() - 1 ) {
            baseRowIndex = data.size() - 1;
        }

        int maxRedrawRow = baseRowIndex;
        DynamicDataRow baseRow = data.get( baseRowIndex );
        for ( int iCol = 0; iCol < baseRow.size(); iCol++ ) {
            int iRow = baseRowIndex;
            CellValue< ? extends Comparable< ? >> cell = baseRow.get( iCol );
            while ( cell.getRowSpan() != 1 && iRow < data.size() - 1 ) {
                iRow++;
                DynamicDataRow row = data.get( iRow );
                cell = row.get( iCol );
            }
            maxRedrawRow = (iRow > maxRedrawRow ? iRow : maxRedrawRow);
        }
        return maxRedrawRow;
    }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

        if ( baseRowIndex > data.size() - 1 ) {
            baseRowIndex = data.size() - 1;
        }

        int minRedrawRow = baseRowIndex;
        DynamicDataRow baseRow = data.get( baseRowIndex );
        for ( int iCol = 0; iCol < baseRow.size(); iCol++ ) {
            int iRow = baseRowIndex;
            CellValue< ? extends Comparable< ? >> cell = baseRow.get( iCol );
            while ( cell.getRowSpan() != 1 && iRow > 0 ) {
                iRow--;
                DynamicDataRow row = data.get( iRow );
                cell = row.get( iCol );
            }
            minRedrawRow = (iRow < minRedrawRow ? iRow : minRedrawRow);
        }
        return minRedrawRow;
    }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

        }
    }

    public void onInsertRow(InsertRowEvent event) {
        int index = rowMapper.mapToMergedRow( event.getIndex() );
        DynamicDataRow rowData = cellValueFactory.makeUIRowData();
        insertRow( index,
                   rowData );
    }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

                   rowData );
    }

    public void onAppendRow(AppendRowEvent event) {
        int index = data.size();
        DynamicDataRow rowData = cellValueFactory.makeUIRowData();
        insertRow( index,
                   rowData );
    }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

        }
        return cloneDynamicDataRow( sourceRowData );
    }

    private DynamicDataRow cloneDynamicDataRow(DynamicDataRow sourceRowData) {
        DynamicDataRow rowData = cellValueFactory.makeUIRowData();
        for ( int iCol = 0; iCol < sourceRowData.size(); iCol++ ) {
            CellValue< ? extends Comparable< ? >> cell = sourceRowData.get( iCol );
            rowData.get( iCol ).setValue( cell.getValue() );
        }
        return rowData;
    }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

        int iRowIndex = 0;
        int iColIndex = event.getIndex();
        List<CellValue< ? extends Comparable< ? >>> columnData = event.getColumnData();

        for ( int iRow = 0; iRow < data.size(); iRow++ ) {
            DynamicDataRow row = data.get( iRow );
            CellValue< ? extends Comparable< ? >> cell = columnData.get( iRowIndex );
            if ( row instanceof GroupedDynamicDataRow ) {
                GroupedDynamicDataRow groupedRow = (GroupedDynamicDataRow) row;

                //Setting value on a GroupedCellValue causes all children to assume the same value
                groupedRow.get( iColIndex ).setValue( cell.getValue() );

                //So set the children's values accordingly
                for ( int iGroupedRow = 0; iGroupedRow < groupedRow.getChildRows().size(); iGroupedRow++ ) {
                    cell = columnData.get( iRowIndex );
                    groupedRow.getChildRows().get( iGroupedRow ).get( iColIndex ).setValue( cell.getValue() );
                    iRowIndex++;
                }
            } else {
                row.get( iColIndex ).setValue( cell.getValue() );
                iRowIndex++;
            }
        }

        data.assertModelMerging();
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

        if ( targetColumnIndex > sourceColumnIndex ) {
            for ( int iCol = 0; iCol < numberOfColumns; iCol++ ) {
                this.columns.add( targetColumnIndex,
                                  this.columns.remove( sourceColumnIndex ) );
                for ( int iRow = 0; iRow < data.size(); iRow++ ) {
                    DynamicDataRow row = data.get( iRow );
                    row.move( targetColumnIndex,
                              sourceColumnIndex );
                }
            }
        } else if ( targetColumnIndex < sourceColumnIndex ) {
            for ( int iCol = 0; iCol < numberOfColumns; iCol++ ) {
                this.columns.add( targetColumnIndex,
                                  this.columns.remove( sourceColumnIndex ) );
                for ( int iRow = 0; iRow < data.size(); iRow++ ) {
                    DynamicDataRow row = data.get( iRow );
                    row.move( targetColumnIndex,
                              sourceColumnIndex );
                }
                sourceColumnIndex++;
                targetColumnIndex++;
            }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

        TableSectionElement nbody = Document.get().createTBodyElement();

        for ( int iRow = 0; iRow < data.size(); iRow++ ) {

            DynamicDataRow rowData = data.get( iRow );

            TableRowElement tre = Document.get().createTRElement();
            tre.setClassName( getRowStyle( iRow ) );
            populateTableRowElement( tre,
                                     rowData );
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.data.DynamicDataRow

            throw new IllegalArgumentException( "startRedrawIndex cannot be greater than endRedrawIndex." );
        }

        for ( int iRow = 0; iRow < data.size(); iRow++ ) {
            TableRowElement tre = tbody.getRows().getItem( iRow );
            DynamicDataRow rowData = data.get( iRow );
            redrawTableRowElement( rowData,
                                   tre,
                                   startRedrawIndex,
                                   endRedrawIndex );
        }
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.