Package org.eclipse.nebula.widgets.nattable.data.validate

Examples of org.eclipse.nebula.widgets.nattable.data.validate.DataValidator


                validationErrorStyle, DisplayMode.EDIT,
                EditErrorHandlingExample.COLUMN_TWO_LABEL);
    }

    private IDataValidator getExampleValidator() {
        return new DataValidator() {

            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                if (newValue instanceof Integer
                        && ((Integer) newValue).intValue() > 10000) {
View Full Code Here


            }
        };
    }

    private IDataValidator getExceptionValidator() {
        return new DataValidator() {

            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                throw new IllegalArgumentException(
                        "This is an exception throwed because of missing constraint checks!");
View Full Code Here

     * Validate: Ask price > Bid Price
     */
    private static IDataValidator getAskPriceValidator(
            final IDataProvider dataProvider) {

        return new DataValidator() {

            @Override
            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                try {
View Full Code Here

    /**
     * Validate: First three chars must be alphabetic and the following must be
     * numeric
     */
    private static IDataValidator getSecurtityIdValidator() {
        return new DataValidator() {

            @Override
            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                if (newValue == null) {
View Full Code Here

                validationErrorStyle, DisplayMode.EDIT,
                _446_EditErrorHandlingExample.COLUMN_TWO_LABEL);
    }

    private IDataValidator getExampleValidator() {
        return new DataValidator() {

            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                if (newValue instanceof Integer
                        && ((Integer) newValue).intValue() > 10000) {
View Full Code Here

            }
        };
    }

    private IDataValidator getExceptionValidator() {
        return new DataValidator() {

            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                throw new IllegalArgumentException(
                        "This is an exception throwed because of missing constraint checks!");
View Full Code Here

            }

        };

        final Character newValue = Character.valueOf('4');
        IDataValidator dataValidator = new DataValidator() {

            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                Assert.assertEquals(newValue, newValue);
                return false;
View Full Code Here

            }
        };
    }

    private IDataValidator getStartingWithCValidator() {
        return new DataValidator() {
            @Override
            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                String asString = newValue.toString();
                return asString.startsWith("C");
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.data.validate.DataValidator

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.