Package org.drools.workbench.models.guided.dtable.shared.model

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


    @Override
    public Map<String, String> getCurrentValueMap( Context context ) {
        Map<String, String> currentValueMap = new HashMap<String, String>();

        final Pattern52 basePattern = context.getBasePattern();
        final BaseColumn baseColumn = context.getBaseColumn();

        //Get values for all Constraints or Actions on the same pattern as the baseColumn
        if ( baseColumn instanceof ConditionCol52 ) {
            for ( ConditionCol52 cc : basePattern.getChildColumns() ) {
                currentValueMap.put( cc.getFactField(),
View Full Code Here


                        //Update any dependent enumerations
                        final LimitedEntryDropDownManager.Context context = new LimitedEntryDropDownManager.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

                        //Update any dependent enumerations
                        final LimitedEntryDropDownManager.Context context = new LimitedEntryDropDownManager.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

                        //Update any dependent enumerations
                        final LimitedEntryDropDownManager.Context context = new LimitedEntryDropDownManager.Context( 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

    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

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

                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

    public List<DTCellValue52> makeRowData() {
        List<DTCellValue52> data = new ArrayList<DTCellValue52>();
        List<BaseColumn> columns = model.getExpandedColumns();
        //Use allColumns.size() - 1 to exclude the Analysis column that is not stored in the general grid data
        for ( int iCol = 0; iCol < columns.size() - 1; iCol++ ) {
            BaseColumn column = columns.get( iCol );
            DTCellValue52 cell = makeModelCellValue( column );
            data.add( cell );
        }
        return data;
    }
View Full Code Here

    @Override
    public Map<String, String> getCurrentValueMap( Context context ) {
        Map<String, String> currentValueMap = new HashMap<String, String>();

        final Pattern52 basePattern = context.getBasePattern();
        final BaseColumn baseColumn = context.getBaseColumn();

        //Get values for all Constraints or Actions on the same pattern as the baseColumn
        if ( baseColumn instanceof ConditionCol52 ) {
            for ( ConditionCol52 cc : basePattern.getChildColumns() ) {
                if ( cc instanceof LimitedEntryCol ) {
View Full Code Here

    public Set<Integer> getDependentColumnIndexes( Context context ) {

        final Set<Integer> dependentColumnIndexes = new HashSet<Integer>();

        final Pattern52 basePattern = context.getBasePattern();
        final BaseColumn baseColumn = context.getBaseColumn();

        //Get values for all Constraints or Actions on the same pattern as the baseColumn
        if ( baseColumn instanceof ConditionCol52 ) {
            final ConditionCol52 baseConditionColumn = (ConditionCol52) baseColumn;
            for ( ConditionCol52 cc : basePattern.getChildColumns() ) {
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.guided.dtable.shared.model.BaseColumn

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.