Examples of BaseColumn


Examples of org.drools.guvnor.models.guided.dtable.shared.model.BaseColumn

            throw new IllegalArgumentException( "rowData contains a different number of columns to those provided" );
        }

        //Extract keys and values in constructor rather than on demand for speed
        for ( int index = 0; index < columns.size(); index++ ) {
            BaseColumn column = columns.get( index );
            if ( column instanceof BRLConditionVariableColumn ) {
                BRLConditionVariableColumn brlCondition = (BRLConditionVariableColumn) column;
                templateKeysToValueMap.put( brlCondition.getVarName(),
                                            rowData.get( index ) );
View Full Code Here

Examples of org.drools.guvnor.models.guided.dtable.shared.model.BaseColumn

        Integer iDurationColumnIndex = null;

        //Find the Salience and Duration column indexes
        List<BaseColumn> allColumns = destination.getExpandedColumns();
        for ( int iCol = 0; iCol < allColumns.size(); iCol++ ) {
            final BaseColumn column = allColumns.get( iCol );
            if ( column instanceof AttributeCol52 ) {
                AttributeCol52 attributeCol = (AttributeCol52) column;
                final String attributeName = attributeCol.getAttribute();
                if ( GuidedDecisionTable52.SALIENCE_ATTR.equals( attributeName ) ) {
                    iSalienceColumnIndex = iCol;
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BaseColumn

            int iColumnCount = 0;
            for ( int iCol = 0; iCol < sortableColumns.size(); iCol++ ) {
                DynamicColumn<BaseColumn> col = sortableColumns.get( iCol );
                if ( col.isVisible() ) {
                    visibleCols.add( col );
                    BaseColumn modelCol = col.getModelColumn();
                    if ( modelCol instanceof ConditionCol52 ) {
                        if ( multiRowColumnOffset == -1 ) {
                            multiRowColumnOffset = iColumnCount;
                        }
                        visibleConditionCols.add( col );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BaseColumn

            switch ( iRow ) {
                case 0 :
                    // General row, all visible cells included
                    for ( int iCol = 0; iCol < visibleCols.size(); iCol++ ) {
                        DynamicColumn<BaseColumn> col = visibleCols.get( iCol );
                        BaseColumn modelCol = col.getModelColumn();
                        tce = DOM.createTD();
                        tce.addClassName( resources.headerText() );
                        tre.appendChild( tce );

                        // Merging
                        int colSpan = 1;
                        int width = col.getWidth();
                        if ( modelCol instanceof BRLVariableColumn ) {
                            BRLVariableColumn brlColumn = (BRLVariableColumn) col.getModelColumn();
                            BRLColumn< ? , ? > brlColumnParent = model.getBRLColumn( brlColumn );

                            while ( iCol + colSpan < visibleCols.size() ) {
                                DynamicColumn<BaseColumn> mergeCol = visibleCols.get( iCol + colSpan );
                                BaseColumn mergeModelCol = mergeCol.getModelColumn();
                                if ( !(mergeModelCol instanceof BRLVariableColumn) ) {
                                    break;
                                }
                                BRLVariableColumn mergeBRLColumn = (BRLVariableColumn) mergeModelCol;
                                BRLColumn< ? , ? > mergeBRLColumnParent = model.getBRLColumn( mergeBRLColumn );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BaseColumn

        // Row 0 (General\Fact Type)
        // General row, all visible cells included
        int iRow0ColColumn = 0;
        for ( int iCol = 0; iCol < widget.visibleCols.size(); iCol++ ) {
            DynamicColumn<BaseColumn> col = widget.visibleCols.get( iCol );
            BaseColumn modelCol = col.getModelColumn();

            // Merging
            int colSpan = 1;
            int width = col.getWidth();
            if ( modelCol instanceof BRLVariableColumn ) {
                BRLVariableColumn brlColumn = (BRLVariableColumn) col.getModelColumn();
                BRLColumn< ? , ? > brlColumnParent = model.getBRLColumn( brlColumn );

                while ( iCol + colSpan < widget.visibleCols.size() ) {
                    DynamicColumn<BaseColumn> mergeCol = widget.visibleCols.get( iCol + colSpan );
                    BaseColumn mergeModelCol = mergeCol.getModelColumn();
                    if ( !(mergeModelCol instanceof BRLVariableColumn) ) {
                        break;
                    }
                    BRLVariableColumn mergeBRLColumn = (BRLVariableColumn) mergeModelCol;
                    BRLColumn< ? , ? > mergeBRLColumnParent = model.getBRLColumn( mergeBRLColumn );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BaseColumn

    private int findConditionColumnIndex(ConditionCol52 col) {
        int index = 0;
        boolean bMatched = false;
        List<BaseColumn> columns = model.getExpandedColumns();
        for ( int iCol = 0; iCol < columns.size(); iCol++ ) {
            BaseColumn column = columns.get( iCol );
            if ( column instanceof RowNumberCol52 ) {
                index = iCol;
            } else if ( column instanceof DescriptionCol52 ) {
                index = iCol;
            } else if ( column instanceof MetadataCol52 ) {
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BaseColumn

    public void onSelectedCellChange(SelectedCellChangeEvent event) {
        if ( event.getCellSelectionDetail() == null ) {
            dtableCtrls.setEnableOtherwiseButton( false );
        } else {
            Coordinate c = event.getCellSelectionDetail().getCoordinate();
            BaseColumn column = model.getExpandedColumns().get( c.getCol() );
            dtableCtrls.setEnableOtherwiseButton( canAcceptOtherwiseValues( column ) && !this.isReadOnly );
        }
    }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BaseColumn

                List<CellValue< ? extends Comparable< ? >>> rowData = data.get( iRow );
                int targetRowIndex = originRowIndex + iRow;
                for ( int iCol = 0; iCol < rowData.size(); iCol++ ) {
                    int targetColumnIndex = originColumnIndex + iCol;
                    CellValue< ? extends Comparable< ? >> changedCell = rowData.get( iCol );
                    BaseColumn col = model.getExpandedColumns().get( targetColumnIndex );
                    DTCellValue52 dcv = cellValueFactory.convertToModelCell( col,
                                                                             changedCell );
                    model.getData().get( targetRowIndex ).set( targetColumnIndex,
                                                               dcv );
                }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BaseColumn

                        //Update any dependent enumerations
                        final Context context = new Context( basePattern,
                                                             baseCondition );
                        Set<Integer> dependentColumnIndexes = dropDownManager.getDependentColumnIndexes( context );
                        for ( Integer iCol : dependentColumnIndexes ) {
                            BaseColumn column = dtable.getExpandedColumns().get( iCol );
                            if ( column instanceof LimitedEntryCol ) {
                                ((LimitedEntryCol) column).setValue( null );
                            } else if ( column instanceof DTColumnConfig52 ) {
                                ((DTColumnConfig52) column).setDefaultValue( null );
                            }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt52.BaseColumn

                        //Update any dependent enumerations
                        final Context context = new Context( basePattern,
                                                             baseAction );
                        Set<Integer> dependentColumnIndexes = dropDownManager.getDependentColumnIndexes( context );
                        for ( Integer iCol : dependentColumnIndexes ) {
                            BaseColumn column = dtable.getExpandedColumns().get( iCol );
                            if ( column instanceof LimitedEntryCol ) {
                                ((LimitedEntryCol) column).setValue( null );
                            } else if ( column instanceof DTColumnConfig52 ) {
                                ((DTColumnConfig52) column).setDefaultValue( null );
                            }
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.