Examples of AbstractRestrictedEntryTextBox


Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        }
        return tb;
    }

    private AbstractRestrictedEntryTextBox makeNumericIntegerTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericIntegerTextBox( allowEmptyValues );
        final Integer numericValue = (Integer) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new Integer( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (Integer) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( new Integer( "0" ) );
                            tb.setValue( "0" );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        }
        return tb;
    }

    private AbstractRestrictedEntryTextBox makeNumericLongTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericLongTextBox( allowEmptyValues );
        final Long numericValue = (Long) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new Long( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (Long) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( new Long( "0" ) );
                            tb.setValue( "0" );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        }
        return tb;
    }

    private AbstractRestrictedEntryTextBox makeNumericShortTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericShortTextBox( allowEmptyValues );
        final Short numericValue = (Short) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new Short( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (Short) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( new Short( "0" ) );
                            tb.setValue( "0" );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        return lb;
    }

    private AbstractRestrictedEntryTextBox makeNumericTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericTextBox( allowEmptyValues );
        final BigDecimal numericValue = (BigDecimal) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toPlainString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new BigDecimal( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (BigDecimal) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( BigDecimal.ZERO );
                            tb.setValue( BigDecimal.ZERO.toPlainString() );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        }
        return tb;
    }

    private AbstractRestrictedEntryTextBox makeNumericBigDecimalTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericBigDecimalTextBox( allowEmptyValues );
        final BigDecimal numericValue = (BigDecimal) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toPlainString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new BigDecimal( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (BigDecimal) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( BigDecimal.ZERO );
                            tb.setValue( BigDecimal.ZERO.toPlainString() );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        }
        return tb;
    }

    private AbstractRestrictedEntryTextBox makeNumericBigIntegerTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericBigIntegerTextBox( allowEmptyValues );
        final BigInteger numericValue = (BigInteger) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new BigInteger( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (BigInteger) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( BigInteger.ZERO );
                            tb.setValue( BigInteger.ZERO.toString() );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        }
        return tb;
    }

    private AbstractRestrictedEntryTextBox makeNumericByteTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericByteTextBox( allowEmptyValues );
        final Byte numericValue = (Byte) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new Byte( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (Byte) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( new Byte( "0" ) );
                            tb.setValue( "0" );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        }
        return tb;
    }

    private AbstractRestrictedEntryTextBox makeNumericDoubleTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericDoubleTextBox( allowEmptyValues );
        final Double numericValue = (Double) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new Double( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (Double) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( new Double( "0" ) );
                            tb.setValue( "0" );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        }
        return tb;
    }

    private AbstractRestrictedEntryTextBox makeNumericFloatTextBox(final DTCellValue52 value) {
        final AbstractRestrictedEntryTextBox tb = new NumericFloatTextBox( allowEmptyValues );
        final Float numericValue = (Float) value.getNumericValue();
        tb.setValue( numericValue == null ? "" : numericValue.toString() );

        // Wire up update handler
        tb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            tb.addValueChangeHandler( new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {
                    try {
                        value.setNumericValue( new Float( event.getValue() ) );
                    }
                    catch ( NumberFormatException nfe ) {
                        if ( allowEmptyValues ) {
                            value.setNumericValue( (Float) null );
                            tb.setValue( "" );
                        } else {
                            value.setNumericValue( new Float( "0" ) );
                            tb.setValue( "0" );
                        }
                    }
                }

            } );
View Full Code Here

Examples of org.drools.guvnor.client.common.AbstractRestrictedEntryTextBox

        return container;
    }

    //TextBox factory
    private TextBox makeTextBox(final int index) {
        AbstractRestrictedEntryTextBox txt = new CEPTimeParameterTextBox( hop,
                                                                          index );

        if ( parameterSets.size() == 0 ) {
            txt.setVisible( false );
        } else {
            txt.setVisible( index < parameterSets.get( visibleParameterSet ) );
        }

        return txt;
    }
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.